Skip to content

Commit

Permalink
fetch clustered datastores only if storagepod exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Tief committed Jul 15, 2022
1 parent d5ae100 commit 384e9d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions InventoryBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,10 @@ def create_vcenter_objects(self, vrops, target: str, token: str, query_specs: di
Vrops.get_dis_virtual_switch(vrops, target, token, [dc.uuid for dc in datacenter], query_specs=query_specs)
storagepod, self.response_codes[target]["storagepod"] = \
Vrops.get_SDRS_cluster(vrops, target, token, [dc.uuid for dc in datacenter], query_specs=query_specs)
clustered_datastores, self.response_codes[target]["clustered_datastores"] = \
Vrops.get_datastores(vrops, target, token, [sc.uuid for sc in storagepod], query_specs=query_specs)

if storagepod:
clustered_datastores, self.response_codes[target]["clustered_datastores"] = \
Vrops.get_datastores(vrops, target, token, [sc.uuid for sc in storagepod], query_specs=query_specs)

for vcenter_adapter in vcenter_adapter_list:
logger.debug(f'Collecting vCenter adapter: {vcenter_adapter.name}')
Expand Down

0 comments on commit 384e9d1

Please sign in to comment.