Package ZenModel :: Module Commandable :: Class Commandable
[show private | hide private]
[frames | no frames]

Class Commandable

Known Subclasses:
DataRoot, Device, DeviceOrganizer, OSProcess, OSProcessClass, OSProcessOrganizer, Service, ServiceClass, ServiceOrganizer

Method Summary
  compile(self, cmd, target)
Evaluate command as a tales expression
  doCommandForTarget(self, cmd, target, out)
Execute the given UserCommand on the given target
  getAqChainForUserCommands(self)
  getUrlForUserCommands(self)
Return url for page which manages user commands
  getUserCommand(self, commandId)
Returns the command from the current context if it exists
  getUserCommandEnvironment(self)
Get the environment that provides context for the tales evaluation of a UserCommand.
  getUserCommands(self, asDict)
Get the user commands available in this context
  getUserCommandTargets(self)
Called by Commandable.doCommand() to ascertain objects on which a UserCommand should be executed.
  manage_addUserCommand(self, newId, desc, cmd, REQUEST)
Add a UserCommand to this device
  manage_deleteUserCommand(self, ids, REQUEST)
Delete User Command(s) to this device
  manage_doUserCommand(self, commandId, REQUEST)
Execute a UserCommand.
  manage_editUserCommand(self, commandId, REQUEST)
Want to redirect back to management tab after a save
  redirectToUserCommands(self, REQUEST, commandId)
Redirect to the page which lists UserCommands for this Commandable object.
  write(self, out, lines)
Output (maybe partial) result text from a UserCommand.

Class Variable Summary
tuple __ac_permissions__ = (('Change Device', ('manage_doUserC...
int defaultTimeout = 60                                                                    
PermissionRole getUserCommands__roles__ = <PermissionRole object at 0x1...
PermissionRole manage_addUserCommand__roles__ = <PermissionRole object ...
PermissionRole manage_deleteUserCommand__roles__ = <PermissionRole obje...
PermissionRole manage_doUserCommand__roles__ = <PermissionRole object a...
tuple manage_editUserCommand__roles__ = ('Manager',)

Method Details

compile(self, cmd, target)

Evaluate command as a tales expression

doCommandForTarget(self, cmd, target, out)

Execute the given UserCommand on the given target

getUrlForUserCommands(self)

Return url for page which manages user commands

getUserCommand(self, commandId)

Returns the command from the current context if it exists

getUserCommandEnvironment(self)

Get the environment that provides context for the tales evaluation of a UserCommand.

getUserCommands(self, asDict=False)

Get the user commands available in this context

getUserCommandTargets(self)

Called by Commandable.doCommand() to ascertain objects on which a UserCommand should be executed.

manage_addUserCommand(self, newId=None, desc='', cmd='', REQUEST=None)

Add a UserCommand to this device

manage_deleteUserCommand(self, ids=(), REQUEST=None)

Delete User Command(s) to this device

manage_doUserCommand(self, commandId=None, REQUEST=None)

Execute a UserCommand. If REQUEST then wrap output in proper zenoss html page.

manage_editUserCommand(self, commandId, REQUEST=None)

Want to redirect back to management tab after a save

redirectToUserCommands(self, REQUEST, commandId=None)

Redirect to the page which lists UserCommands for this Commandable object.

write(self, out, lines)

Output (maybe partial) result text from a UserCommand.

Class Variable Details

__ac_permissions__

Type:
tuple
Value:
(('Change Device',
  ('manage_doUserCommand',
   'manage_deleteUserCommand',
   'manage_addUserCommand')),
 ('View', ('getUserCommands',)))                                       

defaultTimeout

Type:
int
Value:
60                                                                    

getUserCommands__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x10bf3b0>                                   

manage_addUserCommand__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x10bfec0>                                   

manage_deleteUserCommand__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x10bfec0>                                   

manage_doUserCommand__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x10bfec0>                                   

manage_editUserCommand__roles__

Type:
tuple
Value:
('Manager',)                                                           

Generated by Epydoc 2.1 on Thu Aug 16 09:55:12 2007 http://epydoc.sf.net