azure_rm_aks_facts_4.py 567 B

1234567891011121314151617
  1. def list_items(self):
  2. """Get all Azure Kubernetes Services"""
  3. self.log('List all Azure Kubernetes Services')
  4. try:
  5. response = self.containerservice_client.managed_clusters.list(
  6. self.resource_group)
  7. except AzureHttpError as exc:
  8. self.fail('Failed to list all items - {0}'.format(str(exc)))
  9. results = []
  10. for item in response:
  11. if self.has_tags(item.tags, self.tags):
  12. results.append(self.serialize_obj(item, AZURE_OBJECT_CLASS))
  13. return results