def remove(self, app, leaveObjects=False):
     #self.saveComponents(app)
     removeAllComponents(app, self.definitions)
     ZenPackBase.remove(self, app, leaveObjects)
     d = self.definitions[0]
     zenpackname = "%s.%s" % (d.zenpackroot, d.zenpackbase)
     removeRels(app, zenpackname)
     removeRelations(self.definitions)
     self.updateRelations(app)
示例#2
0
    def remove(self, app, leaveObjects=False):
        if not leaveObjects:
            Device._relations = tuple(
                [x for x in Device._relations if x[0] != 'openvz_containers'])

            self.rebuildRelations(app.zport.dmd)
            self.remove_modeler_plugins(app.zport.dmd)

        ZenPackBase.remove(self, app, leaveObjects=leaveObjects)
    def remove(self, dmd, leaveObjects=False):
        if not leaveObjects:
            # When a ZenPack is removed the remove method will be called with
            # leaveObjects set to False. This means that you likely want to
            # make sure that leaveObjects is set to false before executing
            # your custom removal code.
            pass

        ZenPackBase.remove(self, dmd, leaveObjects=leaveObjects)
  def remove(self, dmd, leaveObjects=False):
    
    if not leaveObjects:
      
      # Delete all instances of devices in /Storage/IBMV7000 - completely - including history and events
      #
      for dev in dmd.Devices.Storage.IBMV7000.getSubDevices():
        dev.deleteDevice(deleteStatus=True, deleteHistory=True, deletePerf=True)
         

      # Next line delete all subclasses too
      dmd.Devices.manage_deleteOrganizer('/Storage/IBMV7000')

      ZenPackBase.remove(self, dmd, leaveObjects=leaveObjects)
 def remove(self, app, leaveObjects=False):
     ''''''
     if self.shouldSave() is True:
         log.info("saving components")
         try: self.saveComponents(app)
         except:  log.warn("problem saving components")
     else:  log.info("not saving components")
     ZenPackBase.remove(self, app, leaveObjects)
     removeAllComponents(app, self.definitions)
     d = self.definitions[0]
     zenpackname = "%s.%s" % (d.zenpackroot, d.zenpackbase)
     removeRels(app, zenpackname)
     removeRelations(self.definitions)
     self.updateRelations(app)
示例#6
0
 def remove(self, app, leaveObjects=False):
     if not leaveObjects:
         self.removeZProperties(self.dmd.getPhysicalRoot())
         if self.dmd.Devices.Server.Windows.hasProperty('zWinEventlog'):
             self.dmd.Devices.Server.Windows.deleteZenProperty(
                 'zWinEventlog')
         if self.dmd.Devices.Server.Windows.hasProperty(
                 'zWmiMonitorIgnore'):
             self.dmd.Devices.Server.Windows.deleteZenProperty(
                 'zWmiMonitorIgnore')
         if self.dmd.Devices.Discovered.hasProperty('zWmiMonitorIgnore'):
             self.dmd.Devices.Discovered.deleteZenProperty(
                 'zWmiMonitorIgnore')
         _removePluginsFromDiscovered(self.dmd)
     ZenPackBase.remove(self, app, leaveObjects)
示例#7
0
    def remove(self, dmd, leaveObjects=False):

        if not leaveObjects:

            # Delete all instances of devices in /Storage/IBMV7000 - completely - including history and events
            #
            for dev in dmd.Devices.Storage.IBMV7000.getSubDevices():
                dev.deleteDevice(deleteStatus=True,
                                 deleteHistory=True,
                                 deletePerf=True)

            # Next line delete all subclasses too
            dmd.Devices.manage_deleteOrganizer('/Storage/IBMV7000')

            ZenPackBase.remove(self, dmd, leaveObjects=leaveObjects)
    def remove(self, dmd, leaveObjects=False):
        if not leaveObjects:
            # When a ZenPack is removed the remove method will be called with
            # leaveObjects set to False. This means that you likely want to
            # make sure that leaveObjects is set to false before executing
            # your custom removal code.
            #
            # Delete all instances of devices in /Example/TestClass - completely - including history and events
            #
            for dev in dmd.Devices.Example.TestClass.getSubDevices():
                dev.deleteDevice(deleteStatus=True, deleteHistory=True, deletePerf=True)
            #
            # Now delete the device class organizer hierarchy we created
            #
            # Next line delete all subclasses too
            #
            dmd.Devices.manage_deleteOrganizer("/Devices/Example")

        ZenPackBase.remove(self, dmd, leaveObjects=leaveObjects)
示例#9
0
    def remove(self, dmd, leaveObjects=False):
        if not leaveObjects:
            # When a ZenPack is removed the remove method will be called with
            # leaveObjects set to False. This means that you likely want to
            # make sure that leaveObjects is set to false before executing
            # your custom removal code.
            #
            # Delete all instances of devices in /Example/TestClass - completely - including history and events
            #
            for dev in dmd.Devices.Example.TestClass.getSubDevices():
                dev.deleteDevice(deleteStatus=True,
                                 deleteHistory=True,
                                 deletePerf=True)
        #
        # Now delete the device class organizer hierarchy we created
        #
        # Next line delete all subclasses too
        #
            dmd.Devices.manage_deleteOrganizer('/Devices/Example')

        ZenPackBase.remove(self, dmd, leaveObjects=leaveObjects)
 def remove(self, app, leaveObjects=False):
     if hasattr(app.zport.dmd, 'productName'):
         del app.zport.dmd.productName
     ZenPackBase.remove(self, app, leaveObjects)
 def remove(self, dmd, leaveObjects=False):
     if not leaveObjects:
         pass
     self.remove_symlink()
     ZenPackBase.remove(self, dmd, leaveObjects=leaveObjects)
 def remove(self, app, leaveObjects=False):
     # disable globally, for all device classes and devices:
     self.disable_modeler_plugins(app.zport.dmd, self.modeler_plugins, self.devices_or_classes_to_modify_iterator(app) )
     ZenPackBase.remove(self, app, leaveObjects=leaveObjects)
示例#13
0
 def remove(self, app, leaveObjects=False):
     if not leaveObjects:
         _removePluginsFromDiscovered(self.dmd)
     ZenPackBase.remove(self, app, leaveObjects)
 def remove(self, app, leaveObjects=False):
     if not leaveObjects:
         _removePluginsFromDiscovered(self.dmd)
     ZenPackBase.remove(self, app, leaveObjects)
 def remove(self, app, leaveObjects=False):
     ZenPackBase.remove(self, app, leaveObjects)
     Device._relations = tuple([x for x in Device._relations if x[0] not in ('httpComponents')])
     for d in self.dmd.Devices.getSubDevices():
         d.buildRelations()
 def remove(self, app, leaveObjects=False):
     if hasattr(app.zport.dmd, 'productName'):
         del app.zport.dmd.productName
     ZenPackBase.remove(self, app, leaveObjects)
 def remove(self, dmd, leaveObjects=False):
     self.removeScriptSymlink()
     ZenPackBase.remove(self, dmd, leaveObjects=leaveObjects)
     Device._relations = tuple([x for x in Device._relations if x[0] not in ('javaApps')])
     for d in self.dmd.Devices.getSubDevices():
         d.buildRelations()
 def remove(self, dmd, leaveObjects=False):
     ZenPackBase.remove(self, dmd, leaveObjects=leaveObjects)
     Device._relations = tuple([x for x in Device._relations if x[0] not in ('torqueNodes')])
     for device in self.dmd.Devices.getSubDevices():
         device.buildRelations()