def __init__(self, default_project_id=None, project_id=None, folder_id=None, organization_id=None, all_projects=None): super().__init__('cloudresourcemanager', 'v1') self.default_project_id = default_project_id self.all_projects = all_projects self.project_id = project_id self.folder_id = folder_id self.organization_id = organization_id self.cloudresourcemanager = CloudResourceManagerFacade() self.cloudsql = CloudSQLFacade() self.cloudstorage = CloudStorageFacade() self.cloudmemorystoreredis = CloudMemorystoreRedisFacade() self.gce = GCEFacade() self.iam = IAMFacade() self.kms = KMSFacade() self.stackdriverlogging = StackdriverLoggingFacade() self.stackdrivermonitoring = StackdriverMonitoringFacade() # Instantiate facades for proprietary services try: self.gke = GKEFacade(self.gce) except NameError as _: pass
def __init__(self, default_project_id=None, project_id=None, folder_id=None, organization_id=None, all_projects=None): super(GCPFacade, self).__init__('cloudresourcemanager', 'v1') self.default_project_id = default_project_id self.all_projects = all_projects self.project_id = project_id self.folder_id = folder_id self.organization_id = organization_id self.cloudresourcemanager = CloudResourceManagerFacade() self.cloudsql = CloudSQLFacade() self.cloudstorage = CloudStorageFacade() self.gce = GCEFacade() self.iam = IAMFacade() self.kms = KMSFacade() self.stackdriverlogging = StackdriverLoggingFacade() # Instantiate facades for proprietary services try: self.gke = GKEFacade(self.gce) except NameError as _: pass # Set logging level to error for GCP services as otherwise generates a lot of warnings logging.getLogger('googleapiclient.discovery_cache').setLevel( logging.ERROR) logging.getLogger().setLevel(logging.ERROR)