orca.cod
Class AuthorityCodSlice

java.lang.Object
  extended by orca.shirako.kernel.Slice
      extended by orca.cod.CodSlice
          extended by orca.cod.AuthorityCodSlice
All Implemented Interfaces:
java.lang.Cloneable, ISerialize, ISlice

public class AuthorityCodSlice
extends CodSlice

Attributes and state for a COD slice. One CodSlice object is attached to each COD instance of slices.Slice.

On an Authority, the CodSlice is created on first allocation of resources for the slice. Its attributes are determined from the Slice properties and their interaction with Site parameters and policies.


Field Summary
static java.lang.String DefaultHostPrefix
           
static java.lang.String DnsClassValue
           
 java.lang.String macPrefix
          MAC prefix for virtual machines in this slice.
 java.lang.String mx
           
protected  java.lang.String nic
           
 java.net.InetAddress privateBase
          State pertaining to the private subnet allocated to this slice.
protected  java.lang.String privateBaseString
           
protected  java.lang.String privateGatewayString
           
 java.net.InetAddress privateMask
           
protected  java.lang.String privateMaskString
           
static java.lang.String PropertyDnsClass
           
static java.lang.String PropertyDnsMXRecord
           
static java.lang.String PropertyDnsZoneName
           
static java.lang.String PropertyHostKey
           
static java.lang.String PropertyHostnameCounter
           
static java.lang.String PropertyMacPrefix
           
static java.lang.String PropertyNic
           
static java.lang.String PropertyPrivateNetworkBase
           
static java.lang.String PropertyPrivateNetworkMask
           
static java.lang.String PropertyPrivateNetworkPool
           
static java.lang.String PropertyPublicNetworkBase
           
static java.lang.String PropertyPublicNetworkGateway
           
static java.lang.String PropertyPublicNetworkMask
           
static java.lang.String PropertyPublicNetworkPool
           
static java.lang.String PropertySliceID
           
 java.net.InetAddress publicBase
          State pertaining to the public subnet allocated to this slice.
protected  java.lang.String publicBaseString
           
 java.net.InetAddress publicGateway
           
protected  java.lang.String publicGatewayString
           
 IPList publicIPSpace
           
 java.net.InetAddress publicMask
           
protected  java.lang.String publicMaskString
           
 java.lang.String zone
          DNS naming info for public nodes in this slice.
 
Fields inherited from class orca.cod.CodSlice
PropertyHostPrefix
 
Fields inherited from class orca.shirako.kernel.Slice
controller, description, guard, guid, owner, PropertyClass, PropertyController, PropertyControllerClass, PropertyDescription, PropertyGuard, PropertyGuid, PropertyName, PropertyOwner, PropertyProperties, PropertyResourceType, PropertyType, reservations, resourceType, rsrcdata, slicename, type
 
Constructor Summary
AuthorityCodSlice()
           
AuthorityCodSlice(SliceID guid, java.lang.String sliceName, ResourceData properties, int sliceID)
           
AuthorityCodSlice(java.lang.String sliceName, ResourceData properties, int sliceID)
          COD slice properties, set on Authority on configure, never changed.
 
Method Summary
 void configDNS(java.lang.String zone, java.lang.String mx)
          Install basic DNS naming info: DNS zone, MX record, default host prefix.
 void configVMParams(java.lang.String defaultMacPrefix)
          Installs VM parameters for new virtual machines.
