SAFplus Runtime Director API  3.0.5
aspAmfEntity.AmfNode Class Reference

Class that models a SAF Node. More...

Inheritance diagram for aspAmfEntity.AmfNode:
Collaboration diagram for aspAmfEntity.AmfNode:

Public Member Functions

def __init__
 
def setIntraclusterAccess
 Set parameters needed to ssh and scp to this node from other nodes in the cluster. More...
 
def copyLocalState
 
def IsUp
 Deprecated, use isPresent() or isRunning() More...
 
def isPresent
 Return true if this node is there. More...
 
def isRunning
 Return True if this node is running ASP. More...
 
def isIdle
 Return True if it is running but has not assigned work. More...
 
def safClass
 Return the SAF class A,B,C, or D. More...
 
def subClass
 Return a string containing the subclass or '' if there is no subclass. More...
 
def isActive
 Return true if this node has any active SUs. More...
 
def isStandby
 Return true if this node has any standby SUs. More...
 
def haRole
 Return 'none', 'active', 'standby', or 'active/standby' depending on the roles of SUs on this node. More...
 
def isProtected
 Return true if every SG on this node is protected. More...
 
def failureCount
 Return the number of SU failovers that have occurred on this node since the last reset. More...
 
def unpickleAssociatedData
 Private function to unpack data about this node that will be stored in the AMF db. More...
 
def pickleAssociatedData
 Private function to pack up data about this node that will be stored in the AMF db. More...
 
def __str__
 
def __len__
 
def __getitem__
 
def __setitem__
 
def __iter__
 
def __contains__
 
- Public Member Functions inherited from aspAmfEntity.AmfEntity
def __init__
 Constructor Parameters: typee: The AMF type of this entity. More...
 
def __cmp__
 The comparison operator simply compares entity names since the AMF mandates that entity names are unique. More...
 
def __hash__
 
def __str__
 
def setInitialState
 Set the initial state of this entity (call before you pass the object to aspAmf) More...
 
def copyLocalState
 Copy the locally kept state in this entity from one entity to another of the same type. More...
 
def setConfig
 
def setState
 
def setStatus
 
def isRunning
 Return true if this entity is running. More...
 
def isProtected
 Return true if this service instance has at least 1 running standby assignment, None if not applicable. More...
 
def isIdle
 Return True if the entity is running but has no assigned work, or None if the concept of 'idle' is not applicable. More...
 
def isOk
 Return True if the entity is 100%. More...
 
def adminState
 Return the administrative status of this entity. More...
 
def enabled
 Return True if this entity is enabled, False if not enabled, or none if not applicable (for example the entity has not been applied into the AMF). More...
 

