def __init__(self, node=None, filename=None, config=None): """ read stuff from file and populate the config when filename is None, creates an empty config """ self.convirt_generated = False self.storage_stats = None PyConfig.__init__(self, node, filename, VMConfig.signature, config) if filename is None and config is None: return if len(self.lines) > 0: if self.lines[0].find(self.signature) >= 0: self.convirt_generated = True if self["name"] is None: raise Exception("No dom name specified") #pick up the name from the file self.name = self["name"] self.id = self["uuid"]
def __init__(self, node=None, filename=None, config=None): """ read stuff from file and populate the config when filename is None, creates an empty config """ self.convirt_generated = False self.storage_stats = None PyConfig.__init__(self, node, filename, VMConfig.signature, config) if filename is None and config is None: return if len(self.lines) > 0: if self.lines[0].find(self.signature) >= 0: self.convirt_generated = True if self["name"] is None: raise Exception("No dom name specified") # pick up the name from the file self.name = self["name"] self.id = self["uuid"]