orca.cod
Class Node

java.lang.Object
  extended by orca.cod.Node
All Implemented Interfaces:
java.lang.Cloneable, ISerialize
Direct Known Subclasses:
Machine

public class Node
extends java.lang.Object
implements java.lang.Cloneable, ISerialize

Node Represents the state of a node (virtual or physical). Public fields for use by NodeGroup, mapper, and RAL.

Properties ("down") are set by the COD Authority and passed read-only to the RAL. These are configuration parameters, including hardware parameters for a virtual machine.

Attributes ("up") are set by the RAL and are read-only to the COD Authority. These are physical machine attributes and node status.

On a Service Manager all Node objects are read-only and encapsulate the subset of node information received from an Authority in a lease.


Field Summary
 boolean aboutToClose
           
 boolean aboutToModify
           
protected  byte available
           
 int computons
           
protected  boolean dirty
           
 int domainZeroMemory
           
 boolean forcedClose
           
 long[] growing
          Field for caching shares information.
 java.lang.String hostKey
           
 java.lang.String hostName
           
static boolean HP_HACK
           
 NodeID id
          All nodes are endowed by creator with an ID.
 ID logicalId
          Logical ID for this node
 java.util.Vector macAddresses
          Name and address info: these are exposed to the Service Manager.
 ID machineId
          Machine ID for this node
 int machineType
          Node HW attributes: these are exposed to Service Manager.
 int memory
           
 Node newHost
           
 NodeID newHostID
           
 java.lang.String newHostIP
           
 java.lang.String newHostName
           
 ID newLogicalId
           
 ID newMachineId
           
 ResourceType newResourceType
           
 int newSaveRestore
           
 int nodeType
           
static int NodeTypeAll
           
static int NodeTypeDefault
           
static int NodeTypePhysicalMachine
           
static int NodeTypeVirtualMachine
           
 Node originalNode
          The original node: used during modification Should not be persisted
 java.lang.String prefferedIP
           
 java.net.InetAddress privateIP
           
protected  java.util.Properties properties
          Properties field for Node properties not explicitly represented by class fields.
static java.lang.String PropertyAvailable
           
static java.lang.String PropertyCodNodeDN
           
static java.lang.String PropertyComputons
           
static java.lang.String PropertyConsole
           
static java.lang.String PropertyCpuCache
           
static java.lang.String PropertyCpuModel
           
static java.lang.String PropertyCpuSpeed
           
static java.lang.String PropertyDhcpHWAddress
           
static java.lang.String PropertyDhcpLeaseDN
           
static java.lang.String PropertyDhcpOption
           
static java.lang.String PropertyDhcpOptionsDN
           
static java.lang.String PropertyDhcpStatements
           
static java.lang.String PropertyDnsClass
           
static java.lang.String PropertyDnsMXRecord
           
static java.lang.String PropertyDnsZone
           
static java.lang.String PropertyDonated
           
static java.lang.String PropertyEthernet
           
static java.lang.String PropertyHostKey
           
static java.lang.String PropertyHostName
           
static java.lang.String PropertyID
           
static java.lang.String PropertyKernel
           
static java.lang.String PropertyLogicalId
           
static java.lang.String PropertyMachineId
           
static java.lang.String PropertyMachineName
          Name to be used for naming the VM that is created for this node.
static java.lang.String PropertyMachineType
           
static java.lang.String PropertyMacs
           
static java.lang.String PropertyNetSpeed
           
static java.lang.String PropertyNewHostID
           
static java.lang.String PropertyNewHostIP
           
static java.lang.String PropertyNewHostName
           
static java.lang.String PropertyNewLogicalId
           
static java.lang.String PropertyNewMachineId
           
static java.lang.String PropertyNewSaveRestore
           
static java.lang.String PropertyNic
           
static java.lang.String PropertyNodeType
           
static java.lang.String PropertyNodeUpdates
          Property for storing the serialized version of the updates field.
static java.lang.String PropertyNumCpus
           
static java.lang.String PropertyPendingClose
           
static java.lang.String PropertyPendingModify
           
static java.lang.String PropertyPendingOpen
           
static java.lang.String PropertyPoolID
           
static java.lang.String PropertyPoolName
           
static java.lang.String PropertyPoolResourceType
           
static java.lang.String PropertyPreferredGateway
           
static java.lang.String PropertyPreferredIP
           
static java.lang.String PropertyPreferredNetmask
           
static java.lang.String PropertyPreferredNetwork
           
static java.lang.String PropertyPrivateGateway
           
static java.lang.String PropertyPrivateIP
           
static java.lang.String PropertyPrivateNetmask
           
static java.lang.String PropertyPrivateNetwork
           
static java.lang.String PropertyPublicGateway
           
static java.lang.String PropertyPublicIP
           
static java.lang.String PropertyPublicNetmask
           
static java.lang.String PropertyPublicNetwork
           
static java.lang.String PropertyRealHostID
           
static java.lang.String PropertyRealHostIP
           
static java.lang.String PropertyRealHostName
           