protected  void doRevisit(IReservation reservation, Node node)
           
 java.lang.String getMXRecord()
           
 java.net.InetAddress getPrivateBase()
          Gets the private subnet of this slice.
 java.net.InetAddress getPublicBase()
          Gets the public subnet of this slice.
 java.lang.String getZone()
           
 void installPrivateSubnet(java.net.InetAddress base, java.net.InetAddress netmask, RecyclePool privNums, java.lang.String privateGateway)
          Set address info for the private part of this slice's IP address space.
 void installPublicIPSpace(IPList publicIPSpace, java.lang.String gateway)
          Set information about sparse public IP address space.
 void installPublicSubnet(java.net.InetAddress base, java.net.InetAddress netmask, java.net.InetAddress gateway, RecyclePool pubNums)
          Set address info for the public part of this slice's IP address space.
 void reset(java.util.Properties properties)
          Reset slice parameters from property list, for recovery.
 void revisit(Actor actor, java.util.Properties properties)
           
 void revisit(IReservation reservation, Node node)
          Reserve all soft resources held by this Node.
 void save(java.util.Properties p)
          Serializes the object into the given properties list.
 void setHostKey(java.lang.String key)
           
 void setNic(java.lang.String nic)
           
 void transferIn(Node node)
           
 void transferIn(ResourceReservation reservation, Node node)
          Transfer a node into a slice.
 void transferOut(IReservation reservation, Node node)
          Transfers a node out of a slice.
 void transferOut(Node node)
           
 
Methods inherited from class orca.cod.CodSlice
getHostPrefix, setHostPrefix
 
Methods inherited from class orca.shirako.kernel.Slice
cloneRequest, createInstance, getConfigurationProperties, getController, getDescription, getLocalProperties, getName, getName, getOwner, getRequestProperties, getReservations, getReservationsArray, getResourceData, getResourceProperties, getResourceType, getSliceID, getSliceID, Guard, isBrokerClient, isBrokerClient, isClient, isClient, isEmpty, isInventory, isInventory, prepare, register, revisit, save, setBrokerClient, setClient, setController, setDescription, setGuard, setInventory, setName, setOwner, setResourceData, setResourceType, softLookup, toString, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PropertyPrivateNetworkBase

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

PropertyPrivateNetworkMask

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

PropertyPrivateNetworkPool

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

PropertyPublicNetworkBase

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

PropertyPublicNetworkMask

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

PropertyPublicNetworkGateway

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

PropertyPublicNetworkPool

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

PropertyDnsZoneName

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

PropertyDnsMXRecord

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

PropertyDnsClass

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

PropertyHostnameCounter

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

PropertyMacPrefix

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

PropertyNic

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

PropertyHostKey

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

DefaultHostPrefix

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

DnsClassValue

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

PropertySliceID

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

publicBase

public java.net.InetAddress publicBase
State pertaining to the public subnet allocated to this slice. "Public" reservations (i.e., head nodes) have addresses allocated from the public subnet.


publicMask

public java.net.InetAddress publicMask

publicGateway

public java.net.InetAddress publicGateway

publicBaseString

protected java.lang.String publicBaseString

publicMaskString

protected java.lang.String publicMaskString

publicGatewayString

protected java.lang.String publicGatewayString

publicIPSpace

public IPList publicIPSpace

privateBase

public java.net.InetAddress privateBase
State pertaining to the private subnet allocated to this slice. All nodes have addresses allocated from the private subnet.


privateMask

public java.net.InetAddress privateMask

privateBaseString

protected java.lang.String privateBaseString

privateMaskString

protected java.lang.String privateMaskString

privateGatewayString

protected java.lang.String privateGatewayString

nic

protected java.lang.String nic

zone

public java.lang.String zone
DNS naming info for public nodes in this slice.


mx

public java.lang.String mx

macPrefix

public java.lang.String macPrefix
MAC prefix for virtual machines in this slice.

Constructor Detail

AuthorityCodSlice

public AuthorityCodSlice()

AuthorityCodSlice

public AuthorityCodSlice(java.lang.String sliceName,
                         ResourceData properties,
                         int sliceID)
COD slice properties, set on Authority on configure, never changed. ipNetworkNumber: private subnet prefix ipNetmaskNumber: private subnet mask ipPubNetworkNumber: public subnet prefix (may be shared) ipPubNetmaskNumber: public subnet mask zoneName: DNS zone name (may be shared) hostnamePrefix: host prefix, may be supplied by client. The prefix must be unique if the DNS zone is shared (not checked). MX: DNS MX record.


AuthorityCodSlice

public AuthorityCodSlice(SliceID guid,
                         java.lang.String sliceName,
                         ResourceData properties,
                         int sliceID)
