Esempio n. 1
0
    def setUp(self):
        # hardcoded paths are not flexible. this will only work if I run it from
        # the top-level of ovpl directory..
        self.lab_spec = json.loads(open("scripts/labspec.json").read())

        self.adapter = AWSAdapter()
        self.lab = LabManager()
        
        # the source code of the lab to be tested for deployment is copied
        # in /root/labs folder. here, ovpl is itself treated as a lab.
        self.repo_name = "ovpl"
        self.lab.get_lab_reqs("https://github.com/vlead/ovpl.git")

        # VM creation is part of setup since this is the requirement for every
        # test case.
        result = self.adapter.create_vm(self.lab_spec)
        self.vm_id = result[1]
        test_logger.debug("setup(): vm_id = %s" % self.vm_id)