static java.lang.String PropertyRemoteReservationID
           
static java.lang.String PropertyReservationID
           
static java.lang.String PropertyResourceBandwidthExtra
           
static java.lang.String PropertyResourceBandwidthShare
           
static java.lang.String PropertyResourceCpuExtra
           
static java.lang.String PropertyResourceCpuShare
           
static java.lang.String PropertyResourceMemory
           
static java.lang.String PropertyResourceNewBandwidthExtra
           
static java.lang.String PropertyResourceNewBandwidthShare
           
static java.lang.String PropertyResourceNewCpuExtra
           
static java.lang.String PropertyResourceNewCpuShare
           
static java.lang.String PropertyResourceNewMemory
           
static java.lang.String PropertyResourceType
           
static java.lang.String PropertyRoot
           
static java.lang.String PropertySaveRestore
           
static java.lang.String PropertySequence
           
static java.lang.String PropertySerial
           
static java.lang.String PropertyServiceGateway
          Service network gateway
static java.lang.String PropertyServiceIP
          Service network IP address.
static java.lang.String PropertyServiceNetwork
          Service network base.
static java.lang.String PropertyServiceNetworkMask
          Service network netmask
static java.lang.String PropertySlice
           
static java.lang.String PropertySliceID
           
static java.lang.String PropertySliceNumericID
           
static java.lang.String PropertySliverID
           
static java.lang.String PropertyState
           
static java.lang.String PropertyStatusMessage
           
static java.lang.String PropertyType
           
static java.lang.String PropertyVmmMemory
           
 java.net.InetAddress publicIP
           
 Node realHost
           
 NodeID realHostID
           
 java.lang.String realHostIP
           
 java.lang.String realHostName
           
 IReservation reservation
           
 ResourceType resourceType
           
 int saveRestore
           
static int SaveRestoreNone
           
static int SaveRestoreSaved
           
static int SaveRestoreToRestore
           
static int SaveRestoreToSave
           
protected  long sequence
          Sequence number.
 long sliverIdx
           
 java.lang.String statusMsg
           
 Node updates
          Node representing the updates to this node (used during modification) Should not be persisted
static int VmmMemorySlack
          Additional memory "given" to domain0.
 
Constructor Summary
Node()
           
Node(NodeID id, Node realhost)
           
Node(NodeID id, Node realhost, int computons, int basis)
          Constructs a descriptor for a virtual node to be hosted on a physical node.
Node(NodeID nid, java.lang.String hostName)
           
 
Method Summary
 void activate()
          Indicates that a node is active.
 boolean active()
          Predicate: is this node active?
 void addMAC(java.lang.String mac)
          Registers a MAC address for a node.
 void clearStatus()
          Clears the state and status of this node, e.g., when released back to free pool or allocated to another resource set.
 java.lang.Object clone()
          Node clone retains only the info exported to a Service Manager.
 boolean closed()
          Predicate: is this node closed (shut down or failed)?
 boolean closing()
          Predicate: is this node closing (shutting down)?
 void completeModify()
           
 void configIP(java.net.InetAddress privateIP, java.net.InetAddress publicIP)
          Establishes IP addressing info for this node.
 java.lang.String consumeStateMsg()
           
 Node copy()
           
 void deactivate()
          Indicates that a node is inactive.
 boolean down()
          Predicate: is this node down? (synonym for closed).
 boolean equals(java.lang.Object o)
          Equality predicate.
 void fail()
           
 boolean failed()
          Predicate: is this node failed?
 java.lang.String getBandwidthExtra()
           
 java.lang.String getBandwidthShare()
           
 java.lang.String getCpuExtra()
           
 java.lang.String getCpuShare()
           
 java.lang.String getEthernet()
           
 java.lang.String getHostKey()
          Returns the public key used by sshd running on this node
 java.lang.String getHostName()
          Returns the host name.
 ID getLogicalId()
           
 ID getMachineId()
           
 java.lang.String getMachineName()
          Returns the machine name
 java.lang.String getNewBandwidthExtra()
           
 java.lang.String getNewBandwidthShare()
           
 java.lang.String getNewCpuExtra()
           
 java.lang.String getNewCpuShare()
           
 int getNewMemory()
           
 NodeID getNodeID()
          Gets the Node ID of this node
 int getNodeType()
           
 java.lang.String getPoolID()
           
 java.lang.String getPoolName()
           
 java.lang.String getPoolResourceType()
           
 java.net.InetAddress getPrivateInetAddr()
          Gets the primary private IP Address of this node.
 java.lang.String getPrivateIPaddr()
          Gets the primary private IP Address of this node.
 java.util.Properties getProperties()
           
 java.lang.String getProperty(java.lang.String name)
           
 java.net.InetAddress getPublicInetAddr()
          Gets the primary public IP Address of this node.
 java.lang.String getPublicIP()
           
 java.lang.String getPublicIPaddr()
          Gets the primary public IP Address of this node.
 Node getRealHost()
          Gets the real host of this node if it is virtual, else null
 ReservationID getRemoteReservationID()
           
 ReservationID getReservationID()
           
 ResourceType getResourceType()
           
 long getSequence()
           
 java.lang.String getServiceGateway()
          Returns the service network mask
 java.lang.String getServiceIP()
          Returns the service IP address.
 java.lang.String getServiceNetwork()
          Returns the service network base
 java.lang.String getServiceNetworkMask()
          Returns the service network mask
 java.lang.String getSlice()
           
 SliceID getSliceID()
           
 int getSliceNumericID()
           
 long getSliverIdx()
          Returns the current sliver to which this node is bound.
 int getState()
           
 java.lang.String getStateString()
          Gets the state of this node as a short string.
 java.lang.String getStatusMessage()
          Gets the state of this node as a (possibly) longer string.
 int hashCode()
           
 boolean hasPending()
           
 boolean isAvailable()
           
 boolean isClosed()
          Returns true if this node is the process of being closed.
 boolean isClosing()
          Returns true if this node is the process of being closed.
 boolean isDirty()
           
 boolean isDonated()
           
 boolean isModifying()
          Returns true if this node is the process of being modified.
 boolean isOpening()
          Returns true if this node is the process of being opened.
 boolean isPhysicalMachine()
           
 boolean isVirtualMachine()
           
 void merge(Node other)
           
 boolean opening()
          Predicate: is this node opening (starting or booting)?
 void releaseToPool(BinPool pool)
           
 void relocate(Node newHost)
           
 void reset(java.util.Properties p)
          De-serializes the object from the given properties list.
