Update VM Network Connection operation


The Update VM Network Connection operation enables you to modify the network connection details of the specified VM.

The following figure shows a sample <items> XML element for the Update VM Network Connection operation:

Sample <items> XML element for the Update VM Network Connection operation

<items>
 <item>
   <parameters>
     <vm-id></vm-id>
     <network-connection-section>
       <primary-network-connection-index></primary-network-connection-index>
       <network-connection>
         <network-connection-index></network-connection-index>
         <network-name></network-name>
         <ip-address></ip-address>
         <is-connected></is-connected>
         <mac-address></mac-address>
         <ip-address-allocation-mode></ip-address-allocation-mode>
       </network-connection>
     </network-connection-section>
   </parameters>
 </item>
</items>

The following table describes the elements for this adapter request:

Adapter request elements for the Update VM Network Connection operation

Element

Definition

Required

<operation-name>

Defines the type of operation: Update_VM_Network_Connection

Yes

<vcloud-organization>

Specifies the name of the vCloud organization

Failed to execute the [panel] macro.

Conditional:

  • Required if not specified in the configuration
  • If used, requires <user-name> and <password> 

    Failed to execute the [panel] macro.

<user-name>

Specifies the user name required for basic HTTP authentication on vCloud

Failed to execute the [panel] macro.

Conditional:

  • Required if not specified in the configuration
  • If used, requires <vcloud-organization> and <password> 

    Failed to execute the [panel] macro.

<password>

Contains the password corresponding to the specified user name

Failed to execute the [panel] macro.

Conditional:

  • Required if not specified in the configuration
  • If used, requires <vcloud-organization> and <user-name> 

    Failed to execute the [panel] macro.

<parameters>

Contains the set of elements that can be used to execute the operation

Yes

<vm-id>

Specifies the ID of the VM whose network connection details you want to update

Valid value: Any string

Yes

<primary-network-connection-index>

Designates the current network connection as the primary network connection

There is no default value for this element.

No

<network-connection-index>

Specifies the network connection whose details you want to update

No

<network-name>

Specifies the name of the network whose network details you want to modify

Yes

<ip-address>

Specifies the IP address of the connection

Conditional; required if <ip-address-allocation-mode> = MANUAL

<is-connected>

If the vApp is deployed, specifies the current state of the connection; if the vApp is undeployed, specifies whether to make the connection at deployment time

Valid values: true, false (default)

No

<mac-address>

Specifies the MAC address of the connection

No

<ip-address-allocation-mode>

Specifies how an IP address is allocated to this connection

Valid values:
NONE: No IP addressing mode specified
MANUAL: Static IP address assigned manually
POOL: Static IP address allocated from a pool (default)
DHCP: IP address allocated using DHCP

No

The following figure shows the sample adapter request for the Update VM Network Connection operation:

Sample adapter request for the Update VM Network Connection operation

<vmware-vcloud-request>
 <operation-name>Update_VM_Network_Connection</operation-name>
 <vcloud-organization>TestOrg</vcloud-organization>
 <user-name>TestUser</user-name>
 <password>Password</password>
 <parameters>
   <vm-id>vm-690224753</vm-id>
   <network-connection-section>
     <primary-network-connection-index>1</primary-network-connection-index>
     <network-connection>
       <network-connection-index>1</network-connection-index>
       <network-name>BMCDevOrgNetwork2</network-name>
       <ip-address />
       <is-connected>true</is-connected>
       <mac-address>00:50:56:91:2a:aa</mac-address>
       <ip-address-allocation-mode>POOL</ip-address-allocation-mode>
     </network-connection>
   </network-connection-section>
 </parameters>
</vmware-vcloud-request>

The following figure shows the response for the sample request:

Sample adapter response for the Update VM Network Connection operation

<vmware-vcloud-response>
 <metadata>
   <status>success</status>
 </metadata>
 <status-line>
   <code>202</code>
   <reason>Accepted</reason>
 </status-line>
 <message-body>
   <Task status="running" startTime="2011-07-14T14:01:17.750+05:30"
operation="Updating Virtual Machine TestVApp1(690224753)"
expiryTime="2011-10-12T14:01:17.750+05:30" endTime="9999-12-31T23:59:59.
999+05:30"
type="application/vnd.vmware.vcloud.task+xml"
href="https://10.128.248.112/api/v1.0/task/16l1kvyb00j8j5ahyie">
     <Owner type="application/vnd.vmware.vcloud.vm+xml" name="TestVApp1"
href="https://10.128.248.112/api/v1.0/vApp/vm-690224753" />
   </Task>
 </message-body>
</vmware-vcloud-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Atrium Orchestrator Content 20.14.02