Skip to content

Commit

Permalink
dont validate saved sandbox storage if not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
nahumtimerman committed Jul 11, 2018
1 parent ae8930a commit 7c740ed
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ def _validate_vm_storage(self, si, all_items_in_vc, auto_att, dc_name, attribute

def _validate_saved_sandbox_storage(self, si, all_items_in_vc, auto_att, dc_name, attributes, key):
accepted_types = (vim.Datastore, vim.StoragePod)

# saved sandbox storage isnt mandatory so if not configured exit without validation
if key not in attributes or not attributes[key]:
return

datastore = self._validate_attribute(si, attributes, accepted_types, key, dc_name)
if not datastore:
datastore = self._get_default(all_items_in_vc, accepted_types, key)
Expand Down

0 comments on commit 7c740ed

Please sign in to comment.