当前位置: 首页>>代码示例>>Python>>正文


Python ZenModelRM.ZenModelRM类代码示例

本文整理汇总了Python中Products.ZenModel.ZenModelRM.ZenModelRM的典型用法代码示例。如果您正苦于以下问题:Python ZenModelRM类的具体用法?Python ZenModelRM怎么用?Python ZenModelRM使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ZenModelRM类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, id):
     ZenModelRM.__init__(self, id)
     self.eventClassKey = id
     self.sequence = None
     self.rule = ""
     self.regex = ""
     self.example = ""
     self.explanation = ""
     self.resolution = ""
开发者ID:bbc,项目名称:zenoss-prodbin,代码行数:9,代码来源:EventClassInst.py

示例2: __init__

 def __init__(self, sourcepath, id='', title='', description='', 
              preview='', height=200, permission=ZEN_COMMON):
     if not id: id = basename(sourcepath).split('.')[0]
     self.id = id
     ZenModelRM.__init__(self, id)
     self.title = title
     self.description = description
     self.permission = permission
     self.sourcepath = sourcepath
     self.preview = preview
     self.height = height
     self._read_source()
开发者ID:SteelHouseLabs,项目名称:zenoss-prodbin,代码行数:12,代码来源:Portlet.py

示例3: managedDeviceLink

    def managedDeviceLink(self):
        from Products.ZenModel.ZenModelRM import ZenModelRM

        d = self.getDmdRoot("Devices").findDevice(self.bsProductName)
        if d:
            return ZenModelRM.urlLink(d, "link")
        return None
开发者ID:whyzgeek,项目名称:ZenPacks.community.HPBladeChassis,代码行数:7,代码来源:BladeChassisInterconnect.py

示例4: managedDeviceLink

 def managedDeviceLink(self):
     from Products.ZenModel.ZenModelRM import ZenModelRM
     d = self.getDmdRoot('Devices').findDevice(self.id)
     if d:
         return ZenModelRM.urlLink(d, 'link')
     return None
开发者ID:Hackman238,项目名称:ZenPacks.Rackspace.BTI7200,代码行数:6,代码来源:Shelf.py

示例5: managedDeviceLink

 def managedDeviceLink(self):
     from Products.ZenModel.ZenModelRM import ZenModelRM
     d = self.getDmdRoot("Devices").findDevice(self.rttMonCtrlAdminTag)
     if d:
         return ZenModelRM.urlLink(d, 'link')
     return None
开发者ID:rskoog,项目名称:ZenPacks.ShaneScott.ipSLA,代码行数:6,代码来源:SLAS.py

示例6: getPerformanceLink

 def getPerformanceLink(self):
     from Products.ZenModel.ZenModelRM import ZenModelRM
     d = self.getDmdRoot("Devices").findDevice(self.serialPortLabel)
     if d:
         return ZenModelRM.urlLink(d, 'link')
     return None
开发者ID:BillTheBest,项目名称:Community-Zenpacks,代码行数:6,代码来源:SerialPort.py

示例7: managedDeviceLink

 def managedDeviceLink(self):
     from Products.ZenModel.ZenModelRM import ZenModelRM
     d = self.getDmdRoot("Devices").findDevice(self.serverAlias)
     if d:
         return ZenModelRM.urlLink(d, 'link')
     return None
开发者ID:BillTheBest,项目名称:Community-Zenpacks,代码行数:6,代码来源:Terminal.py

示例8: managedDeviceLink

 def managedDeviceLink(self):
     from Products.ZenModel.ZenModelRM import ZenModelRM
     d = self.getDmdRoot("Devices").findDevice(self.bsDisplayName)
     if d:
         return ZenModelRM.urlLink(d, 'link', attrs={'target':'_top'})
     return None
开发者ID:chrisheyne,项目名称:ZenPacks.community.HPBladeChassis,代码行数:6,代码来源:BladeServer.py

示例9: feedLinks

 def feedLinks(self):
     links = []
     for feed in self.getFeedObjs():
         links.append(ZenModelRM.urlLink(feed, feed.getId()))
     return ", ".join(links)
开发者ID:BillTheBest,项目名称:Community-Zenpacks,代码行数:5,代码来源:Tower.py

