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 --+            
                                          |            
                    common.log.Loggable --+            
                                          |            
                   twisted.pb.Referenceable --+        
                                              |        
                       common.medium.BaseMedium --+    
                                                  |    
                        common.medium.PingingMedium --+
                                                      |
                                         object --+   |
                                                  |   |
                                    gobject.GObject --+
                                                      |
                                                     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, authenticator)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_makeFactory(self, authenticator) source code
 
connectToHost(self, host, port, use_insecure=False, keep_trying=False)
Connect to a host.
source code
 
_defaultErrback(self, failure) source code
 
reconnect(self) source code
 
adminInfoStr(self) source code
 
connectionInfoStr(self) source code
 
managerInfoStr(self) source code
 
connectionFailed(self, failure) source code
 
setRemoteReference(self, *args, **kwargs)
Set the given remoteReference as the reference to the server-side avatar.
source code
 
remote_log(self, category, type, message) source code
 
stateSet(self, state, key, value) source code
 
stateAppend(self, state, key, value) source code
 
stateRemove(self, state, key, value) source code
 
isConnected(self) source code
 
shutdown(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
 
_callRemoteCallback(self, result, methodName, componentName) 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
 
_callRemoteErrback(self, failure, type, name, methodName) source code
 
setProperty(self, componentState, element, property, value) source code
 
getProperty(self, componentState, element, property) source code
 
reloadAdmin(self) source code
 
reload(self) source code
 
reload_async(self, *args, **kwargs) source code
deferred
reloadManager(self)
Tell the manager to reload its code.
source code
twisted.internet.defer.Deferred
reloadComponent(self, componentState)
Tell the manager to reload code for a component.
source code
 
loadConfiguration(self, xml_string) source code
 
getConfiguration(self) source code
 
cleanComponents(self) source code
 
getEntry(self, *args, **kwargs)
Do everything needed to set up the entry point for the given component and type, including transferring and setting up bundles.
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
 
get_components(self) source code
 
getComponents(self) source code
 
_setWorkerHeavenState(self, state) source code
 
getWorkerHeavenState(self) source code

Inherited from common.medium.PingingMedium: startPinging, stopPinging

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

Inherited from twisted.pb.Referenceable: remoteMessageReceived

Inherited from twisted.spread.flavors.Referenceable: jellyFor

Inherited from twisted.spread.flavors.Serializable: processUniqueID

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

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

Inherited from gobject.GObject: __cmp__, __delattr__, __gdoc__, __gobject_init__, __hash__, __new__, __repr__, __setattr__, chain, connect, connect_after, connect_object, connect_object_after, disconnect, disconnect_by_func, emit, emit_stop_by_name, freeze_notify, get_data, get_properties, get_property, handler_block, handler_block_by_func, handler_disconnect, handler_is_connected, handler_unblock, handler_unblock_by_func, notify, props, set_data, set_properties, set_property, stop_emission, thaw_notify, weak_ref

Inherited from object: __getattribute__, __reduce__, __reduce_ex__, __str__

Class Variables [hide private]
  logCategory = 'adminmodel'
Implementors can provide a category to log their messages under.
  planet = None
  __gtype__ = <GType flumotion+admin+admin+AdminModel (140996688)>
  __implemented__ = <implementedBy flumotion.admin.admin.AdminMo...
  __provides__ = <zope.interface.declarations.ClassProvides obje...

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 gobject.GObject: __grefcount__

Inherited from object: __class__

Method Details [hide private]

__init__(self, authenticator)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

setRemoteReference(self, *args, **kwargs)

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

setProperty(self, componentState, element, property, value)

source code 
Parameters:

getProperty(self, componentState, element, property)

source code 
Parameters:

reloadComponent(self, componentState)

source code 

Tell the manager to reload code for a component.

Parameters:
Returns: twisted.internet.defer.Deferred

getEntry(self, *args, **kwargs)

source code 

Do everything needed to set up the entry point for the given
component and type, including transferring and setting up bundles.

Caller is responsible for adding errbacks to the deferred.

Returns: a deferred returning (entryPath, filename, methodName) with
         entryPath: the full local path to the bundle's base
         fileName:  the relative location of the bundled file
        methodName: the method to instantiate with

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

Class Variable Details [hide private]

__implemented__

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

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x8708c8c>