Public Attributes

 slot
 What slot this node is in (if a chassis is being used), or a unique small integer identifier for this node (from asp.conf) More...
 
 su
 List of SAF AMF service units that exist on this node. More...
 
 aspdir
 Location of ASP that is running on this node. More...
 
 aspVersion
 
 localIp
 IP address of this node on the cluster's private intranet. More...
 
 localUser
 SSH username configured on this node (in the cluster's private intranet only). More...
 
 localPasswd
 SSH password configured on this node (in the cluster's private intranet only). More...
 
- Public Attributes inherited from aspAmfEntity.AmfEntity
 type
 SAF AMF type of the entity (see module-global variable that define available types) More...
 
 name
 Name of this entity as known by the AMF. More...
 
 associatedData
 
 initialState
 
 cconfig
 SAF AMF configuration of the entity. More...
 
 cstatus
 

Static Public Attributes

dictionary classXlat = { asp.CL_AMS_NODE_CLASS_A: "A", asp.CL_AMS_NODE_CLASS_B: "Controller", asp.CL_AMS_NODE_CLASS_C: "Worker", asp.CL_AMS_NODE_CLASS_D: "D" }
 Translation of some underlying enums to understandable strings. More...
 

Detailed Description

Class that models a SAF Node.

A node is an individual machine; blade in a blade server or a pizza box in a rack.

Constructor & Destructor Documentation

def aspAmfEntity.AmfNode.__init__ (   self,
  name,
  slot 
)

Member Function Documentation

def aspAmfEntity.AmfNode.__contains__ (   self,
  item 
)
def aspAmfEntity.AmfNode.__getitem__ (   self,
  key 
)
def aspAmfEntity.AmfNode.__iter__ (   self)
def aspAmfEntity.AmfNode.__len__ (   self)
def aspAmfEntity.AmfNode.__setitem__ (   self,
  key,
  value 
)
def aspAmfEntity.AmfNode.__str__ (   self)
def aspAmfEntity.AmfNode.copyLocalState (   self,
  entity 
)
def aspAmfEntity.AmfNode.failureCount (   self)

Return the number of SU failovers that have occurred on this node since the last reset.

def aspAmfEntity.AmfNode.haRole (   self,
  sg = None 
)

Return 'none', 'active', 'standby', or 'active/standby' depending on the roles of SUs on this node.

def aspAmfEntity.AmfNode.isActive (   self,
  sg = None 
)

Return true if this node has any active SUs.

def aspAmfEntity.AmfNode.isIdle (   self)

Return True if it is running but has not assigned work.

def aspAmfEntity.AmfNode.isPresent (   self)

Return true if this node is there.

def aspAmfEntity.AmfNode.isProtected (   self)

Return true if every SG on this node is protected.

def aspAmfEntity.AmfNode.isRunning (   self)

Return True if this node is running ASP.

def aspAmfEntity.AmfNode.isStandby (   self,
  sg = None 
)

Return true if this node has any standby SUs.

def aspAmfEntity.AmfNode.IsUp (   self)

Deprecated, use isPresent() or isRunning()

def aspAmfEntity.AmfNode.pickleAssociatedData (   self)

Private function to pack up data about this node that will be stored in the AMF db.

def aspAmfEntity.AmfNode.safClass (   self)

Return the SAF class A,B,C, or D.

def aspAmfEntity.AmfNode.setIntraclusterAccess (   self,
  ip,
  user,
  passwd,
  aspdir 
)

Set parameters needed to ssh and scp to this node from other nodes in the cluster.

The best-practices cluster configuration is to have each node interconnected via an isolated ethernet network (and to have another interface for external connections). This info pertains to access to the node through this network. By doing it this way, you can ensure security via physical mechanisms. Of course if you don't have an isolated intracluster network then you can use network-wide IP addresses, usernames, passwords, etc. However, the cluster will not be considered as secure since the password you pass into this routine will be stored in cleartext in RAM and on disk on other nodes in the cluster.

Note that this information is only needed for software deployment. If you are not using the software deployment feature these values need not be set. Also note that you don't need to pass in a valid password if you configure SSH security keys on each node to allow passwordless login from other nodes in the cluster.

Parameters
ipA string containing the intracluster IP address of this node
userA string containing Linux username on this node
passwdA string containing the password for the user
aspdirString containing the path to ASP installation on this node (ex /root/asp)
def aspAmfEntity.AmfNode.subClass (   self)

Return a string containing the subclass or '' if there is no subclass.

def aspAmfEntity.AmfNode.unpickleAssociatedData (   self,
  s 
)

Private function to unpack data about this node that will be stored in the AMF db.

Member Data Documentation

aspAmfEntity.AmfNode.aspdir

Location of ASP that is running on this node.

aspAmfEntity.AmfNode.aspVersion
dictionary aspAmfEntity.AmfNode.classXlat = { asp.CL_AMS_NODE_CLASS_A: "A", asp.CL_AMS_NODE_CLASS_B: "Controller", asp.CL_AMS_NODE_CLASS_C: "Worker", asp.CL_AMS_NODE_CLASS_D: "D" }
static

Translation of some underlying enums to understandable strings.

aspAmfEntity.AmfNode.localIp

IP address of this node on the cluster's private intranet.

aspAmfEntity.AmfNode.localPasswd

SSH password configured on this node (in the cluster's private intranet only).

Note that if SSH trusting is enabled between the nodes in the cluster, then this password does not have to be configured. For use in software deployment.

aspAmfEntity.AmfNode.localUser

SSH username configured on this node (in the cluster's private intranet only).

Note that if SSH trusting is enabled between the nodes in the cluster, then this username does not have to be configured. For use in software deployment.

aspAmfEntity.AmfNode.slot

What slot this node is in (if a chassis is being used), or a unique small integer identifier for this node (from asp.conf)

aspAmfEntity.AmfNode.su

List of SAF AMF service units that exist on this node.