com.vmware.vcloud.sdk
Class VirtualNetworkCard

java.lang.Object
  extended by com.vmware.vcloud.sdk.HardwareItem
      extended by com.vmware.vcloud.sdk.VirtualNetworkCard

public class VirtualNetworkCard
extends HardwareItem

Helper class to access the Virtual NetworkCard Resource in vCloud API.

See Also:
RASDType

Constructor Summary
VirtualNetworkCard(Integer nicId, Boolean isConnected, String networkName, Boolean isPrimaryNetworkConnection, IpAddressAllocationModeType ipAddressingMode, String ipAddress)
          Creating a Virtual Network card of default E1000 adapter type.
VirtualNetworkCard(Integer nicId, Boolean isConnected, String networkName, Boolean isPrimaryNetworkConnection, IpAddressAllocationModeType ipAddressingMode, String ipAddress, NetworkAdapterType adapterType)
          Creating a Virtual Network card of defined adapter type
VirtualNetworkCard(com.vmware.vcloud.api.rest.schema.ovf.RASDType virtualNetworkCardItem)
          Constructor to create a virtualNetworkCard
 
Method Summary
 String getIpAddress()
          Get the Ip Address
 String getIpAddressingMode()
          Check the IP adressing mode of the network adapter
 String getMacAddress()
          Retrieve the mac address of the nic.
 String getNetwork()
          Retrieve the nics network name.
 boolean isConnected()
          Check if this network adapter is connected
 boolean isPrimaryNetworkConnection()
          Check if this is the primary network connection
 void resetMacAddress()
          Resetting the mac address and then perform the update network cards VM.updateNetworkCards(List).
 void updateIpAddress(String ipAddress)
          Updating the ip address for the nic in manual ip mode.
 void updateNetwork(String networkName)
          Updating network connected to the nic.
 
Methods inherited from class com.vmware.vcloud.sdk.HardwareItem
getItemResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualNetworkCard

public VirtualNetworkCard(com.vmware.vcloud.api.rest.schema.ovf.RASDType virtualNetworkCardItem)
Constructor to create a virtualNetworkCard

Parameters:
virtualNetworkCardItem -

VirtualNetworkCard

public VirtualNetworkCard(Integer nicId,
                          Boolean isConnected,
                          String networkName,
                          Boolean isPrimaryNetworkConnection,
                          IpAddressAllocationModeType ipAddressingMode,
                          String ipAddress)
Creating a Virtual Network card of default E1000 adapter type. For any other adapter type, use another overloaded constructor.

Parameters:
nicId - Integer - specifying the nic id. There can be only 10 nics attached to a vm. Ex: You can specify index from 0-9 or 1-10.
isConnected - Boolean - is this nic connected or not.
networkName - String - Name of the network to which you want to connect this vapp. If you do not want to connect any network you can specify null or "".
isPrimaryNetworkConnection - Boolean - is this nic a primary network connection for the vm. there can be only 1 primary network connection for a vm.
ipAddressingMode - IpAddressAllocationModeType
ipAddress - String - valid ip address
Since:
API 1.5, SDK 5.1
See Also:
VM.updateNetworkCards(List)

VirtualNetworkCard

public VirtualNetworkCard(Integer nicId,
                          Boolean isConnected,
                          String networkName,
                          Boolean isPrimaryNetworkConnection,
                          IpAddressAllocationModeType ipAddressingMode,
                          String ipAddress,
                          NetworkAdapterType adapterType)
Creating a Virtual Network card of defined adapter type

Parameters:
nicId - Integer - specifying the nic id. There can be only 10 nics attached to a vm. Ex: You can specify index from 0-9 or 1-10.
isConnected - Boolean - is this nic connected or not.
networkName - String - Name of the network to which you want to connect this vapp. If you do not want to connect any network you can specify null or "".
isPrimaryNetworkConnection - Boolean - is this nic a primary network connection for the vm. there can be only 1 primary network connection for a vm.
ipAddressingMode - IpAddressAllocationModeType
ipAddress - String - valid ip address
adapterType - NetworkAdapterType - valid RASD network adapter sub type
Since:
API 5.1, SDK 5.5
See Also:
VM.updateNetworkCards(List)
Method Detail

resetMacAddress

public void resetMacAddress()
Resetting the mac address and then perform the update network cards VM.updateNetworkCards(List).

Since:
API 1.5, SDK 5.1
See Also:
VM.updateNetworkCards(List)

getMacAddress

public String getMacAddress()
Retrieve the mac address of the nic.

Since:
API 1.5, SDK 5.1

getIpAddress

public String getIpAddress()
                    throws VCloudException
Get the Ip Address

Throws:
VCloudException

updateIpAddress

public void updateIpAddress(String ipAddress)
                     throws VCloudException
Updating the ip address for the nic in manual ip mode. Then perform the VM.updateNetworkCards(List)

Parameters:
ipAddress -
Throws:
VCloudException
Since:
API 1.5, SDK 5.1

updateNetwork

public void updateNetwork(String networkName)
                   throws VCloudException
Updating network connected to the nic. Then perform the VM.updateNetworkCards(List)

Parameters:
networkName -
Throws:
VCloudException
Since:
API 1.5, SDK 5.1

getNetwork

public String getNetwork()
                  throws VCloudException
Retrieve the nics network name.

Throws:
VCloudException
VCloudException
Since:
API 1.5, SDK 5.1

isPrimaryNetworkConnection

public boolean isPrimaryNetworkConnection()
                                   throws VCloudException
Check if this is the primary network connection

Throws:
VCloudException

getIpAddressingMode

public String getIpAddressingMode()
                           throws VCloudException
Check the IP adressing mode of the network adapter

Throws:
VCloudException

isConnected

public boolean isConnected()
                    throws VCloudException
Check if this network adapter is connected

Throws:
VCloudException


Copyright © 2016. All Rights Reserved.