REST API - enable

vcenter nsx edge clusters configuration: enable

Enable NSX Edge capabilities 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/edge-clusters/{cluster}/configuration

?action=enable
{
    "management_network"{
        "subnet_mask""string",
        "gateway""string",
        "network""obj-103"
    },
    "placement"{
        "create_resource_pool"true,
        "resource_pool_name""string",
        "resource_pool""obj-103"
    },
    "overlay_network"{
        "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
    },
    "uplink_network"{
        "vlan"1,
        "subnet_mask""string",
        "gateway""string"
    },
    "edge_nodes"[
        {
            "password""secret string",
            "hostname""string",
            "datastore""obj-103",
            "name""string",
            "uplink_ip_address""string",
            "management_ip_address""string"
        },
        {
            "password""secret string",
            "hostname""string",
            "datastore""obj-103",
            "name""string",
            "uplink_ip_address""string",
            "management_ip_address""string"
        }
    ]
}

Path Parameters

Name Type Description
Required
cluster string Identifier for the compute resource associated with the NSX Edge node(s).

Body Parameters:

Name Type Description
bold = required
- edge_cluster_enable_spec Specification for setting up the NSX Edge node(s) on the vSphere cluster.
-.edge_nodes uplink_node_spec[] List of specifications for the NSX Edge node(s). This list must have two elements. 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.

-.edge_nodes[].uplink_ip_address string IP address for the interface on the uplink network. 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.

-.edge_nodes[].name string Name of the virtual machine for the NSX Edge node. 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. This field is currently required. It is optional for future development.

-.placement placement_spec Specification for the placement associated with the NSX Edge node(s). 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.

-.placement.create_resource_pool boolean Specifies if a new resource pool should be created. If it is set to true, a new resource pool with the name vcenter.nsx.placement_spec.resource_pool_name will be created and used for NSX Edge node(s). If it is set to false and vcenter.nsx.placement_spec.resource_pool is set, then the existing resource pool identified by vcenter.nsx.placement_spec.resource_pool will be used for NSX Edge node(s). If it is set to false and vcenter.nsx.placement_spec.resource_pool unset, then the root resource pool will be associated with the NSX Edge node(s). 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.

-.placement.resource_pool string Identifier for the resource pool associated with the NSX Edge node(s). 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.placement_spec.create_resource_pool is true. If unset and vcenter.nsx.placement_spec.create_resource_pool is set to false, then the root resource pool will be associated with the NSX Edge node(s).When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ResourcePool.

-.placement.resource_pool_name string Name of the new resource pool to be created and associated with the NSX Edge node(s). 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.placement_spec.create_resource_pool is false.

-.management_network management_network_spec Specification for the management network for the NSX Edge node(s). 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.

-.management_network.network string Identifier for the network. 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: DistributedVirtualPortgroup. When operations return a value of this structure as a result, the field will be an identifier for the resource type: DistributedVirtualPortgroup.

-.management_network.subnet_mask string Subnet mask for the interface on the network. 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.

-.management_network.gateway string Gateway IP address for the interface on the network. 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.

-.uplink_network uplink_network_spec Specification for the uplink network for the NSX Edge node(s). 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.

-.uplink_network.vlan long The VLAN identifier for the network. Possible values:
  • A value from 1 to 4094 specifies a VLAN ID for the network.
  • Any other value (including 0) is invalid.
. 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. This field is currently required. It is optional for future development.

-.uplink_network.subnet_mask string Subnet mask for the interface on the network. 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.

-.uplink_network.gateway string Gateway IP address for the interface on the network. 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 edge_overlay_network_spec Specification for the overlay network for the NSX Edge node(s). 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:
  • A value from 1 to 4094 specifies a VLAN ID for the network.
  • Any other value (including 0) is invalid.
. 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. This field is currently required. It is optional for future development.

-.overlay_network.create_ip_pool boolean Specifies if a new NSX IP pool must be used for IP address allocation for this network interface. 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_pool_create_spec New NSX IP pool information. If vcenter.nsx.edge_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 the tunnel endpoint on each NSX Edge node 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. To be unset when vcenter.nsx.edge_overlay_network_spec.create_ip_pool is false. If it is set when vcenter.nsx.edge_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 vcenter.nsx.edge_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 the tunnel endpoint on each NSX Edge node 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. To be unset when vcenter.nsx.edge_overlay_network_spec.create_ip_pool is true. If it is set when vcenter.nsx.edge_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:

None

Type:

None

Errors:

HTTP Status Code Type Description
400 already_exists if the cluster already has NSX Edge capabilities enabled or if a VM with name vcenter.nsx.node_spec.name already exists in the datacenter, or if an IP Pool with name vcenter.nsx.ip_pool_create_spec.name already exists, or if a resource pool with name vcenter.nsx.placement_spec.resource_pool_name already exists in the cluster.
400 invalid_argument if spec contain any errors.
400 not_allowed_in_current_state if all the hosts in the cluster are not transport nodes.
404 not_found if vcenter.nsx.management_network_spec.network, vcenter.nsx.edge_overlay_network_spec.ip_pool, vcenter.nsx.placement_spec.resource_pool, vcenter.nsx.node_spec.datastore or cluster could not be located.
400 unsupported if the cluster has DRS disabled or does not have at least 2 hosts that are connected and not in maintenance mode.
500 error if the system reports an error while responding to the request.