Skip to content

Commit

Permalink
Improve docs and validation wording for
Browse files Browse the repository at this point in the history
Signed-off-by: Dainius Serplis <[email protected]>
  • Loading branch information
Didainius committed Nov 14, 2024
1 parent fe24686 commit 2ce9015
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
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.
* `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 2ce9015

Please sign in to comment.