Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ider-vcd into content-library-item
  • Loading branch information
abarreiro committed Nov 18, 2024
2 parents d8f4b58 + 72b1a29 commit eee1605
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .changes/v4.0.0/1345-features.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
* **New Resource:** `vcd_tm_org` to manage TM Organizations [GH-1345]
* **New Resource:** `vcd_tm_org` to manage TM Organizations [GH-1345, GH-1351]
* **New Data Source:** `vcd_tm_org` to read TM Organizations [GH-1345]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ website/node_modules
*.test
*.iml

# Ignore test coverage files
*.cover

vcd/vcd_test_config*.json
vcd/go-vcloud-director.log
vcd/test-artifacts
Expand Down
4 changes: 4 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ testextnetwork: fmtcheck
# Runs the acceptance test for tm
testtm: fmtcheck
@sh -c "'$(CURDIR)/scripts/runtest.sh' tm"
# Runs the acceptance test for tm with coverage
testtm-coverage: fmtcheck
@sh -c "'$(CURDIR)/scripts/runtest.sh' tm-coverage"


testtm-binary-prepare: install
cd vcd && go test -tags tm -vcd-add-provider -vcd-short -v .
Expand Down
3 changes: 3 additions & 0 deletions scripts/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ case $wanted in
tm)
acceptance_test tm
;;
tm-coverage)
acceptance_test tm "-coverprofile=tm.cover"
;;
network)
acceptance_test network
;;
Expand Down
2 changes: 1 addition & 1 deletion vcd/resource_vcd_tm_org.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func validateRenameOrgDisabled(d *schema.ResourceData, oldCfg *govcd.TmOrg, newC
if d.HasChange("name") &&
// this condition is a negative xor - it will be matched if Org is not transitioning from or to disabled state
((!newCfg.IsEnabled && !oldCfg.TmOrg.IsEnabled) || newCfg.IsEnabled && oldCfg.TmOrg.IsEnabled) {
return fmt.Errorf("%s must be disabled (is_enabled=false) to change name", labelTmOrg)
return fmt.Errorf("%s must be disabled (is_enabled=false) to change name because it changes tenant login URL", labelTmOrg)
}

return nil
Expand Down
3 changes: 2 additions & 1 deletion website/docs/r/tm_org.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ resource "vcd_tm_org" "test" {
The following arguments are supported:

* `name` - (Required) A name for Organization with which users log in to it as it will be used in
the URL
the URL. The Org must be disabled to or transition from previous disabled state
(`is_enabled=false`) to change a name because it changes tenant login URL
* `display_name` - (Required) A human readable name for Organization
* `description` - (Optional) An optional description for Organization
* `is_enabled` - (Optional) Defines if Organization is enabled. Default `true`. **Note:**
Expand Down

0 comments on commit eee1605

Please sign in to comment.