protected  void resetMacs(java.lang.String s)
           
 void revisit(IActorIdentity actor, java.util.Properties properties)
           
 java.util.Properties save()
          Serializes the object into a properties list.
 void save(java.util.Properties p)
          Serializes the object into the given properties list.
 java.lang.String saveMacs()
           
 void setAvailable(boolean value)
           
 void setBandwidthExtra(java.lang.String value)
           
 void setBandwidthShare(java.lang.String value)
           
 void setClosing(boolean flag)
          Sets the closing flag
 void setCpuExtra(java.lang.String value)
           
 void setCpuShare(java.lang.String value)
           
 void setDirty(boolean dirty)
           
 void setDnsClass(java.lang.String value)
           
 void setDnsZone(java.lang.String value)
           
 void setDonated(boolean value)
           
 void setEthernet(java.lang.String eth)
           
 void setGateway(java.lang.String value)
           
 void setHostKey(java.lang.String hostKey)
           
static void setHostName(java.util.Properties p, java.lang.String name)
          Sets the host name property on the specified properties list
 void setHostName(java.lang.String name)
          Sets the host name.
 void setLogicalId(ID id)
           
 void setMachineId(ID id)
           
 void setMachineName(java.lang.String name)
          Sets the machine name
 void setMachineType(int t)
           
 void setModifying(boolean flag)
          Sets the modifying flag
 void setMXRecord(java.lang.String value)
           
 void setNewBandwidthExtra(java.lang.String value)
           
 void setNewBandwidthShare(java.lang.String value)
           
 void setNewCpuExtra(java.lang.String value)
           
 void setNewCpuShare(java.lang.String value)
           
 void setNewMemory(int value)
           
 void setNic(java.lang.String nic)
           
 void setNodeType(int nodeType)
           
 void setOpening(boolean flag)
          Sets the opening flag
 void setPhysicalMachine()
           
 void setPoolName(java.lang.String name)
           
 void setPrivateGateway(java.lang.String gw)
           
 void setPrivateIP(java.lang.String privIP)
          Sets the primary private IP Address of this node.
 void setPrivateNetmask(java.lang.String mask)
           
 void setPrivateNetwork(java.lang.String net)
           
 void setProperties(java.util.Properties p)
          Sets property list.
 void setProperty(java.lang.String name, java.lang.String value)
           
 void setPublicIP(java.net.InetAddress address)
           
 void setPublicIP(java.lang.String pubIP)
          Sets the primary public IP Address of this node.
 void setPublicNetmask(java.lang.String mask)
           
 void setPublicNetwork(java.lang.String net)
           
 void setRemoteReservationID(ReservationID rid)
           
 void setReservationID(ReservationID rid)
           
 void setResourceType(ResourceType type)
           
 void setSequence(long sequence)
           
 void setServiceGateway(java.lang.String gw)
          Sets the service gateway
static void setServiceIP(java.util.Properties p, java.lang.String ip)
          Helper method to set the service IP on a properties list.
 void setServiceIP(java.lang.String ip)
          Sets the service IP address.
 void setServiceNetwork(java.lang.String base)
          Sets the service network base
 void setServiceNetworkMask(java.lang.String base)
          Sets the service network mask
 void setSlice(java.lang.String name)
           
 void setSliceID(SliceID sliceID)
           
 void setSliceNumericID(int id)
           
 void setSliverIdx(long sliverIdx)
          Sets the current sliver to which this node is bound.
 void setVirtualMachine()
           
 java.lang.String toString()
           
 void transition(int tostate)
           
 void unsetNaming()
          Cleans out naming state after deallocation.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HP_HACK

