コード例 #1
0
ファイル: test_base_VM.py プロジェクト: teiszler/nephele
 def test_import_base(self):
     try:
         self.base_vm_path, self.base_hashvalue = PackagingUtil.import_basevm(
             self.base_vm_cirros_filepath)
         self.assertTrue(os.path.exists(self.base_vm_path))
         self.assertIsInstance(self.base_hashvalue, str)
     except Exception as e:
         self.assertTrue(False, str(e))
コード例 #2
0
 def test_import_base(self):
     try:
         self.base_vm_path, self.base_hashvalue = PackagingUtil.import_basevm(
             self.base_vm_cirros_filepath)
         self.assertTrue(os.path.exists(self.base_vm_path))
         self.assertIsInstance(self.base_hashvalue, str)
     except Exception as e:
         self.assertTrue(False, str(e))
コード例 #3
0
 def setUp(self):
     super(TestCreatingVMOverlay, self).setUp()
     self.temp_dir = mkdtemp(prefix="cloudlet-test-vmoverlay-")
     self.base_vm_cirros_filepath = os.path.join(
         self.temp_dir, os.path.basename(Const.base_vm_cirros_url))
     VMUtility.download_baseVM(Const.base_vm_cirros_url,
                               self.base_vm_cirros_filepath)
     self.base_vm_path, self.base_hashvalue = PackagingUtil.import_basevm(
         self.base_vm_cirros_filepath)
     self.overlay_filepath = None
コード例 #4
0
ファイル: test_base_VM.py プロジェクト: teiszler/nephele
    def setUp(self):
        super(TestBaseExport, self).setUp()
        # import base VM to export it
        self.temp_dir = mkdtemp(prefix="cloudlet-test-basevm-")
        self.base_vm_cirros_filepath = os.path.join(
            self.temp_dir, os.path.basename(Const.base_vm_cirros_url))
        VMUtility.download_baseVM(Const.base_vm_cirros_url,
                                  self.base_vm_cirros_filepath)
        self.base_vm_path, self.base_hashvalue = PackagingUtil.import_basevm(
            self.base_vm_cirros_filepath)

        # path for exported base VM
        self.export_outpath = os.path.join(self.temp_dir, "exported-base.zip")
コード例 #5
0
    def setUp(self):
        super(TestBaseExport, self).setUp()
        # import base VM to export it
        self.temp_dir = mkdtemp(prefix="cloudlet-test-basevm-")
        self.base_vm_cirros_filepath = os.path.join(
            self.temp_dir, os.path.basename(Const.base_vm_cirros_url))
        VMUtility.download_baseVM(Const.base_vm_cirros_url,
                                  self.base_vm_cirros_filepath)
        self.base_vm_path, self.base_hashvalue = PackagingUtil.import_basevm(
            self.base_vm_cirros_filepath)

        # path for exported base VM
        self.export_outpath = os.path.join(self.temp_dir, "exported-base.zip")
コード例 #6
0
ファイル: test_handoff.py プロジェクト: teiszler/nephele
    def setUp(self):
        super(TestSynthesis, self).setUp()
        # check parameters
        self.overlay_url = Const.overlay_url_cirros
        try:
            urllib2.urlopen(self.overlay_url)
        except Exception as e:
            self.assertTrue(
                False,
                "Inlid overlay URL: %s\n%s" % (self.overlay_url, str(e))
            )

        # import base VM
        self.temp_dir = mkdtemp(prefix="cloudlet-test-vmoverlay-")
        self.base_vm_cirros_filepath = os.path.join(
            self.temp_dir, os.path.basename(Const.base_vm_cirros_url))
        VMUtility.download_baseVM(Const.base_vm_cirros_url,
                                  self.base_vm_cirros_filepath)
        self.base_vm_path, self.base_hashvalue = PackagingUtil.import_basevm(
            self.base_vm_cirros_filepath)