예제 #1
0
def test_tdl_content_validation():
    tree = ET.parse(random.choice(utils.TEMPLATE_FILES))
    roottag = tree.getroot()
    ostag = roottag.find('./os')
    rootpwtag = ostag.find('./rootpw')
    ostag.remove(rootpwtag)
    imagejson = utils.build_base(ET.tostring(roottag))
    imageid = imagejson['id']
    assert utils.wait_until_base_completes(imageid) == 'FAILED'
예제 #2
0
def test_tdl_content_validation():
  tree = ET.parse(random.choice(utils.TEMPLATE_FILES))
  roottag = tree.getroot()
  ostag = roottag.find('./os')
  rootpwtag = ostag.find('./rootpw')
  ostag.remove(rootpwtag)
  imagejson = utils.build_base(ET.tostring(roottag))
  imageid = imagejson['id']
  assert utils.wait_until_base_completes(imageid) == 'FAILED'
예제 #3
0
def _build_base_from_queue(queue):
    global base_built
    while True:
        tdlfile = queue.get()
        template = open(tdlfile, "r").read()
        imagejson = utils.build_base(template)
        imageid = imagejson["id"]
        imagestatus = utils.wait_until_base_completes(imageid)
        with base_lock:
            base_built[tdlfile] = (imageid, imagestatus)
        queue.task_done()
예제 #4
0
def _build_base_from_queue(queue):
    global base_built
    while True:
        tdlfile = queue.get()
        template = open(tdlfile, 'r').read()
        imagejson = utils.build_base(template)
        imageid = imagejson['id']
        imagestatus = utils.wait_until_base_completes(imageid)
        with base_lock:
            base_built[tdlfile] = (imageid, imagestatus)
        queue.task_done()
예제 #5
0
def test_tdl_structure_validation():
    template = open(random.choice(utils.TEMPLATE_FILES), 'r').read()
    template = re.sub('<install', '<intall', template)
    imagejson = utils.build_base(template)
    imageid = imagejson['id']
    assert utils.wait_until_base_completes(imageid) == 'FAILED'
예제 #6
0
def test_tdl_structure_validation():
  template = open(random.choice(utils.TEMPLATE_FILES), 'r').read()
  template = re.sub('<install', '<intall', template)
  imagejson = utils.build_base(template)
  imageid = imagejson['id']
  assert utils.wait_until_base_completes(imageid) == 'FAILED'