Loading docs/changelog.rst +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ A log of changes by version and date. :header: "Version", "Date", "Notes" :widths: 10, 10, 60 "1.2.3", "4/14/2021", "Removed comments and extra troubleshooting logging from newly added functions." "1.2.2", "4/14/2021", "Added StoragePool.get, StoragePool.search_uuid, StoragePool.search_name, StoragePool.get, StorageContainer.create, StorageContainer.update, StorageContainer.delete_name and StorageContainer.delete_uuid." "1.1.30", "4/1/2021", "Added prism.Vms.get_protection_rules." "1.1.29", "3/31/2021", "Added prism.Config.get_protection_rules." Loading ntnx_api/_version.py +1 −1 Original line number Diff line number Diff line Loading @@ -3,5 +3,5 @@ # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module __version_info__ = ('1', '2', '2') __version_info__ = ('1', '2', '3') __version__ = '.'.join(__version_info__) ntnx_api/prism.py +1 −6 Original line number Diff line number Diff line Loading @@ -3320,6 +3320,7 @@ class StorageContainer(object): if not self.storage_containers.get(clusteruuid) or refresh: logger.info('refreshing storage containers') self.get(clusteruuid) logger.info('searching containers in cluster "{0}" for uuid "{1}".'.format(clusteruuid, uuid)) logger.info('cluster {0} storage containers: {1}'.format(clusteruuid, self.storage_containers.get(clusteruuid))) found = next((item for item in self.storage_containers.get(clusteruuid) if item.get("storage_container_uuid") == uuid), None) Loading @@ -3339,19 +3340,13 @@ class StorageContainer(object): :rtype: ResponseDict """ logger = logging.getLogger('ntnx_api.prism.StorageContainer.search_name') # found = None if not self.storage_containers.get(clusteruuid) or refresh: logger.info('refreshing storage containers') self.get(clusteruuid) # containers = self.storage_containers.get(clusteruuid) logger.info('searching containers in cluster "{0}" for name "{1}".'.format(clusteruuid, name)) logger.info('cluster {0} storage containers: {1}'.format(clusteruuid, self.storage_containers.get(clusteruuid))) found = next((item for item in self.storage_containers.get(clusteruuid) if item.get("name") == name), None) # for entity in containers: # if entity.get('name') == name: # found = entity # break logger.info('found storage container: {0}'.format(found)) return found Loading Loading
docs/changelog.rst +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ A log of changes by version and date. :header: "Version", "Date", "Notes" :widths: 10, 10, 60 "1.2.3", "4/14/2021", "Removed comments and extra troubleshooting logging from newly added functions." "1.2.2", "4/14/2021", "Added StoragePool.get, StoragePool.search_uuid, StoragePool.search_name, StoragePool.get, StorageContainer.create, StorageContainer.update, StorageContainer.delete_name and StorageContainer.delete_uuid." "1.1.30", "4/1/2021", "Added prism.Vms.get_protection_rules." "1.1.29", "3/31/2021", "Added prism.Config.get_protection_rules." Loading
ntnx_api/_version.py +1 −1 Original line number Diff line number Diff line Loading @@ -3,5 +3,5 @@ # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module __version_info__ = ('1', '2', '2') __version_info__ = ('1', '2', '3') __version__ = '.'.join(__version_info__)
ntnx_api/prism.py +1 −6 Original line number Diff line number Diff line Loading @@ -3320,6 +3320,7 @@ class StorageContainer(object): if not self.storage_containers.get(clusteruuid) or refresh: logger.info('refreshing storage containers') self.get(clusteruuid) logger.info('searching containers in cluster "{0}" for uuid "{1}".'.format(clusteruuid, uuid)) logger.info('cluster {0} storage containers: {1}'.format(clusteruuid, self.storage_containers.get(clusteruuid))) found = next((item for item in self.storage_containers.get(clusteruuid) if item.get("storage_container_uuid") == uuid), None) Loading @@ -3339,19 +3340,13 @@ class StorageContainer(object): :rtype: ResponseDict """ logger = logging.getLogger('ntnx_api.prism.StorageContainer.search_name') # found = None if not self.storage_containers.get(clusteruuid) or refresh: logger.info('refreshing storage containers') self.get(clusteruuid) # containers = self.storage_containers.get(clusteruuid) logger.info('searching containers in cluster "{0}" for name "{1}".'.format(clusteruuid, name)) logger.info('cluster {0} storage containers: {1}'.format(clusteruuid, self.storage_containers.get(clusteruuid))) found = next((item for item in self.storage_containers.get(clusteruuid) if item.get("name") == name), None) # for entity in containers: # if entity.get('name') == name: # found = entity # break logger.info('found storage container: {0}'.format(found)) return found Loading