org.jclouds.vcloud.domain.network.nat.rules
Class VmRule

java.lang.Object
  extended by org.jclouds.vcloud.domain.network.nat.rules.VmRule
All Implemented Interfaces:
NatRule

public class VmRule
extends Object
implements NatRule

The VmRule element describes a NAT rule that maps an IP address and port in a vApp network to an external IP address and port. The external IP address, external port, and internal port are specified in the element. The internal IP address is discovered by looking up the specified VmReference and VmNicId.

Since:
vcloud 0.9
Author:
Adrian Cole

Constructor Summary
VmRule(String externalIP, int externalPort, String vAppScopedLocalId, int vmNicId, int internalPort, NatProtocol protocol)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getExternalIP()
          IP address to which this NAT rule maps the IP address specified in the InternalIp element.
 Integer getExternalPort()
          network port to which this NAT rule maps the port number specified in the InternalPort element
 Integer getInternalPort()
          network port to which this NAT rule maps the port number specified in the ExternalPort element.
 NatProtocol getProtocol()
          specifies the network protocol to which this rule applies
 String getVAppScopedLocalId()
           
 int getVmNicId()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VmRule

public VmRule(@Nullable
              String externalIP,
              int externalPort,
              @Nullable
              String vAppScopedLocalId,
              int vmNicId,
              int internalPort,
              NatProtocol protocol)
Method Detail

getExternalIP

@Nullable
public String getExternalIP()
IP address to which this NAT rule maps the IP address specified in the InternalIp element.

Specified by:
getExternalIP in interface NatRule

getExternalPort

public Integer getExternalPort()
network port to which this NAT rule maps the port number specified in the InternalPort element


getVAppScopedLocalId

@Nullable
public String getVAppScopedLocalId()
Returns:
read‐only identifier created on import
Since:
vcloud 0.9

getVmNicId

public int getVmNicId()
Returns:
device number of the NIC on the referenced virtual machine
Since:
vcloud 0.9

getInternalPort

public Integer getInternalPort()
network port to which this NAT rule maps the port number specified in the ExternalPort element.


getProtocol

public NatProtocol getProtocol()
specifies the network protocol to which this rule applies


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2011 jclouds. All Rights Reserved.