Package flumotion :: Package admin :: Module admin :: Class AdminModel
[hide private]

Class AdminModel

source code

 twisted.spread.jelly.Jellyable --+                    
                                  |                    
twisted.spread.flavors.Serializable --+                
                                      |                
   twisted.spread.flavors.Referenceable --+            
                                          |            
                extern.log.log.Loggable --+            
                                          |            
                   twisted.pb.Referenceable --+        
                                              |        
                       common.medium.BaseMedium --+    
                                                  |    
                        common.medium.PingingMedium --+
                                                      |
                                         object --+   |
                                                  |   |
                         common.signals.SignalMixin --+
                                                      |
                                                     AdminModel

I live in the admin client. I am a data model for any admin view implementing a UI to communicate with one manager. I send signals when things happen.

Manager calls on us through flumotion.manager.admin.AdminAvatar

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
disconnectFromManager(self)
Disconnects from the actual manager and frees the connection.
source code
twisted.internet.defer.Deferred
connectToManager(self, connectionInfo, keepTrying=False, writeConnection=True)
Connects to the specified manager.
source code
 
bundleErrback(self, failure, fileName='<unknown>')
Handle all coding mistakes that could be triggered by loading bundles.
source code
 
shutdown(self) source code
 
reconnect(self, keepTrying=False)
Close any existing connection to the manager and reconnect.
source code
 
adminInfoStr(self) source code
 
connectionInfoStr(self) source code
 
managerInfoStr(self) source code
 
connectionFailed(self, failure) source code
 
setRemoteReference(self, remoteReference)
Set the given remoteReference as the reference to the server-side avatar.
source code
 
isConnected(self) source code
twisted.internet.defer.Deferred
componentCallRemote(self, componentState, methodName, *args, **kwargs)
Call the given method on the given component with the given args.
source code
twisted.internet.defer.Deferred
workerCallRemote(self, workerName, methodName, *args, **kwargs)
Call the the given method on the given worker with the given args.
source code
 
loadConfiguration(self, xml_string) source code
 
getConfiguration(self) source code
twisted.internet.defer.Deferred
getScenarios(self)
Obtains the available scenarios from the manager.
source code
twisted.internet.defer.Deferred
getScenarioByType(self, type)
Obtains an scenario given its type.
source code
 
cleanComponents(self) source code
 
checkElements(self, workerName, elements) source code
 
checkImport(self, workerName, moduleName) source code
twisted.internet.defer.Deferred firing an flumotion.common.messages.Result
workerRun(self, workerName, moduleName, functionName, *args, **kwargs)
Run the given function and args on the given worker.
source code
 
getWizardEntries(self, wizardTypes=None, provides=None, accepts=None) source code
 
getWorkerHeavenState(self) source code
 
_remoteDisconnected(self, remoteReference) source code
 
__provides__(...)
Special descriptor for class __provides__

Inherited from common.medium.PingingMedium: callRemoteLogging, remoteMessageReceived, remote_writeFluDebugMarker, startPinging, stopPinging

Inherited from common.medium.BaseMedium: callRemote, getBundledFunction, hasRemoteReference, runBundledFunction

Inherited from twisted.spread.flavors.Referenceable: jellyFor

Inherited from twisted.spread.flavors.Serializable: processUniqueID

Inherited from twisted.spread.jelly.Jellyable: __providedBy__, getStateFor

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Inherited from common.signals.SignalMixin: connect, disconnect, disconnectByFunction, emit

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __signals__ = ('connected', 'disconnected', 'connection-refuse...
  logCategory = 'adminmodel'
Implementors can provide a category to log their messages under.
  planet = None
hash(x)
  __implemented__ = <implementedBy flumotion.admin.admin.AdminMo...

Inherited from common.medium.BaseMedium: bundleLoader, remoteLogName

Inherited from twisted.spread.flavors.Referenceable: perspective

Instance Variables [hide private]

Inherited from common.medium.BaseMedium: remote

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

connectToManager(self, connectionInfo, keepTrying=False, writeConnection=True)

source code 

Connects to the specified manager.

Parameters:
  • connectionInfo (a PBConnectionInfo) - data for establishing the connection
  • keepTrying (bool) - when this is True the Factory will try to reconnect when it loses the connection
  • writeConnection (bool) - when this is True the connection is saved for future uses on cache
Returns: twisted.internet.defer.Deferred

bundleErrback(self, failure, fileName='<unknown>')

source code 

Handle all coding mistakes that could be triggered by loading bundles. This is a convenience method to help in properly reporting problems. The EntrySyntaxError should be caught and wrapped in a UI message, with the message generated here as debug information.

Parameters:
  • failure (twisted.python.failure.Failure) - the failure to be handled
  • filename (str) - name of the file being loaded

setRemoteReference(self, remoteReference)

source code 

Set the given remoteReference as the reference to the server-side avatar.

Parameters:
  • remoteReference - twisted.spread.pb.RemoteReference
Overrides: common.medium.BaseMedium.setRemoteReference
(inherited documentation)

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

source code 

Call the given method on the given component with the given args.

Parameters:
Returns: twisted.internet.defer.Deferred

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

source code 

Call the the given method on the given worker with the given args.

Parameters:
  • workerName - name of the worker to call the method on
  • methodName - name of method to call; serialized to a remote_methodName on the worker's medium
Returns: twisted.internet.defer.Deferred

workerRun(self, workerName, moduleName, functionName, *args, **kwargs)

source code 

Run the given function and args on the given worker. If the worker does not already have the module, or it is out of date, it will be retrieved from the manager.

Returns: twisted.internet.defer.Deferred firing an flumotion.common.messages.Result

__provides__(...)

 
Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.

Overrides: common.signals.SignalMixin.__provides__

Class Variable Details [hide private]

__signals__

Value:
('connected',
 'disconnected',
 'connection-refused',
 'connection-failed',
 'connection-error',
 'reloading',
 'message',
 'update')

__implemented__

Value:
<implementedBy flumotion.admin.admin.AdminModel>