public static final boolean HP_HACK
See Also:
Constant Field Values

PropertyMachineName

public static final java.lang.String PropertyMachineName
Name to be used for naming the VM that is created for this node. This name should be valid and unique within a VMM. Machine name can be different from host name: host name is a dns-friendly name.

For an inventory physical machine this is the name given to the machine when it was added to the inventory. For an inventory machine, host name is the current name associated to the machine that is "hosted" on this inventory machine.

See Also:
Constant Field Values

PropertyEthernet

public static final java.lang.String PropertyEthernet
See Also:
Constant Field Values

PropertyNodeUpdates

public static final java.lang.String PropertyNodeUpdates
Property for storing the serialized version of the updates field.

See Also:
Constant Field Values

PropertyCodNodeDN

public static final java.lang.String PropertyCodNodeDN
See Also:
Constant Field Values

PropertyDhcpHWAddress

public static final java.lang.String PropertyDhcpHWAddress
See Also:
Constant Field Values

PropertyDhcpStatements

public static final java.lang.String PropertyDhcpStatements
See Also:
Constant Field Values

PropertyDhcpOption

public static final java.lang.String PropertyDhcpOption
See Also:
Constant Field Values

PropertyDhcpLeaseDN

public static final java.lang.String PropertyDhcpLeaseDN
See Also:
Constant Field Values

PropertyDhcpOptionsDN

public static final java.lang.String PropertyDhcpOptionsDN
See Also:
Constant Field Values

PropertySequence

public static final java.lang.String PropertySequence
See Also:
Constant Field Values

PropertyType

public static final java.lang.String PropertyType
See Also:
Constant Field Values

PropertyNodeType

public static final java.lang.String PropertyNodeType
See Also:
Constant Field Values

PropertyID

public static final java.lang.String PropertyID
See Also:
Constant Field Values

PropertyState

public static final java.lang.String PropertyState
See Also:
Constant Field Values

PropertyStatusMessage

public static final java.lang.String PropertyStatusMessage
See Also:
Constant Field Values

PropertyDonated

public static final java.lang.String PropertyDonated
See Also:
Constant Field Values

PropertyPreferredIP

public static final java.lang.String PropertyPreferredIP
See Also:
Constant Field Values

PropertyPreferredNetwork

public static final java.lang.String PropertyPreferredNetwork
See Also:
Constant Field Values

PropertyPreferredNetmask

public static final java.lang.String PropertyPreferredNetmask
See Also:
Constant Field Values

PropertyPreferredGateway

public static final java.lang.String PropertyPreferredGateway
See Also:
Constant Field Values

PropertyServiceIP

public static final java.lang.String PropertyServiceIP
Service network IP address.

See Also:
Constant Field Values

PropertyServiceNetwork

public static final java.lang.String PropertyServiceNetwork
Service network base.

See Also:
Constant Field Values

PropertyServiceNetworkMask

public static final java.lang.String PropertyServiceNetworkMask
Service network netmask

See Also:
Constant Field Values

PropertyServiceGateway

public static final java.lang.String PropertyServiceGateway
Service network gateway

See Also:
Constant Field Values

PropertyPrivateIP

public static final java.lang.String PropertyPrivateIP
See Also:
Constant Field Values

PropertyPrivateNetwork

public static final java.lang.String PropertyPrivateNetwork
See Also:
Constant Field Values

PropertyPrivateNetmask

public static final java.lang.String PropertyPrivateNetmask
See Also:
Constant Field Values

PropertyPrivateGateway

public static final java.lang.String PropertyPrivateGateway
See Also:
Constant Field Values

PropertyPublicIP

public static final java.lang.String PropertyPublicIP
See Also:
Constant Field Values

PropertyPublicGateway

public static final java.lang.String PropertyPublicGateway
See Also:
Constant Field Values

PropertyPublicNetwork

public static final java.lang.String PropertyPublicNetwork
See Also:
Constant Field Values

PropertyPublicNetmask

public static final java.lang.String PropertyPublicNetmask
See Also:
Constant Field Values

PropertyHostName

public static final java.lang.String PropertyHostName
See Also:
Constant Field Values

PropertyMachineType

public static final java.lang.String PropertyMachineType
See Also:
Constant Field Values

PropertyResourceType

public static final java.lang.String PropertyResourceType
See Also:
Constant Field Values

PropertySliverID

public static final java.lang.String PropertySliverID
See Also:
Constant Field Values

PropertyRealHostID

public static final java.lang.String PropertyRealHostID
See Also:
Constant Field Values

PropertyRealHostName

public static final java.lang.String PropertyRealHostName
See Also:
Constant Field Values

PropertyRealHostIP

public static final java.lang.String PropertyRealHostIP
See Also:
Constant Field Values

PropertyNewHostID

public static final java.lang.String PropertyNewHostID
See Also:
Constant Field Values

PropertyNewHostName

public static final java.lang.String PropertyNewHostName
See Also:
Constant Field Values

PropertyNewHostIP

