def get_datacenter(conn):
 datacenter_id = get_datacenter_id()
 for item in conn.list_datacenters()['items']:
  if (item['id'] == datacenter_id):
   return item
 raise SaltCloudNotFound("The specified datacenter '{0}' could not be found.".format(datacenter_id))

def get_datacenter ( conn ) : datacenter_id = get_datacenter_id ( ) for item in conn . list_datacenters ( ) [ 'items' ] : if ( item [ 'id' ] == datacenter_id ) : return item raise SaltCloudNotFound ( "The specified datacenter '{0}' could not be found." . format ( datacenter_id ) )
return the datacenter from the config provider datacenter id .