def get_provider_metadata(metadata_url, supports_recursive=False, headers=None, expect_json=False):
 try:
  if supports_recursive:
   metadata = query_metadata(metadata_url, headers, expect_json)
  else:
   metadata = walk_metadata(metadata_url, headers, expect_json)
 except OpenShiftFactsMetadataUnavailableError:
  metadata = None
 return metadata

def get_provider_metadata ( metadata_url , supports_recursive = False , headers = None , expect_json = False ) : try : if supports_recursive : metadata = query_metadata ( metadata_url , headers , expect_json ) else : metadata = walk_metadata ( metadata_url , headers , expect_json ) except OpenShiftFactsMetadataUnavailableError : metadata = None return metadata
retrieve the provider metadata args: metadata_url : metadata url supports_recursive : does the provider metadata api support recursion headers : headers to set for metadata request expect_json : does the metadata_url return json returns: dict: the provider metadata .