def get_image_id_another_region(glance_url, image_name, token):
    """It obtains the image in another regions
    :param glance_url: the sdc url
    :param token: the valid token
    :param image_name: image name
    """
    url = glance_url + '/images?property-sdc_aware=true'
    headers = {'Accept': 'application/json', 'X-Auth-Token': token}
    try:
        response = requests.get(url, headers=headers)
        response_json = response.json()
        for image_info in response_json['images']:
            if image_info['name'] == image_name:
                return image_info['id']
        return None
    except Exception as e:
        return None
def get_image_id_another_region ( glance_url , image_name , token ) : url = glance_url + '/images?property-sdc_aware=true' headers = { 'Accept' : 'application/json' , 'X-Auth-Token' : token } try : response = requests . get ( url , headers = headers ) response_json = response . json ( ) for image_info in response_json [ 'images' ] : if image_info [ 'name' ] == image_name : return image_info [ 'id' ] return None except Exception as e : return None
It obtains the image in another regions
    :param glance_url: the sdc url
    :param token: the valid token
    :param image_name: image name