Example #1
0
    def unsetVariable(self, name, ignored, scope=None, type=None):
        """Remove a Variable under the given scope or under all scopes if scope = None"""
        if scope is None or type is None:
            self.__call(self.unsetVariable, name, ignored, scope, type)

        if self.vms[type][scope]['vars'].has_key(name):
            AdminConfig.remove(self.vms[type][scope]['vars'][name]['id'])
            del self.vms[type][scope]['vars'][name]
            print "Variable '%s' removed under scope '%s'." % (name, scope)
            return 1 == 1

        return None
Example #2
0
	def remove(self):
		for librefId in AdminConfig.list('LibraryRef').splitlines():
			libName = AdminConfig.showAttribute(librefId, 'libraryName')
			if self.name == libName:
				AdminConfig.remove(librefId)
		Resource.remove(self)
Example #3
0
 def removeHostAliases(self):
     for hostAliasId in self.getHostAliasIds():
         AdminConfig.remove(hostAliasId)
Example #4
0
 def removeHostAliases(self):
     for hostAliasId in self.getHostAliasIds():
         AdminConfig.remove(hostAliasId)
Example #5
0
 def remove(self):
     for librefId in AdminConfig.list('LibraryRef').splitlines():
         libName = AdminConfig.showAttribute(librefId, 'libraryName')
         if self.name == libName:
             AdminConfig.remove(librefId)
     Resource.remove(self)