def runRestoreOS(self, imageAttrs):
     from RestoreOS import childTask
     task = childTask('ResotreOS', 1)
     for key in imageAttrs.keys():
         if key=='type':
             continue
         task.addPara(key, imageAttrs[key])
     task.run()
 def __runRestoreOS(self):
     from RestoreOS import childTask
     task = childTask('ResotreOS', 1)
     for key in self.parameter.keys():
         if key=='type' or re.match("OSImageLocation.", key):
             continue
         task.addPara(key, self.parameter[key])
     task.addPara("OSImageLocation", self.parameter["OSImageLocation%s" % self.imagePos])
     task.run()
    #Deprecated
    def loadImages(self):
        if self.doc==None:
            self.doc = minidom.parse(self.imagesRepositoryFile)
        
        images = self.doc.getElementsByTagName("images")[0]
        
        for node in images.childNodes:
            if node.nodeType == node.TEXT_NODE:
                continue
            else:
                imageAttr = self.__getImageAttrs(node)
                self.imagesList.append(imageAttr)

    #Deprecated 
    def __getImageAttrs(self, tasksParent):
        attrs = {}
        for attr in tasksParent.attributes.items():
            attrs[attr[0]] = attr[1]
        return attrs
        

##################This section is mainly for debug -- Begin #############################
if __name__ == '__main__':    
    crt=childTask('crt', 1)
    crt.addPara('OSImageLocation1', 'test1')
    crt.addPara('OSImageLocation2', 'test2')
    crt.run()
    #ro.getLabPETool()
##################This section is mainly for debug -- End #############################