Exemplo n.º 1
0
def test_form_url_images_all_xml():
    """Form URL for all images in XML format"""
    url = ifsrequest.__form_url("google", "images")
    expected = "https://susepubliccloudinfo.suse.com/v1/google/images.xml"
    assert_equals(expected, url)
Exemplo n.º 2
0
def test_form_url_servers_smt_xml():
    """Form the URL for all SMT servers in XML"""
    url = ifsrequest.__form_url("hp", "servers", server_type="smt")
    expected = "https://susepubliccloudinfo.suse.com/v1/hp/servers/smt.xml"
    assert_equals(expected, url)
Exemplo n.º 3
0
def test_form_url_images_active_region_json():
    """Form the URL for active images in JSON format in a given region"""
    url = ifsrequest.__form_url("amazon", "images", data_format="json", region="us-east-1", image_state="active")
    expected = "https://susepubliccloudinfo.suse.com/v1/"
    expected += "amazon/us-east-1/images/active.json"
    assert_equals(expected, url)
Exemplo n.º 4
0
def test_form_url_servers_all_json():
    """Form the URL for all servers in JSON format"""
    url = ifsrequest.__form_url("amazon", "servers", "json")
    expected = "https://susepubliccloudinfo.suse.com/v1/amazon/servers.json"
    assert_equals(expected, url)