Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
scydeai committed Sep 26, 2019
1 parent b380381 commit f8a2e0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/cloud_provider/clients/vsphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def create_image(self, zone):
container = content.rootFolder
viewType = [vim.Folder]
folder = get_obj(content, viewType, container, 'kubeoperator')
dc = get_obj(content, [vim.Datacenter], container, zone.region.cloud_region)
if not folder:
dc.vmFolder.CreateFolder('kubeoperator')
viewType = [vim.VirtualMachine]
vm = get_obj(content, viewType, folder, zone.region.image_name)
ds = get_obj(content, [vim.Datastore], container, zone.vars['vc_storage'])
Expand Down

0 comments on commit f8a2e0b

Please sign in to comment.