Example #1
0
def test_get_nova_endpoint():
    assert KeystoneCatalog.get_nova_endpoint(
        common.EXAMPLE_AUTH_RESPONSE
    ) == u'http://10.0.2.15:8774/v2.1/0850707581fe4d738221a72db0182876'
    assert KeystoneCatalog.get_nova_endpoint(
        common.EXAMPLE_AUTH_RESPONSE,
        nova_api_version='v2') == u'http://10.0.2.15:8773/'
Example #2
0
def test_from_auth_response():
    catalog = KeystoneCatalog.from_auth_response(common.EXAMPLE_AUTH_RESPONSE,
                                                 'v2.1')
    assert isinstance(catalog, KeystoneCatalog)
    assert catalog.neutron_endpoint == u'http://10.0.2.15:9292'
    assert catalog.nova_endpoint == u'http://10.0.2.15:8774/v2.1/0850707581fe4d738221a72db0182876'
Example #3
0
def test_get_neutron_endpoint():
    assert KeystoneCatalog.get_neutron_endpoint(
        common.EXAMPLE_AUTH_RESPONSE) == u'http://10.0.2.15:9292'