示例#1
0
文件: vmops.py 项目: cp16net/reddwarf
 def _upload_vmdk_to_image_repository():
     # Upload the contents of -flat.vmdk file which has the disk data.
     LOG.debug(_("Uploading image %s") % snapshot_name)
     vmware_images.upload_image(
         snapshot_name,
         instance,
         os_type=os_type,
         adapter_type=adapter_type,
         image_version=1,
         host=self._session._host_ip,
         data_center_name=self._get_datacenter_name_and_ref()[1],
         datastore_name=datastore_name,
         cookies=cookies,
         file_path="vmware-tmp/%s-flat.vmdk" % random_name)
     LOG.debug(_("Uploaded image %s") % snapshot_name)
示例#2
0
文件: vmops.py 项目: superstack/nova
 def _upload_vmdk_to_image_repository():
     # Upload the contents of -flat.vmdk file which has the disk data.
     LOG.debug(_("Uploading image %s") % snapshot_name)
     vmware_images.upload_image(
         snapshot_name,
         instance,
         os_type=os_type,
         adapter_type=adapter_type,
         image_version=1,
         host=self._session._host_ip,
         data_center_name=self._get_datacenter_name_and_ref()[1],
         datastore_name=datastore_name,
         cookies=cookies,
         file_path="vmware-tmp/%s-flat.vmdk" % random_name)
     LOG.debug(_("Uploaded image %s") % snapshot_name)