-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into vapp-routing
# Conflicts: # CHANGELOG.md # go.mod # go.sum # vendor/github.com/vmware/go-vcloud-director/v2/govcd/vapp_network.go # vendor/modules.txt
- Loading branch information
Showing
29 changed files
with
1,500 additions
and
689 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export STATICCHECK_URL=https://github.com/dominikh/go-tools/releases/download | ||
export STATICCHECK_VERSION=2020.1.3 | ||
export STATICCHECK_VERSION=2020.1.4 | ||
export STATICCHECK_FILE=staticcheck_linux_amd64.tar.gz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package vcd | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema" | ||
) | ||
|
||
func datasourceVcdVmAffinityRule() *schema.Resource { | ||
return &schema.Resource{ | ||
Read: datasourceVcdVmAffinityRuleRead, | ||
Schema: map[string]*schema.Schema{ | ||
"org": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
ForceNew: true, | ||
Description: "The name of organization to use, optional if defined at provider " + | ||
"level. Useful when connected as sysadmin working across different organizations", | ||
}, | ||
"vdc": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
ForceNew: true, | ||
Description: "The name of VDC to use, optional if defined at provider level", | ||
}, | ||
"name": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Optional: true, | ||
ExactlyOneOf: []string{"name", "rule_id"}, | ||
Description: "VM affinity rule name. Used to retrieve a rule only when the name is unique", | ||
}, | ||
"rule_id": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Description: "VM affinity rule ID. It's the preferred way of identifying a rule", | ||
}, | ||
"polarity": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "One of 'Affinity', 'Anti-Affinity'", | ||
}, | ||
"required": &schema.Schema{ | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
Description: "True if this affinity rule is required. When a rule is mandatory, " + | ||
"a host failover will not power on the VM if doing so would violate the rule", | ||
}, | ||
"enabled": &schema.Schema{ | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
Description: "True if this affinity rule is enabled", | ||
}, | ||
"virtual_machine_ids": { | ||
Type: schema.TypeSet, | ||
Computed: true, | ||
Description: "Set of VM IDs assigned to this rule", | ||
Elem: &schema.Schema{ | ||
Type: schema.TypeString, | ||
}, | ||
}, | ||
}, | ||
} | ||
} | ||
|
||
// datasourceVcdVmAffinityRuleRead reads a data source VM affinity rule | ||
func datasourceVcdVmAffinityRuleRead(d *schema.ResourceData, meta interface{}) error { | ||
return genericVcdVmAffinityRuleRead(d, meta, "datasource") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.