Package Products :: Package Zuul :: Package routers :: Module process :: Class ProcessRouter
[hide private]
[frames] | no frames]

Class ProcessRouter

source code

ZenUtils.Ext.DirectRouter --+    
                            |    
                   TreeRouter --+
                                |
                               ProcessRouter

A JSON/ExtDirect interface to operations on processes

Instance Methods [hide private]
 
_getFacade(self)
Abstract method for child classes to use to get their facade
source code
[dictionary]
getTree(self, id)
Returns the tree structure of an organizer hierarchy where the root node is the organizer identified by the id parameter.
source code
DirectResponse
moveProcess(self, uid, targetUid)
Move a process or organizer from one organizer to another.
source code
DirectResponse
getInfo(self, uid, keys=None)
Get the properties of a process.
source code
DirectResponse
setInfo(self, **data)
Set attributes on a process.
source code
DirectResponse
getInstances(self, uid, start=0, params=None, limit=50, sort='name', page=None, dir='ASC')
Get a list of instances for a process UID.
source code
DirectResponse
getSequence(self, *args, **kwargs)
Get the current processes sequence.
source code
DirectResponse
setSequence(self, uids)
Set the current processes sequence.
source code
DirectResponse
getSequence2(self, *args, **kwargs)
Get the current processes sequence.
source code
DirectResponse
applyOSProcessClassMatchers(self, *args, **kwargs)
Get the current processes sequence.
source code
 
getProcessList(self, *args, **kwargs) source code
DirectResponse
query(self, limit=None, start=None, sort=None, dir=None, params=None, page=None, history=False, uid=None, criteria=())
Retrieve a list of processes based on a set of parameters.
source code

Inherited from TreeRouter: addNode, asyncGetTree, deleteNode, gunzip_b64, gzip_b64, moveOrganizer, objectExists

Inherited from TreeRouter (private): _canDeleteUid

Method Details [hide private]

_getFacade(self)

source code 

Abstract method for child classes to use to get their facade

Overrides: TreeRouter._getFacade
(inherited documentation)

getTree(self, id)

source code 

Returns the tree structure of an organizer hierarchy where the root node is the organizer identified by the id parameter.

Parameters:
  • id (string) - Id of the root node of the tree to be returned
Returns: [dictionary]
Object representing the tree

moveProcess(self, uid, targetUid)

source code 

Move a process or organizer from one organizer to another.

Parameters:
  • uid (string) - UID of the process or organizer to move
  • targetUid (string) - UID of the organizer to move to
Returns: DirectResponse
Properties:
  • uid: (dictionary) The new uid for moved process or organizer

getInfo(self, uid, keys=None)

source code 

Get the properties of a process.

Parameters:
  • uid (string) - Unique identifier of a process
  • keys (list) - (optional) List of keys to include in the returned dictionary. If None then all keys will be returned (default: None)
Returns: DirectResponse
Properties
  • data: (dictionary) Object representing a process's properties

setInfo(self, **data)

source code 

Set attributes on a process. This method accepts any keyword argument for the property that you wish to set. The only required property is "uid".

Parameters:
  • uid (string) - Unique identifier of a process
Returns: DirectResponse
Properties
  • data: (dictionary) Object representing a process's new properties
Decorators:
  • @require('Manage DMD')

getInstances(self, uid, start=0, params=None, limit=50, sort='name', page=None, dir='ASC')

source code 

Get a list of instances for a process UID.

Parameters:
  • uid (string) - Process UID to get instances of
  • start (integer) - (optional) Offset to return the results from; used in pagination (default: 0)
  • params (dictionary) - (optional) Key-value pair of filters for this search.
  • limit (integer) - (optional) Number of items to return; used in pagination (default: 50)
  • sort (string) - (optional) Key on which to sort the return results (default: 'name')
  • dir (string) - (optional) Sort order; can be either 'ASC' or 'DESC' (default: 'ASC')
Returns: DirectResponse
Properties:
  • data: ([dictionary]) List of objects representing process instances
  • total: (integer) Total number of instances

getSequence(self, *args, **kwargs)

source code 

Get the current processes sequence.

Returns: DirectResponse
Properties:
  • data: ([dictionary]) List of objects representing processes in sequence order

setSequence(self, uids)

source code 

Set the current processes sequence.

Parameters:
  • uids ([string]) - The set of process uid's in the desired sequence
Returns: DirectResponse
Success message

getSequence2(self, *args, **kwargs)

source code 

Get the current processes sequence.

Returns: DirectResponse
Properties:
  • data: ([dictionary]) List of objects representing processes in sequence order

applyOSProcessClassMatchers(self, *args, **kwargs)

source code 

Get the current processes sequence.

Returns: DirectResponse
Properties:
  • data: ([dictionary]) List of objects representing processes in sequence order

getProcessList(self, *args, **kwargs)

source code 
Parameters:
  • deviceGuid (string) - Service class UUID of the device to get process list

query(self, limit=None, start=None, sort=None, dir=None, params=None, page=None, history=False, uid=None, criteria=())

source code 

Retrieve a list of processes based on a set of parameters.

Parameters:
  • limit (integer) - (optional) Number of items to return; used in pagination (default: None)
  • start (integer) - (optional) Offset to return the results from; used in pagination (default: None)
  • sort (string) - (optional) Key on which to sort the return results (default: None)
  • dir (string) - (optional) Sort order; can be either 'ASC' or 'DESC' (default: None)
  • params (dictionary) - (optional) Key-value pair of filters for this search.
  • history (boolean) - not used
  • uid (string) - Service class UID to query
  • criteria (list) - not used
Returns: DirectResponse
Properties:
  • processes: ([dictionary]) List of objects representing processes
  • totalCount: (integer) Total number of processes
  • hash: (string) Hashcheck of the current processes state
  • disabled: (boolean) True if current user cannot manage processes