ModifyVirtualNetwork

Contributors netapp-mwallis Download PDF of this page

You can use the ModifyVirtualNetwork method to change the attributes of an existing virtual network.

This method enables you to add or remove address blocks, change the netmask, or modify the name or description of the virtual network. You can also use it to enable or disable namespaces, as well as add or remove a gateway if namespaces are enabled on the virtual network.

Note This method requires either the virtualNetworkID or the virtualNetworkTag as a parameter, but not both.

CAUTION:

Enabling or disabling the Routable Storage VLANs functionality for an existing virtual network by changing the namespace parameter disrupts any traffic handled by the virtual network. It is best if you change the namespace parameter during a scheduled maintenance window.

Parameters

This method has the following input parameters:

Name

Description

Type

Default value

Required

virtualNetworkID

Unique identifier of the virtual network to modify. This is the virtual network ID assigned by the cluster.

integer

None

No

virtualNetworkTag

The network tag that identifies the virtual network to modify.

integer

None

No

addressBlocks

The new address block to set for this virtual network. This might include new address blocks to add to the existing object or omit unused address blocks that need to be removed. Alternatively, you can extend or reduce the size of existing address blocks. You can only increase the size of the starting addressBlocks for a Virtual Network object; you can never decrease it. Required members for this object:

  • start: The start of the IP address range. (string)

  • size: The number of IP addresses to include in the block. (integer)

JSON object

None

No

gateway

The IP address of a gateway of the virtual network. This parameter is valid only if the namespace parameter is set to true.

string

None

No

attributes

List of name-value pairs in JSON object format.

JSON object

None

No

name

The new name for the virtual network.

string

None

No

namespace

When set to true, enables the Routable Storage VLANs functionality by recreating the virtual network and configuring a namespace to contain it. When set to false, disables the VRF functionality for the virtual network. Changing this value disrupts traffic running through this virtual network.

boolean

None

No

netmask

New network mask for this virtual network.

string

None

No

svip

The storage virtual IP address for this virtual network. The SVIP for a virtual network cannot be changed. You must create a new virtual network to use a different SVIP address.

string

None

No

Return values

This method has no return values.

Request example

Requests for this method are similar to the following example:

{
  "method": "ModifyVirtualNetwork",
  "params": {
    "virtualNetworkID": 2,
    "name": "ESX-VLAN-3112",
    "addressBlocks": [
     {
      "start": "10.1.112.1",
      "size": 20
     },
     {
      "start": "10.1.112.100",
      "size": 20
     }
   ],
    "netmask": "255.255.255.0",
    "gateway": "10.0.1.254",
    "svip": "10.1.112.200",
    "attributes": {}
  },
  "id":1
}

Response example

This method returns a response similar to the following example:

{
  "id": 1,
  "result": {
  }
}

New since version

9.6