Example #1
0
    def _delSelectedCallback(self,item):

        for i in self.items_selected:
            if i.type == "Host":
                api.devlog("delcallbackHost %s " % (i.object.name))
                guiapi.delHost(i.object.getID())
            elif i.type == "Application":
                api.devlog("delcallbackApplication %s " % (i.object.name))
                _parent=i.object.getParent()
                _object=i.object
                guiapi.delApplication(_parent.getID(),_object.getID())
            elif i.type == "Interface":
                api.devlog("delcallbackInterface %s " % (i.object.name))
                _parent=i.object.getParent()
                _object=i.object
                guiapi.delInterface(_parent.getID(), _object.getID())
            elif i.type == "Service":
                api.devlog("delcallbackService %s " % (i.name))
                _object=i.object
                parent_interface = self._getParentForType(i, "Interface").object
                parent_host = self._getParentForType(i, "Host").object
                guiapi.delServiceFromInterface(parent_host.getID(), parent_interface.getID(), _object.getID())
                                                       
        self.listview.setCurrentItem(self.rootitem)
        self._itemSelected()
Example #2
0
    def _delSelectedCallback(self,item):

        for i in self.items_selected:
            if i.type == "Host":
                api.devlog("delcallbackHost %s " % (i.object.name))
                guiapi.delHost(i.object.getID())
            elif i.type == "Application":
                api.devlog("delcallbackApplication %s " % (i.object.name))
                _parent=i.object.getParent()
                _object=i.object
                guiapi.delApplication(_parent.getID(),_object.getID())
            elif i.type == "Interface":
                api.devlog("delcallbackInterface %s " % (i.object.name))
                _parent=i.object.getParent()
                _object=i.object
                guiapi.delInterface(_parent.getID(), _object.getID())
            elif i.type == "Service":
                api.devlog("delcallbackService %s " % (i.name))
                _object=i.object
                parent_interface = self._getParentForType(i, "Interface").object
                parent_host = self._getParentForType(i, "Host").object
                guiapi.delServiceFromInterface(parent_host.getID(), parent_interface.getID(), _object.getID())
                                                       
        self.listview.setCurrentItem(self.rootitem)
        self._itemSelected()
Example #3
0
 def _delHostCallback(self, item):
     api.devlog("delcallbackHost %s " % (item.object.name))
     guiapi.delHost(item.object.getID())
Example #4
0
 def _delHostCallback(self, item):
     api.devlog("delcallbackHost %s " % (item.object.name))
     guiapi.delHost(item.object.getID())