public static final java.lang.String PropertyNewHostIP
See Also:
Constant Field Values

PropertyComputons

public static final java.lang.String PropertyComputons
See Also:
Constant Field Values

PropertyHostKey

public static final java.lang.String PropertyHostKey
See Also:
Constant Field Values

PropertyPendingOpen

public static final java.lang.String PropertyPendingOpen
See Also:
Constant Field Values

PropertyPendingClose

public static final java.lang.String PropertyPendingClose
See Also:
Constant Field Values

PropertyPendingModify

public static final java.lang.String PropertyPendingModify
See Also:
Constant Field Values

PropertyVmmMemory

public static final java.lang.String PropertyVmmMemory
See Also:
Constant Field Values

PropertyMacs

public static final java.lang.String PropertyMacs
See Also:
Constant Field Values

PropertyConsole

public static final java.lang.String PropertyConsole
See Also:
Constant Field Values

PropertySerial

public static final java.lang.String PropertySerial
See Also:
Constant Field Values

PropertyNic

public static final java.lang.String PropertyNic
See Also:
Constant Field Values

PropertyRoot

public static final java.lang.String PropertyRoot
See Also:
Constant Field Values

PropertyKernel

public static final java.lang.String PropertyKernel
See Also:
Constant Field Values

PropertyCpuModel

public static final java.lang.String PropertyCpuModel
See Also:
Constant Field Values

PropertyCpuSpeed

public static final java.lang.String PropertyCpuSpeed
See Also:
Constant Field Values

PropertyCpuCache

public static final java.lang.String PropertyCpuCache
See Also:
Constant Field Values

PropertyNetSpeed

public static final java.lang.String PropertyNetSpeed
See Also:
Constant Field Values

PropertyNumCpus

public static final java.lang.String PropertyNumCpus
See Also:
Constant Field Values

PropertyDnsClass

public static final java.lang.String PropertyDnsClass
See Also:
Constant Field Values

PropertySlice

public static final java.lang.String PropertySlice
See Also:
Constant Field Values

PropertySliceID

public static final java.lang.String PropertySliceID
See Also:
Constant Field Values

PropertySliceNumericID

public static final java.lang.String PropertySliceNumericID
See Also:
Constant Field Values

PropertyReservationID

public static final java.lang.String PropertyReservationID
See Also:
Constant Field Values

PropertyRemoteReservationID

public static final java.lang.String PropertyRemoteReservationID
See Also:
Constant Field Values

PropertyDnsZone

public static final java.lang.String PropertyDnsZone
See Also:
Constant Field Values

PropertyDnsMXRecord

public static final java.lang.String PropertyDnsMXRecord
See Also:
Constant Field Values

PropertyResourceMemory

public static final java.lang.String PropertyResourceMemory
See Also:
Constant Field Values

PropertyResourceCpuShare

public static final java.lang.String PropertyResourceCpuShare
See Also:
Constant Field Values

PropertyResourceCpuExtra

public static final java.lang.String PropertyResourceCpuExtra
See Also:
Constant Field Values

PropertyResourceBandwidthShare

public static final java.lang.String PropertyResourceBandwidthShare
See Also:
Constant Field Values

PropertyResourceBandwidthExtra

public static final java.lang.String PropertyResourceBandwidthExtra
See Also:
Constant Field Values

PropertyResourceNewMemory

public static final java.lang.String PropertyResourceNewMemory
See Also:
Constant Field Values

PropertyResourceNewCpuShare

public static final java.lang.String PropertyResourceNewCpuShare
See Also:
Constant Field Values

PropertyResourceNewCpuExtra

public static final java.lang.String PropertyResourceNewCpuExtra
See Also:
Constant Field Values

PropertyResourceNewBandwidthShare

public static final java.lang.String PropertyResourceNewBandwidthShare
See Also:
Constant Field Values

PropertyResourceNewBandwidthExtra

public static final java.lang.String PropertyResourceNewBandwidthExtra
See Also:
Constant Field Values

PropertyLogicalId

public static final java.lang.String PropertyLogicalId
See Also:
Constant Field Values

PropertyMachineId

public static final java.lang.String PropertyMachineId
See Also:
Constant Field Values

PropertyNewLogicalId

public static final java.lang.String PropertyNewLogicalId
See Also:
Constant Field Values

PropertyNewMachineId

public static final java.lang.String PropertyNewMachineId
See Also:
Constant Field Values

PropertySaveRestore

public static final java.lang.String PropertySaveRestore
See Also:
Constant Field Values

PropertyNewSaveRestore

public static final java.lang.String PropertyNewSaveRestore
See Also:
Constant Field Values

PropertyPoolName

public static final java.lang.String PropertyPoolName
See Also:
Constant Field Values

PropertyPoolID

public static final java.lang.String PropertyPoolID
See Also:
Constant Field Values

PropertyPoolResourceType

public static final java.lang.String PropertyPoolResourceType
See Also:
Constant Field Values

SaveRestoreNone

public static final int SaveRestoreNone
See Also:
Constant Field Values

