Package flumotion :: Package manager :: Module admin :: Class AdminAvatar
[show private | hide private]
[frames | no frames]

Class AdminAvatar

   Avatar --+    
            |    
 Loggable --+    
            |    
ManagerAvatar --+
                |
               AdminAvatar


I am an avatar created for an administrative client interface. A reference to me is given (for example, to gui.AdminInterface) when logging in and requesting an "admin" avatar. I live in the manager.
Method Summary
  attached(self, mind)
Tell the avatar that the given mind has been attached.
  detached(self, mind)
Tell the avatar that the peer's client referenced by the mind has detached.
list of flumotion.common.planet.ManagerComponentState getComponentStates(self)
Return all component states logged in to the manager.
  perspective_cleanComponents(self)
  perspective_componentCallRemote(self, componentState, methodName, *args, **kwargs)
Call a method on the given component on behalf of an admin client.
  perspective_componentStart(self, componentState)
Start the given component.
  perspective_getEntryByType(self, componentState, type)
Get the entry point for a piece of bundled code by the type.
  perspective_getPlanetState(self)
  perspective_getWorkerHeavenState(self)
  perspective_loadConfiguration(self, xml)
  perspective_reloadComponent(self, componentState)
Reload modules in the given component.
  perspective_reloadManager(self)
Reload modules in the manager.
  perspective_shutdown(self)
  perspective_workerCallRemote(self, workerName, methodName, *args, **kwargs)
Call a remote method on the worker.
  sendLog(self, category, type, message)
Send the given log message to the peer.
    Inherited from ManagerAvatar
  __init__(self, heaven, avatarId)
  getClientAddress(self)
Get the IPv4 address of the machine the client is connecting from.
boolean hasRemoteReference(self)
Check if the avatar has a remote reference to the peer.
  mindCallRemote(self, name, *args, **kwargs)
Call the given remote method.
list of (string, string) tuples perspective_getBundleSums(self, bundleName)
Get a list of (bundleName, md5sum) of all dependency bundles, starting with this bundle, in the correct order.
list of (string, string) tuples perspective_getBundleSumsByFile(self, filename)
Get a list of (bundleName, md5sum) of all dependency bundles, starting with this bundle, in the correct order.
  perspective_getBundleZips(self, bundles)
Get the zip files for the given list of bundles.
    Inherited from Avatar
  perspectiveMessageReceived(self, broker, message, args, kw)
This method is called when a network message is received.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, message)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.

Method Details

attached(self, mind)

Tell the avatar that the given mind has been attached. This gives the avatar a way to call remotely to the client that requested this avatar. This is scheduled by the portal after the client has logged in.
Parameters:
mind
           (type=twisted.spread.pb.RemoteReference)
Overrides:
flumotion.manager.base.ManagerAvatar.attached (inherited documentation)

detached(self, mind)

Tell the avatar that the peer's client referenced by the mind has detached.

Called through the manager's PB logout trigger calling flumotion.manager.manager.Dispatcher.removeAvatar
Overrides:
flumotion.manager.base.ManagerAvatar.detached (inherited documentation)

getComponentStates(self)

Return all component states logged in to the manager. The list gets serialized to a list of flumotion.common.planet.AdminComponentState
Returns:
list of flumotion.common.planet.ManagerComponentState

perspective_componentCallRemote(self, componentState, methodName, *args, **kwargs)

Call a method on the given component on behalf of an admin client.
Parameters:
componentState
           (type=flumotion.common.planet.ManagerComponentState)

perspective_componentStart(self, componentState)

Start the given component. The component should be sleeping before this.

perspective_getEntryByType(self, componentState, type)

Get the entry point for a piece of bundled code by the type.

Returns: a (filename, methodName) tuple, or raises a Failure.

perspective_loadConfiguration(self, xml)

Parameters:
xml
           (type=string)

perspective_reloadComponent(self, componentState)

Reload modules in the given component.

perspective_reloadManager(self)

Reload modules in the manager.

perspective_workerCallRemote(self, workerName, methodName, *args, **kwargs)

Call a remote method on the worker. This is used so that admin clients can call methods from the interface to the worker.
Parameters:
workerName - the worker to call.
           (type=string)
methodName - the method to call on the worker.
           (type=string)

sendLog(self, category, type, message)

Send the given log message to the peer.

Class Variable Details

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'admin-avatar'                                                         

Generated by Epydoc 2.1 on Wed Feb 16 07:22:59 2005 http://epydoc.sf.net