Add Virtual Switch operation


The Add Virtual Switch operation updates the configuration of a host network to add a virtual switch.

The following table describes the elements for this request.

Adapter request elements for the Add Virtual Switch operation

Element

Definition

Required

<operation-type>

Defines the type of the operation: Host

Yes

<operation-name>

Defines the name of the operation: Add_Virtual_Switch

Yes

<soap-url>

Specifies the URL for the remote SOAP service running on the VMware VirtualCenter

If the <soap-url> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Default format for HTTPS: https://<hostName>:<port>/sdk/vim

Default format for HTTP: http://<hostName>:<port>/sdk/vim

Note

If you want to use an HTTP value, you might need to change the configuration of the VMware Infrastructure application.

No

<transport>

Specifies the transport protocol for the message

If the <transport> element is not provided, the request uses the VirtualCenter Server details specified in the adapter configuration.

Valid values: https-rpc (default), http-rpc

Note

If the value of the <transport> element is https-rpc, you must install the security certificate for the VMware Virtual Center to the keystore of the peer on which the adapter is enabled.

No

<user-name>

Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center

If no user name is specified, the request is executed with the user name that is specified in the configuration.

No

<password>

Specifies the password corresponding to <user-name>

Conditional; required if <user-name> is specified

<parameters>

Contains the elements required to execute the operation

Yes

<host-system>

DNS name of the host on the network to which the virtual switch is to be added

Valid values: dns name

Yes

<vswitch-list>

Contains the list of virtual switches to be added on the host

Operation supported: add

For more information, see XML sample for vswitch-list.

Yes

The following figure shows a sample adapter request for the Add Virtual Switch operation.

Sample adapter request for the Add Virtual Switch operation

<vmware-infrastructure-request>
    <operation-type>Host</operation-type>
    <operation-name>Add_Virtual_Switch</operation-name>
   <soap-url></soap-url>                    
   <transport></transport>
    <username></username>
    <password></password>
    <parameters>
       <host-system>xyz.bmc.com</host-system>
        <config>
             <vswitch-list>
                 <vswitch>
                     <name>vSwitch4</name>
                     <spec>
                         <num-ports>56</num-ports>
                         <policy>
                             <security>
                                 <allow-promiscuous>true</allow-promiscuous>
                                 <mac-changes>false</mac-changes>
                                 <forged-transmits>false</forged-transmits>
                             </security>
                             <nic-teaming>
                                 <policy>failover_explicit</policy>
                                 <reverse-policy>true</reverse-policy>
                                 <notify-switches>false</notify-switches>
                                 <rolling-order>true</rolling-order>
                                 <failure-criteria>
                                     <check-speed>exact</check-speed>
                                     <speed>32</speed>
                                     <check-duplex>true</check-duplex>
                                     <full-duplex>true</full-duplex>
                                     <check-error-percent>true</check-error-percent>
                                     <percentage>50</percentage>
                                     <check-beacon>false</check-beacon>
                                 </failure-criteria>
                                 <nic-order>
                                     <!--Zero or more repetitions:-->
                                     <active-nic-list>
                                         <active-nic></active-nic>
                                         <active-nic></active-nic>
                                     </active-nic-list>
                                     <!--Zero or more repetitions:-->
                                     <standby-nic-list>
                                         <standby-nic></standby-nic>
                                         <standby-nic></standby-nic>
                                     </standby-nic-list>
                                 </nic-order>
                             </nic-teaming>
                             <offload-policy>
                                 <csum-offload>false</csum-offload>
                                 <tcp-segmentation>false</tcp-segmentation>
                                 <zero-copy-xmit>false</zero-copy-xmit>
                             </offload-policy>
                             <shaping-policy>
                                 <enabled>true</enabled>
                                 <average-bandwidth>102400</average-bandwidth>
                                 <peak-bandwidth>102400</peak-bandwidth>
                                 <burst-size>102400</burst-size>
                             </shaping-policy>
                         </policy>
                     </spec>
                 </vswitch>
             </vswitch-list>
         </config>
     </parameters>
</vmware-infrastructure-request>

The following figure shows the response for the sample Add Virtual Switch operation.

Sample adapter response for the Add Virtual Switch operation

<vmware-infrastructure-response>
    <metadata>
        <status>success</status>
    </metadata>
    <AddVirtualSwitchResponse>
        <returnval/>
    </AddVirtualSwitchResponse>
</vmware-infrastructure-response>

 

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