示例10: managedDeviceLink

    def managedDeviceLink(self):
	from Products.ZenModel.ZenModelRM import ZenModelRM
	d = self.getDmdRoot("Devices").findDevice(self.cfcDisplayName)
	if d:
	    return ZenModelRM.urlLink(d, self.cfcDisplayName)
	return self.cfcDisplayName
开发者ID:BillTheBest,项目名称:Community-Zenpacks,代码行数:6,代码来源:CfengineClient.py

示例11: zmanage_editProperties

    def zmanage_editProperties(self, REQUEST, redirect=False):
        """
        Edit a ZenPack object
        """

        if self.isEggPack():
            # Handle the dependencies fields and recreate self.dependencies
            newDeps = {}
            depNames = REQUEST.get('dependencies', [])
            if not isinstance(depNames, list):
                depNames = [depNames]
            newDeps = {}
            for depName in depNames:
                fieldName = 'version_%s' % depName
                vers = REQUEST.get(fieldName, '').strip()
                if vers and vers[0] in string.digits:
                    vers = '==' + vers
                try:
                    req = pkg_resources.Requirement.parse(depName + vers)
                except ValueError:
                    messaging.IMessageSender(self).sendToBrowser(
                        'Error',
                        '%s is not a valid version specification.' % vers,
                        priority=messaging.WARNING
                    )
                    return self.callZenScreen(REQUEST)
                zp = self.dmd.ZenPackManager.packs._getOb(depName, None)
                if not zp:
                    messaging.IMessageSender(self).sendToBrowser(
                        'Error',
                        '%s is not installed.' % depName,
                        priority=messaging.WARNING
                    )
                    return self.callZenScreen(REQUEST)
                if not req.__contains__(zp.version):
                    messaging.IMessageSender(self).sendToBrowser(
                        'Error',
                        ('The required version for %s (%s) ' % (depName, vers) +
                        'does not match the installed version (%s).' %
                         zp.version),
                        priority=messaging.WARNING
                    )
                    return self.callZenScreen(REQUEST)
                newDeps[depName] = vers
                REQUEST.form[fieldName] = vers
            self.dependencies = newDeps
            # Check the value of compatZenossVers and the dependencies to
            # make sure that they match installed versions
            compatZenossVers = REQUEST.form['compatZenossVers'] or ''
            if compatZenossVers:
                if compatZenossVers[0] in string.digits:
                    compatZenossVers = '==' + compatZenossVers
                try:
                    req = pkg_resources.Requirement.parse(
                                                'zenoss%s' % compatZenossVers)
                except ValueError:
                    messaging.IMessageSender(self).sendToBrowser(
                        'Error',
                        ('%s is not a valid version specification for Zenoss.'
                                                        % compatZenossVers),
                        priority=messaging.WARNING
                    )
                if not req.__contains__(ZENOSS_VERSION):
                    messaging.IMessageSender(self).sendToBrowser(
                        'Error',
                        ('%s does not match this version of Zenoss (%s).' %
                            (compatZenossVers, ZENOSS_VERSION)),
                        priority=messaging.WARNING
                    )
                    return self.callZenScreen(REQUEST)
                REQUEST.form['compatZenossVers'] = compatZenossVers

        if 'Select or specify your own' in REQUEST.get('license', ''):
            REQUEST.form['license'] = ''

        result =  ZenModelRM.zmanage_editProperties(self, REQUEST, redirect,
                audit=False)
        audit('UI.ZenPack.Edit',
                self.id,
                data_=REQUEST.form,
                skipFields_=('redirect',
                        'zenScreenName',
                        'zmanage_editProperties'))

        if self.isEggPack():
            self.writeSetupValues()
            self.writeLicense()
            self.buildEggInfo()
        return result
开发者ID:c0ns0le,项目名称:zenoss-4,代码行数:89,代码来源:ZenPack.py

示例12: __init__

 def __init__(self, id, title=None, buildRelations=True):
     #self.dependencies = {'zenpacksupport':''}
     self.dependencies = {}
     ZenModelRM.__init__(self, id, title, buildRelations)
开发者ID:c0ns0le,项目名称:zenoss-4,代码行数:4,代码来源:ZenPack.py


注:本文中的Products.ZenModel.ZenModelRM.ZenModelRM类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。