SaveRestoreToSave

public static final int SaveRestoreToSave
See Also:
Constant Field Values

SaveRestoreToRestore

public static final int SaveRestoreToRestore
See Also:
Constant Field Values

SaveRestoreSaved

public static final int SaveRestoreSaved
See Also:
Constant Field Values

VmmMemorySlack

public static final int VmmMemorySlack
Additional memory "given" to domain0. (XXX: Hack)

See Also:
Constant Field Values

NodeTypeAll

public static final int NodeTypeAll
See Also:
Constant Field Values

NodeTypeDefault

public static final int NodeTypeDefault
See Also:
Constant Field Values

NodeTypePhysicalMachine

public static final int NodeTypePhysicalMachine
See Also:
Constant Field Values

NodeTypeVirtualMachine

public static final int NodeTypeVirtualMachine
See Also:
Constant Field Values

PropertyAvailable

public static final java.lang.String PropertyAvailable
See Also:
Constant Field Values

aboutToModify

public boolean aboutToModify

aboutToClose

public boolean aboutToClose

forcedClose

public boolean forcedClose

saveRestore

public int saveRestore

newSaveRestore

public int newSaveRestore

properties

protected java.util.Properties properties
Properties field for Node properties not explicitly represented by class fields.


domainZeroMemory

public int domainZeroMemory

nodeType

public int nodeType

id

public NodeID id
All nodes are endowed by creator with an ID. If virtual, the ID is unique among all virtual nodes. If physical, the ID is unique among all physical nodes.


statusMsg

public java.lang.String statusMsg

macAddresses

public java.util.Vector macAddresses
Name and address info: these are exposed to the Service Manager. For now, a COD node has one (mandatory) private IP address, and at most one (optional) public IP address.


privateIP

public java.net.InetAddress privateIP

publicIP

public java.net.InetAddress publicIP

prefferedIP

public java.lang.String prefferedIP

hostName

public java.lang.String hostName

machineType

public int machineType
Node HW attributes: these are exposed to Service Manager.


resourceType

public ResourceType resourceType

memory

public int memory

sliverIdx

public long sliverIdx

realHost

public Node realHost

realHostID

public NodeID realHostID

realHostName

public java.lang.String realHostName

realHostIP

public java.lang.String realHostIP

newHost

public Node newHost

newHostID

public NodeID newHostID

newHostName

public java.lang.String newHostName

newHostIP

public java.lang.String newHostIP

newResourceType

public ResourceType newResourceType

computons

public int computons

hostKey

public java.lang.String hostKey

originalNode

public Node originalNode
The original node: used during modification Should not be persisted


updates

public Node updates
Node representing the updates to this node (used during modification) Should not be persisted


logicalId

public ID logicalId
Logical ID for this node


machineId

public ID machineId
Machine ID for this node


newLogicalId

public ID newLogicalId

newMachineId

public ID newMachineId

dirty

protected boolean dirty

growing

public long[] growing
Field for caching shares information. Do not persist.


sequence

protected long sequence
Sequence number. Incremented on every configuration operation.


reservation

public IReservation reservation

available

protected byte available
Constructor Detail

Node

public Node()

Node

public Node(NodeID nid,
            java.lang.String hostName)

Node

public Node(NodeID id,
            Node realhost)

Node

public Node(NodeID id,
            Node realhost,
            int computons,
            int basis)
Constructs a descriptor for a virtual node to be hosted on a physical node.

Method Detail

setVirtualMachine

public void setVirtualMachine()

isVirtualMachine

public boolean isVirtualMachine()

setPhysicalMachine

public void setPhysicalMachine()

isPhysicalMachine

public boolean isPhysicalMachine()

configIP

public void configIP(java.net.InetAddress privateIP,
                     java.net.InetAddress publicIP)
Establishes IP addressing info for this node. E.g., called by AuthoritySlice when a node joins a slice.

Parameters:
privAddr - private IP address
publicIP - public (external) IP address or null

unsetNaming

public void unsetNaming()
Cleans out naming state after deallocation. XXX: This method is a hack. Come back once we have PhysicalControl


addMAC

public void addMAC(java.lang.String mac)
Registers a MAC address for a node. E.g., called by AuthoritySlice when a virtual node joins a slice.

Parameters:
mac - MAC address

clone

public java.lang.Object clone()
Node clone retains only the info exported to a Service Manager. Used on authority to make leases. If this node is virtual, hide that fact.

Overrides:
clone in class java.lang.Object

transition

public void transition(int tostate)

clearStatus

public void clearStatus()
Clears the state and status of this node, e.g., when released back to free pool or allocated to another resource set.


activate

public void activate()
Indicates that a node is active.


deactivate

public void deactivate()
Indicates that a node is inactive.


active

public boolean active()
Predicate: is this node active?

Returns:
true iff predicate condition is true

opening

public boolean opening()
Predicate: is this node opening (starting or booting)?

Returns:
true iff predicate condition is true

closing

public boolean closing()
Predicate: is this node closing (shutting down)?

Returns:
true iff predicate condition is true

