Skip to content

Commit

Permalink
Supplying a fix for "vmware-archive#836: vm creation is failing on vs…
Browse files Browse the repository at this point in the history
…anDatastore"

Addressing Mark's comment (renaming method parameter to more meaningful name)
  • Loading branch information
shuklanirdesh82 committed Dec 22, 2016
1 parent 7618485 commit 697becf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions esx_service/vmdk_ops_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def test_failure(self):
with self.assertRaises(vmdk_ops.ValidationError):
vmdk_ops.validate_opts(opts, self.path)

def create_vm(si, vm_name, datastore):
def create_vm(si, vm_name, vm_path):
""" Create a VM """
content = si.RetrieveContent()
datacenter = content.rootFolder.childEntity[0]
Expand All @@ -397,14 +397,11 @@ def create_vm(si, vm_name, datastore):
resource_pool = hosts[0].resourcePool
logging.info("datacenter={0} vm_folder={1} hosts={2} resource_pool={3}".format(datacenter, vm_folder,
hosts, resource_pool))

datastore_path = '[' + datastore + '] ' + vm_name

# bare minimum VM shell, no disks. Feel free to edit
vmx_file = vim.vm.FileInfo(logDirectory=None,
snapshotDirectory=None,
suspendDirectory=None,
vmPathName=datastore_path)
vmPathName='[' + vm_path + '] ')


config = vim.vm.ConfigSpec(
Expand Down

0 comments on commit 697becf

Please # to comment.