Method Detail

installPublicIPSpace

public void installPublicIPSpace(IPList publicIPSpace,
                                 java.lang.String gateway)
Set information about sparse public IP address space. Mandatory.

Parameters:
publicIPSpace - List of IP addresses to draw from

installPublicSubnet

public void installPublicSubnet(java.net.InetAddress base,
                                java.net.InetAddress netmask,
                                java.net.InetAddress gateway,
                                RecyclePool pubNums)
                         throws java.lang.Exception
Set address info for the public part of this slice's IP address space. Mandatory.

Parameters:
base - IP address in network byte order
netmask - netmask in network byte order
pubNums - pool of node numbers for visible nodes
Throws:
java.lang.Exception

installPrivateSubnet

public void installPrivateSubnet(java.net.InetAddress base,
                                 java.net.InetAddress netmask,
                                 RecyclePool privNums,
                                 java.lang.String privateGateway)
                          throws java.lang.Exception
Set address info for the private part of this slice's IP address space. Mandatory.

Parameters:
base - IP address in network byte order
netmask - netmask in network byte order
Throws:
java.lang.Exception

configDNS

public void configDNS(java.lang.String zone,
                      java.lang.String mx)
               throws java.lang.Exception
Install basic DNS naming info: DNS zone, MX record, default host prefix. Mandatory.

Parameters:
zone - DNS zone for this virtual cluster
mx - MX record
Throws:
exception - if misconfigured, misused, or buggy
java.lang.Exception

setHostKey

public void setHostKey(java.lang.String key)

transferIn

public void transferIn(Node node)
                throws java.lang.Exception
Throws:
java.lang.Exception

transferOut

public void transferOut(Node node)
                 throws java.lang.Exception
Throws:
java.lang.Exception

transferIn

public void transferIn(ResourceReservation reservation,
                       Node node)
                throws java.lang.Exception
Transfer a node into a slice. Mark the node with an idle hostname and IP address, etc.

Overrides:
transferIn in class CodSlice
Parameters:
node - the node object
resprop - reservation properties
Throws:
java.lang.Exception

transferOut

public void transferOut(IReservation reservation,
                        Node node)
                 throws java.lang.Exception
Transfers a node out of a slice.

Overrides:
transferOut in class CodSlice
node - the node object
Throws:
java.lang.Exception

getPublicBase

public java.net.InetAddress getPublicBase()
Gets the public subnet of this slice.

Returns:
base IP address or null if no public subnet

getPrivateBase

public java.net.InetAddress getPrivateBase()
Gets the private subnet of this slice.

Returns:
base IP address

configVMParams

public void configVMParams(java.lang.String defaultMacPrefix)
Installs VM parameters for new virtual machines. Optional. Called from Site to configure this AuthoritySlice for VMs.

Parameters:
defaultMacPrefix - default prefix for synthetic ether MACs

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
Overrides:
save in class Slice
Parameters:
p - properties list to serialize the object into
Throws:
java.lang.Exception

reset

public void reset(java.util.Properties properties)
           throws java.lang.Exception
Reset slice parameters from property list, for recovery. After this reset, still need to reset mutable state (e.g., address allocations) by visiting all nodes.

Specified by:
reset in interface ISerialize
Overrides:
reset in class Slice
Parameters:
properties - properties list containing the serialized version of the object
Throws:
exception - if required property is missing
java.lang.Exception

revisit

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

revisit

public void revisit(IReservation reservation,
                    Node node)
             throws java.lang.Exception
Reserve all soft resources held by this Node.

Overrides:
revisit in class CodSlice
Parameters:
node - the node
resprop - reservation properties
Throws:
exception
java.lang.Exception

doRevisit

protected void doRevisit(IReservation reservation,
                         Node node)
                  throws java.lang.Exception
Throws:
java.lang.Exception

setNic

public void setNic(java.lang.String nic)

getZone

public java.lang.String getZone()

getMXRecord

public java.lang.String getMXRecord()


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