SAFplus Runtime Director API
3.0.5
|
The aspAmf module centralizes all communications with the ASP AMF C layer. More...
Classes | |
class | AmfError |
Basic error exception class for AMF problems. More... | |
class | Session |
Interface into ASP Availability Management Framework (AMF) functionality. More... | |
Functions | |
def | EntityRef |
Build an entity reference tuple out of the entity type and its instance name This is really just a wrapper for creating a python tuple. More... | |
def | auditLog |
def | getEntityName |
def | SetCEntity |
Sets the C level "Entity" object to an entity. More... | |
def | ErrCode |
Strip the component off of an ASP return code. More... | |
def | exc2ret |
def | AspExcHandler |
def | ChkAspErr |
Internal function to check for C level errors. More... | |
def | Test |
Internal module unit test. More... | |
def | TestCreate |
Internal module unit test. More... | |
def | TestGetConfig |
Internal module unit test. More... | |
Variables | |
string | AUDIT_LOG_PREPEND_STR = "Audit Log : " |
CpuLoadMetric = asp.CL_METRIC_CPU | |
Identify CPU Load types. More... | |
The aspAmf module centralizes all communications with the ASP AMF C layer.
The functions are divided into several major categories:
1. Entity installation/deletion/configuration modification. These functions add and remove entities from the AMF, or change the entity configuration. When creating a bunch of entities, it is recommended to use the DWIM function Session.InstallApp, which calls other functions in this class. But it is possible to do it yourself by using the InstallEntity and Install<entity type>Config APIs. The important thing to remember is that it is an error to configure an entity to refer to another non-existent entity. Since the entities are mutually referential, you must FIRST "Install" ALL mutually referential entities and THEN configure them.
To reconfigure existing entities, use the Install<entity type>Config, for example Session.InstallSgConfig. To delete entities, use the Session.DeleteEntities API.
2. Entity state changes.
Use the Session.Startup, Session.Shutdown, Session.Quiesce, and Session.Idle functions to move entities though startup states.
def aspAmf.AspExcHandler | ( | fn, | |
args, | |||
obj = None , |
|||
okset = [] , |
|||
errDict = {} |
|||
) |
def aspAmf.auditLog | ( | logStr, | |
context = None |
|||
) |
def aspAmf.ChkAspErr | ( | ret, | |
obj = None , |
|||
okset = [] , |
|||
errDict = {} |
|||
) |
Internal function to check for C level errors.
def aspAmf.EntityRef | ( | type, | |
name | |||
) |
Build an entity reference tuple out of the entity type and its instance name This is really just a wrapper for creating a python tuple.
Parameters:
type | entity type (see aspAmfEntity.py) |
name | string identifying the entity |
def aspAmf.ErrCode | ( | retval | ) |
Strip the component off of an ASP return code.
def aspAmf.exc2ret | ( | fn, | |
args | |||
) |
def aspAmf.getEntityName | ( | entity | ) |
def aspAmf.SetCEntity | ( | entity, | |
obj | |||
) |
Sets the C level "Entity" object to an entity.
entity | The C level entity object. Pass "None" to create one. |
obj | The entity as either a tuple (type, name), or an AmfEntity object |
def aspAmf.Test | ( | ) |
Internal module unit test.
def aspAmf.TestCreate | ( | name | ) |
Internal module unit test.
def aspAmf.TestGetConfig | ( | ) |
Internal module unit test.
string aspAmf.AUDIT_LOG_PREPEND_STR = "Audit Log : " |
aspAmf.CpuLoadMetric = asp.CL_METRIC_CPU |
Identify CPU Load types.