closed

public boolean closed()
Predicate: is this node closed (shut down or failed)?

Returns:
true iff predicate condition is true

failed

public boolean failed()
Predicate: is this node failed?

Returns:
true iff predicate condition is true

fail

public void fail()

down

public boolean down()
Predicate: is this node down? (synonym for closed).

Returns:
true iff predicate condition is true

equals

public boolean equals(java.lang.Object o)
Equality predicate.

Overrides:
equals in class java.lang.Object
Parameters:
o - some other node

getHostKey

public java.lang.String getHostKey()
Returns the public key used by sshd running on this node


setHostKey

public void setHostKey(java.lang.String hostKey)

getRealHost

public Node getRealHost()
Gets the real host of this node if it is virtual, else null

Returns:
host node object, or null if none

getSliverIdx

public long getSliverIdx()
Returns the current sliver to which this node is bound. VM only.

Returns:
long

setSliverIdx

public void setSliverIdx(long sliverIdx)
Sets the current sliver to which this node is bound. VM only.


getNodeID

public NodeID getNodeID()
Gets the Node ID of this node

Returns:
node ID

getPrivateIPaddr

public java.lang.String getPrivateIPaddr()
Gets the primary private IP Address of this node.

Returns:
private IP address as a string

getPublicIPaddr

public java.lang.String getPublicIPaddr()
Gets the primary public IP Address of this node.

Returns:
IP address as string, or null if no public address

getPrivateInetAddr

public java.net.InetAddress getPrivateInetAddr()
Gets the primary private IP Address of this node.

Returns:
private IP address

getPublicInetAddr

public java.net.InetAddress getPublicInetAddr()
Gets the primary public IP Address of this node.

Returns:
IP address or null if no public address

setPrivateIP

public void setPrivateIP(java.lang.String privIP)
                  throws java.lang.Exception
Sets the primary private IP Address of this node.

Parameters:
privIP - private IP address as a string
Throws:
java.lang.Exception

setPublicIP

public void setPublicIP(java.lang.String pubIP)
                 throws java.lang.Exception
Sets the primary public IP Address of this node.

Parameters:
pubIP - public IP address as a string
Throws:
java.lang.Exception

setPublicIP

public void setPublicIP(java.net.InetAddress address)

getProperty

public java.lang.String getProperty(java.lang.String name)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)

setProperties

public void setProperties(java.util.Properties p)
Sets property list. No merge: destroys old one.

Parameters:
properties - the new property list

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setMachineType

public void setMachineType(int t)

setResourceType

public void setResourceType(ResourceType type)

getResourceType

public ResourceType getResourceType()

save

public java.util.Properties save()
                          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into a properties list.

Specified by:
save in interface ISerialize
Returns:
properties list representing this object
Throws:
java.lang.Exception

saveMacs

public java.lang.String saveMacs()

resetMacs

protected void resetMacs(java.lang.String s)
                  throws java.lang.Exception
Throws:
java.lang.Exception

save

public void save(java.util.Properties p)
          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into the given properties list.

Specified by:
save in interface ISerialize
Parameters:
p - properties list to serialize the object into
Throws:
java.lang.Exception

reset

public void reset(java.util.Properties p)
           throws java.lang.Exception
Description copied from interface: ISerialize
De-serializes the object from the given properties list.

Specified by:
reset in interface ISerialize
Parameters:
p - properties list containing the serialized version of the object
Throws:
java.lang.Exception

revisit

public void revisit(IActorIdentity actor,
                    java.util.Properties properties)
             throws java.lang.Exception
Throws:
java.lang.Exception

getState

public int getState()

getStateString

public java.lang.String getStateString()
Gets the state of this node as a short string.

Returns:
state

getStatusMessage

public java.lang.String getStatusMessage()
Gets the state of this node as a (possibly) longer string.

Returns:
state

consumeStateMsg

public java.lang.String consumeStateMsg()

setSlice

public void setSlice(java.lang.String name)

getSlice

public java.lang.String getSlice()

setSliceNumericID

public void setSliceNumericID(int id)

getSliceNumericID

public int getSliceNumericID()

setSliceID

public void setSliceID(SliceID sliceID)

getSliceID

public SliceID getSliceID()

setReservationID

public void setReservationID(ReservationID rid)

setRemoteReservationID

public void setRemoteReservationID(ReservationID rid)

getReservationID

public ReservationID getReservationID()

getRemoteReservationID

public ReservationID getRemoteReservationID()

setPublicNetmask

public void setPublicNetmask(java.lang.String mask)

setPublicNetwork

public void setPublicNetwork(java.lang.String net)

setPrivateNetmask

public void setPrivateNetmask(java.lang.String mask)

setPrivateNetwork

public void setPrivateNetwork(java.lang.String net)

setPrivateGateway

public void setPrivateGateway(java.lang.String gw)

setNic

public void setNic(java.lang.String nic)

setDnsClass

public void setDnsClass(java.lang.String value)

setDnsZone

public void setDnsZone(java.lang.String value)

setMXRecord

