SAFplus Runtime Director API  3.0.5
aspAmfEntity.AmfEntity Class Reference

Base class that models all SAF Entities. More...

Inheritance diagram for aspAmfEntity.AmfEntity:

Public Member Functions

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

 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
 

Detailed Description

Base class that models all SAF Entities.

Never directly created.

Derived class entities can be either created (by clusterinfo) as a representation of cluster (SAF AMF) state and configuration, or can be created by the user. The purpose of user-created entities is to eventually tell the system actually create the entities in the SAF AMF using the aspAmf.Session.InstallApp API.

Certain member functions (like isProtected, isOk, isRunning) only have meaning when used on objects that represent actual cluster state. If called on user-created entities, an exception will be raised.

Constructor & Destructor Documentation

def aspAmfEntity.AmfEntity.__init__ (   self,
  typee,
  name 
)

Constructor Parameters: typee: The AMF type of this entity.

See the globals defined in this file (NodeType,AppType,ServiceGroupType, etc) name: The name of this entity

Member Function Documentation

def aspAmfEntity.AmfEntity.__cmp__ (   self,
  other 
)

The comparison operator simply compares entity names since the AMF mandates that entity names are unique.

def aspAmfEntity.AmfEntity.__hash__ (   self)
def aspAmfEntity.AmfEntity.__str__ (   self)
def aspAmfEntity.AmfEntity.adminState (   self)

Return the administrative status of this entity.

def aspAmfEntity.AmfEntity.copyLocalState (   self,
  entity 
)

Copy the locally kept state in this entity from one entity to another of the same type.

For example, node IP addresses, username/pw, ASP directory are all locally kept state.

Parameters
entityThe entity to copy data from
def aspAmfEntity.AmfEntity.enabled (   self)

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).

def aspAmfEntity.AmfEntity.isIdle (   self)

Return True if the entity is running but has no assigned work, or None if the concept of 'idle' is not applicable.

def aspAmfEntity.AmfEntity.isOk (   self)

Return True if the entity is 100%.

def aspAmfEntity.AmfEntity.isProtected (   self)

Return true if this service instance has at least 1 running standby assignment, None if not applicable.

def aspAmfEntity.AmfEntity.isRunning (   self)

Return true if this entity is running.

This indicates whether basic services are available, not whether the entity is 100%

def aspAmfEntity.AmfEntity.setConfig (   self,
  Cconfig 
)
def aspAmfEntity.AmfEntity.setInitialState (   self,
  state 
)

Set the initial state of this entity (call before you pass the object to aspAmf)

Parameters
stateObject of type AmfEntityStateChange
def aspAmfEntity.AmfEntity.setState (   self,
  Cstate 
)
def aspAmfEntity.AmfEntity.setStatus (   self,
  Cstate 
)

Member Data Documentation

aspAmfEntity.AmfEntity.associatedData
aspAmfEntity.AmfEntity.cconfig

SAF AMF configuration of the entity.

Note that this variable only exists for entities that are pulled out of a running cluster (as opposed to created by you). Various Entity member function use this variable and so will raise an exception if the member function is used on an entity that is not part of the AMF.

aspAmfEntity.AmfEntity.cstatus
aspAmfEntity.AmfEntity.initialState
aspAmfEntity.AmfEntity.name

Name of this entity as known by the AMF.

aspAmfEntity.AmfEntity.type

SAF AMF type of the entity (see module-global variable that define available types)