vcenter nsx clusters configuration: enable
Enables NSX networking on the hosts in a vSphere cluster. Warning: This operation is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.
Request:
HTTP request
POST https://{server}/api/vcenter/nsx/clusters/{cluster}/configuration
?action=enable
?action=enable
{
"dv_switch" : "obj-103",
"overlay_network" : {
"mode" : "DHCP",
"vlan" : 1,
"ip_pool_spec" : {
"ip_range" : {
"size_specifier" : "ENDING_ADDRESS",
"ending_address" : "string",
"subnet_mask" : "string",
"starting_address" : "string",
"address_count" : 1
},
"name" : "obj-103",
"cidr" : {
"address" : "string",
"prefix" : 1
},
"gateway" : "string"
},
"ip_pool" : "obj-103",
"create_ip_pool" : true
}
}
"dv_switch" : "obj-103",
"overlay_network" : {
"mode" : "DHCP",
"vlan" : 1,
"ip_pool_spec" : {
"ip_range" : {
"size_specifier" : "ENDING_ADDRESS",
"ending_address" : "string",
"subnet_mask" : "string",
"starting_address" : "string",
"address_count" : 1
},
"name" : "obj-103",
"cidr" : {
"address" : "string",
"prefix" : 1
},
"gateway" : "string"
},
"ip_pool" : "obj-103",
"create_ip_pool" : true
}
}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
cluster | string | Identifier for the vSphere cluster on which NSX networking will be enabled. |
Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
- | cluster_enable_spec | Specification for setting up the NSX networking on the hosts in the vSphere cluster. |
-.dv_switch | string | The vSphere Distributed Switch (VDS) to be used for hosts' transport node configuration. All the hosts in the vSphere cluster must be connected to this VDS. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: DistributedVirtualSwitch . When operations return a value of this structure as a result, the field will be an identifier for the resource type: DistributedVirtualSwitch . |
-.overlay_network | cluster_overlay_network_spec | The network specification for the hosts' transport node configuration. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.overlay_network.vlan | long | The VLAN identifier for this network. Possible values:
|
-.overlay_network.mode | string | The IP address allocation mode. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. If unset, DHCP is assumed. |
-.overlay_network.create_ip_pool | boolean | Specifies if a new NSX IP pool must be used for IP address allocation for this network interface. This field is required if vcenter.nsx.cluster_overlay_network_spec.mode is set to IP_POOL. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when mode has value IP_POOL. This field is optional and it is only relevant when the value of mode is IP_POOL. |
-.overlay_network.ip_pool_spec | ip_pool_create_spec | New NSX IP pool information. If the vcenter.nsx.cluster_overlay_network_spec.mode is set to IP_POOL and vcenter.nsx.cluster_overlay_network_spec.create_ip_pool is set to true, then this field contains the specification for the new NSX IP pool to be created and used for the network interface. The IP address from this NSX IP pool is assigned to a new vmnic on each host in the vSphere cluster. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when mode has value IP_POOL. To be unset when vcenter.nsx.cluster_overlay_network_spec.create_ip_pool is false. If it is set when vcenter.nsx.cluster_overlay_network_spec.create_ip_pool is set to false, then it is ignored. |
-.overlay_network.ip_pool_spec.name | string | The ID(Name) of the NSX IP pool. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.nsx.pools.ip_pool . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.nsx.pools.ip_pool . |
-.overlay_network.ip_pool_spec.cidr | ipv4_cidr | The CIDR string denoting the range of IP addresses and the prefix length. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. To be unset when vcenter.nsx.ip_pool_create_spec.ip_range is set. If vcenter.nsx.ip_pool_create_spec.cidr and vcenter.nsx.ip_pool_create_spec.ip_range are both set, then InvalidArgument error is thrown. |
-.overlay_network.ip_pool_spec.cidr.address | string | The IPv4 address. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.overlay_network.ip_pool_spec.cidr.prefix | long | The prefix length in the IPv4 CIDR notation. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.overlay_network.ip_pool_spec.ip_range | ipv4_range | The IPv4 address range. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. To be unset when vcenter.nsx.ip_pool_create_spec.cidr is set. If vcenter.nsx.ip_pool_create_spec.cidr and vcenter.nsx.ip_pool_create_spec.ip_range are both set, then InvalidArgument error is thrown. |
-.overlay_network.ip_pool_spec.ip_range.starting_address | string | The IPv4 address denoting the start of the range. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.overlay_network.ip_pool_spec.ip_range.size_specifier | string | The size specification used for the range. This field must be set to ENDING_ADDRESS. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Defines the ways to specify the ending address in an IPv4 address range. Warning: This enumeration is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Value is one of: ENDING_ADDRESS: The end address of the IPv4 address range is specified by providing the IPv4 end address. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. ADDRESS_COUNT: The end address of the IPv4 address range is derived from the specified starting address and address count. This option is for future use. It is not supported yet. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.overlay_network.ip_pool_spec.ip_range.ending_address | string | The IPv4 address denoting the end of the range. The range includes the vcenter.nsx.ipv4_range.ending_address. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when size_specifier has value ENDING_ADDRESS. This field is optional and it is only relevant when the value of size_specifier is ENDING_ADDRESS. |
-.overlay_network.ip_pool_spec.ip_range.address_count | long | A positive number denoting the number of IP addresses in the range. Addresses are derived by incrementing vcenter.nsx.ipv4_range.starting_address. This field is for future use. It is not supported yet. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when size_specifier has value ADDRESS_COUNT. This field is optional and it is only relevant when the value of size_specifier is ADDRESS_COUNT. |
-.overlay_network.ip_pool_spec.ip_range.subnet_mask | string | The subnet mask to be set. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.overlay_network.ip_pool_spec.gateway | string | The IPv4 address of the gateway associated with the NSX IP pool. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.overlay_network.ip_pool | string | ID(Name) of the existing NSX IP pool. If the vcenter.nsx.cluster_overlay_network_spec.mode is set to IP_POOL and vcenter.nsx.cluster_overlay_network_spec.create_ip_pool is set to false, then this field contains the ID of an existing NSX IP pool to be used for the network interface. The IP address from this NSX IP pool is assigned to a new vmnic on each host in the vSphere cluster. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when mode has value IP_POOL. To be unset when vcenter.nsx.cluster_overlay_network_spec.create_ip_pool is true. If it is set when vcenter.nsx.cluster_overlay_network_spec.create_ip_pool is set to true, then it is ignored.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.nsx.pools.ip_pool . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.nsx.pools.ip_pool . |
Response:
HTTP Status Code: 204
Headers:
NoneType:
NoneErrors:
HTTP Status Code | Type | Description |
---|---|---|
400 | already_exists | if the vSphere cluster already has NSX networking enabled. |
400 | invalid_argument | if spec contains any errors. |
400 | invalid_element_configuration | if spec .dvSwitch vcenter.nsx.cluster_enable_spec.dv_switch is not connected to all the hosts in the vSphere cluster. |
404 | not_found | if spec .dvSwitch vcenter.nsx.cluster_enable_spec.dv_switch could not be located. |
400 | unsupported | if there are no hosts in the vSphere cluster. |
500 | error | if the system reports an error while responding to the request. |