public void setMXRecord(java.lang.String value)

setGateway

public void setGateway(java.lang.String value)

setCpuShare

public void setCpuShare(java.lang.String value)

getCpuShare

public java.lang.String getCpuShare()

setCpuExtra

public void setCpuExtra(java.lang.String value)

getCpuExtra

public java.lang.String getCpuExtra()

setBandwidthShare

public void setBandwidthShare(java.lang.String value)

getBandwidthShare

public java.lang.String getBandwidthShare()

setBandwidthExtra

public void setBandwidthExtra(java.lang.String value)

getBandwidthExtra

public java.lang.String getBandwidthExtra()

setNewCpuShare

public void setNewCpuShare(java.lang.String value)

getNewCpuShare

public java.lang.String getNewCpuShare()

setNewCpuExtra

public void setNewCpuExtra(java.lang.String value)

getNewCpuExtra

public java.lang.String getNewCpuExtra()

setNewBandwidthShare

public void setNewBandwidthShare(java.lang.String value)

getNewBandwidthShare

public java.lang.String getNewBandwidthShare()

setNewBandwidthExtra

public void setNewBandwidthExtra(java.lang.String value)

getNewBandwidthExtra

public java.lang.String getNewBandwidthExtra()

setNewMemory

public void setNewMemory(int value)

getNewMemory

public int getNewMemory()

merge

public void merge(Node other)

relocate

public void relocate(Node newHost)

completeModify

public void completeModify()

releaseToPool

public void releaseToPool(BinPool pool)

copy

public Node copy()
          throws java.lang.Exception
Throws:
java.lang.Exception

getLogicalId

public ID getLogicalId()

getMachineId

public ID getMachineId()

setLogicalId

public void setLogicalId(ID id)

setMachineId

public void setMachineId(ID id)

hasPending

public boolean hasPending()

getProperties

public java.util.Properties getProperties()

getPublicIP

public java.lang.String getPublicIP()

setPoolName

public void setPoolName(java.lang.String name)

getPoolName

public java.lang.String getPoolName()

setDirty

public void setDirty(boolean dirty)

isDirty

public boolean isDirty()

setMachineName

public void setMachineName(java.lang.String name)
Sets the machine name

Parameters:
name - machine name

getMachineName

public java.lang.String getMachineName()
Returns the machine name

Returns:

setHostName

public void setHostName(java.lang.String name)
Sets the host name.

Parameters:
name - host name

getHostName

public java.lang.String getHostName()
Returns the host name.

Returns:

setHostName

public static void setHostName(java.util.Properties p,
                               java.lang.String name)
Sets the host name property on the specified properties list

Parameters:
p - properties list
name - host name

setServiceIP

public void setServiceIP(java.lang.String ip)
Sets the service IP address.

Parameters:
ip - the service IP address

getServiceIP

public java.lang.String getServiceIP()
Returns the service IP address.

Returns:

setServiceNetwork

public void setServiceNetwork(java.lang.String base)
Sets the service network base

Parameters:
base - the service network base address (a valid ip)

getServiceNetwork

public java.lang.String getServiceNetwork()
Returns the service network base

Returns:

setServiceNetworkMask

public void setServiceNetworkMask(java.lang.String base)
Sets the service network mask

Parameters:
base - the service network mask

getServiceNetworkMask

public java.lang.String getServiceNetworkMask()
Returns the service network mask

Returns:

setServiceGateway

public void setServiceGateway(java.lang.String gw)
Sets the service gateway

Parameters:
gw - the service gateway

getServiceGateway

public java.lang.String getServiceGateway()
Returns the service network mask

Returns:

setServiceIP

public static void setServiceIP(java.util.Properties p,
                                java.lang.String ip)
Helper method to set the service IP on a properties list.

Parameters:
p - properties list
ip - IP address

getEthernet

public java.lang.String getEthernet()

setEthernet

public void setEthernet(java.lang.String eth)

isOpening

public boolean isOpening()
Returns true if this node is the process of being opened.

Returns:

setOpening

public void setOpening(boolean flag)
Sets the opening flag

Parameters:
flag - flag value

isClosing

public boolean isClosing()
Returns true if this node is the process of being closed.

Returns:

isClosed

public boolean isClosed()
Returns true if this node is the process of being closed.

Returns:

setClosing

public void setClosing(boolean flag)
Sets the closing flag

Parameters:
flag - flag value

isModifying

public boolean isModifying()
Returns true if this node is the process of being modified.

Returns:

setModifying

public void setModifying(boolean flag)
Sets the modifying flag

Parameters:
flag - flag value

isDonated

public boolean isDonated()

setDonated

public void setDonated(boolean value)

getSequence

public long getSequence()

setSequence

public void setSequence(long sequence)

getPoolID

public java.lang.String getPoolID()

getPoolResourceType

public java.lang.String getPoolResourceType()

isAvailable

public boolean isAvailable()

setAvailable

public void setAvailable(boolean value)

getNodeType

public int getNodeType()

setNodeType

public void setNodeType(int nodeType)


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.