Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from Globals import InitializeClass
- from Products.ZenRelations.RelSchema import *
- from Products.ZenModel.Device import Device
- from Products.ZenModel.ZenossSecurity import ZEN_VIEW
- from copy import deepcopy
- class PrinterDevice(Device):
- "A Printer Device"
- _relations = Device._relations + (
- ('PrinterToner', ToManyCont(ToOne,
- 'ZenPacks.community.PrinterMIB', 'PrinterDev')),
- )
- factory_type_information = deepcopy(Device.factory_type_information)
- factory_type_information[0]['actions'] += (
- { 'id' : 'PrinterToner'
- , 'name' : 'Printer Toners'
- , 'action' : 'PrinterDeviceDetail'
- , 'permissions' : (ZEN_VIEW, ) },
- )
- test=""
- def hola(self):
- print('Hola')
- def __init__(self, *args, **kw):
- Device.__init__(self, *args, **kw)
- self.buildRelations()
- InitializeClass(PrinterDevice)
Advertisement
Add Comment
Please, Sign In to add comment