vsphere/distributed_port_group_structure.go
func schemaDVPortgroupConfigSpec() map[string]*schema.Schema {
	s := map[string]*schema.Schema{
		// VMwareDVSPortgroupPolicy
		"block_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the blocked setting of an individual port to override the setting in the portgroup.",
		},
		"live_port_moving_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow a live port to be moved in and out of the portgroup.",
		},
		"network_resource_pool_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the network resource pool of an individual port to override the setting in the portgroup.",
		},
		"port_config_reset_at_disconnect": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Reset the setting of any ports in this portgroup back to the default setting when the port disconnects.",
		},
		"shaping_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the traffic shaping policies of an individual port to override the settings in the portgroup.",
		},
		"traffic_filter_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow any filter policies set on the individual port to override those in the portgroup.",
		},
		"netflow_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the enabling or disabling of Netflow on a port, contrary to the policy in the portgroup.",
		},
		"security_policy_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow security policy settings on a port to override those on the portgroup.",
		},
		"uplink_teaming_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the uplink teaming policies on a port to override those on the portgroup.",
		},
		"vlan_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the VLAN configuration on a port to override those on the portgroup.",
		},

		// DVPortgroupConfigSpec
		"auto_expand": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     true,
			Description: "Auto-expands the port group beyond the port count configured in number_of_ports when necessary.",
		},
		"config_version": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "Version string of the configuration that this spec is trying to change.",
		},
		"description": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "The description of the portgroup.",
		},
		"name": {
			Type:        schema.TypeString,
			Required:    true,
			Description: "The name of the portgroup.",
		},
		"number_of_ports": {
			Type:         schema.TypeInt,
			Optional:     true,
			Computed:     true,
			Description:  "The number of ports in this portgroup. The DVS will expand and shrink by modifying this setting.",
			ValidateFunc: validation.IntAtLeast(0),
		},
		"port_name_format": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "A template string to use when creating ports in the portgroup.",
		},
		"type": {
			Type:         schema.TypeString,
			Optional:     true,
			Default:      string(types.DistributedVirtualPortgroupPortgroupTypeEarlyBinding),
			Description:  "The type of portgroup. Can be one of earlyBinding (static) or ephemeral.",
			ValidateFunc: validation.StringInSlice(distributedVirtualPortgroupPortgroupTypeAllowedValues, false),
		},
		"network_resource_pool_key": {
			Type:        schema.TypeString,
			Optional:    true,
			Default:     "-1",
			Description: "The key of a network resource pool to associate with this portgroup.",
		},
	}
	structure.MergeSchema(s, schemaVMwareDVSPortSetting())
	return s
}
func schemaDVPortgroupConfigSpec() map[string]*schema.Schema {
	s := map[string]*schema.Schema{
		// VMwareDVSPortgroupPolicy
		"block_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the blocked setting of an individual port to override the setting in the portgroup.",
		},
		"live_port_moving_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow a live port to be moved in and out of the portgroup.",
		},
		"network_resource_pool_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the network resource pool of an individual port to override the setting in the portgroup.",
		},
		"port_config_reset_at_disconnect": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Reset the setting of any ports in this portgroup back to the default setting when the port disconnects.",
		},
		"shaping_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the traffic shaping policies of an individual port to override the settings in the portgroup.",
		},
		"traffic_filter_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow any filter policies set on the individual port to override those in the portgroup.",
		},
		"netflow_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the enabling or disabling of Netflow on a port, contrary to the policy in the portgroup.",
		},
		"security_policy_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow security policy settings on a port to override those on the portgroup.",
		},
		"uplink_teaming_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the uplink teaming policies on a port to override those on the portgroup.",
		},
		"vlan_override_allowed": {
			Type:        schema.TypeBool,
			Optional:    true,
			Description: "Allow the VLAN configuration on a port to override those on the portgroup.",
		},

		// DVPortgroupConfigSpec
		"auto_expand": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     true,
			Description: "Auto-expands the port group beyond the port count configured in number_of_ports when necessary.",
		},
		"config_version": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "Version string of the configuration that this spec is trying to change.",
		},
		"description": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "The description of the portgroup.",
		},
		"name": {
			Type:        schema.TypeString,
			Required:    true,
			Description: "The name of the portgroup.",
		},
		"number_of_ports": {
			Type:         schema.TypeInt,
			Optional:     true,
			Computed:     true,
			Description:  "The number of ports in this portgroup. The DVS will expand and shrink by modifying this setting.",
			ValidateFunc: validation.IntAtLeast(0),
		},
		"port_name_format": {
			Type:        schema.TypeString,
			Optional:    true,
			Description: "A template string to use when creating ports in the portgroup.",
		},
		"type": {
			Type:         schema.TypeString,
			Optional:     true,
			Default:      string(types.DistributedVirtualPortgroupPortgroupTypeEarlyBinding),
			Description:  "The type of portgroup. Can be one of earlyBinding (static) or ephemeral.",
			ValidateFunc: validation.StringInSlice(distributedVirtualPortgroupPortgroupTypeAllowedValues, false),
		},
		"network_resource_pool_key": {
			Type:        schema.TypeString,
			Optional:    true,
			Default:     "-1",
			Description: "The key of a network resource pool to associate with this portgroup.",
		},
	}
	structure.MergeSchema(s, schemaVMwareDVSPortSetting())
	return s
}
func schemaDVPortgroupConfigSpec ( ) map [ string ] * schema . Schema { s := map [ string ] * schema . Schema { // VMwareDVSPortgroupPolicy " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , " " : { Type : schema . TypeBool , Optional : true , Description : " " , } , // DVPortgroupConfigSpec " " : { Type : schema . TypeBool , Optional : true , Default : true , Description : " " , } , " " : { Type : schema . TypeString , Computed : true , Description : " " , } , " " : { Type : schema . TypeString , Optional : true , Description : " " , } , " " : { Type : schema . TypeString , Required : true , Description : " " , } , " " : { Type : schema . TypeInt , Optional : true , Computed : true , Description : " " , ValidateFunc : validation . IntAtLeast ( 0 ) , } , " " : { Type : schema . TypeString , Optional : true , Description : " " , } , " " : { Type : schema . TypeString , Optional : true , Default : string ( types . DistributedVirtualPortgroupPortgroupTypeEarlyBinding ) , Description : " " , ValidateFunc : validation . StringInSlice ( distributedVirtualPortgroupPortgroupTypeAllowedValues , false ) , } , " " : { Type : schema . TypeString , Optional : true , Default : " " , Description : " " , } , } structure . MergeSchema ( s , schemaVMwareDVSPortSetting ( ) ) return s }
// schemaDVPortgroupConfigSpec returns schema items for resources that
// need to work with a DVPortgroupConfigSpec.
schemaDVPortgroupConfigSpec returns schema items for resources that need to work with a DVPortgroupConfigSpec .