SAFplus Runtime Director API  3.0.5
aspApp.AppDb Class Reference

All applications and application versions and archives that are currently on the system. More...

Public Member Functions

def __init__
 
def Remove
 Remove an entity from the appDb, but do not delete it. More...
 
def AppList
 Return a list of all application objects. More...
 
def __iter__
 Iterate through all application objects. More...
 
def NewAppFileFromFd
 This is a fairly special-purpose function used when you have a file stream, but not an actual file. More...
 
def NewAppFile
 Tell the database about a new application file. More...
 
def ConnectToServiceGroups
 Iterate through the clusterinfo service groups and connect them up to apps and appfiles. More...
 
def ReloadApps
 Reload the entire DB from archive files in the AppArchiveDir. More...
 

Public Attributes

 apps
 List of applications in the application database. More...
 
 appdir
 Location where the application bundle files are stored by default. More...
 
 entities
 A dictionary of all subobject, indexable by name (either the filename in the case of appFile objects, or the application name for App objects. More...
 

Detailed Description

All applications and application versions and archives that are currently on the system.

Note that you should only create 1 of these per bundle repository directory or you will have 2 entities managing the same data.

Constructor & Destructor Documentation

def aspApp.AppDb.__init__ (   self,
  dbdir = AppArchiveDir 
)

Member Function Documentation

def aspApp.AppDb.__iter__ (   self)

Iterate through all application objects.

def aspApp.AppDb.AppList (   self)

Return a list of all application objects.

def aspApp.AppDb.ConnectToServiceGroups (   self,
  cinfo = None 
)

Iterate through the clusterinfo service groups and connect them up to apps and appfiles.

def aspApp.AppDb.NewAppFile (   self,
  filename 
)

Tell the database about a new application file.

The file should be in the AppArchiveDir, or it will not be found during a reload.

Exceptions
misc.ErrorThe file does not exist (error code is 2)
Returns
application file object (AppFile)
def aspApp.AppDb.NewAppFileFromFd (   self,
  filename,
  fs 
)

This is a fairly special-purpose function used when you have a file stream, but not an actual file.

This happens through a web uploads

def aspApp.AppDb.ReloadApps (   self)

Reload the entire DB from archive files in the AppArchiveDir.

def aspApp.AppDb.Remove (   self,
  name 
)

Remove an entity from the appDb, but do not delete it.

To delete it, use the entities' Delete member.

Parameters
nameString name of application to remove

Member Data Documentation

aspApp.AppDb.appdir

Location where the application bundle files are stored by default.

aspApp.AppDb.apps

List of applications in the application database.

aspApp.AppDb.entities

A dictionary of all subobject, indexable by name (either the filename in the case of appFile objects, or the application name for App objects.