Exemple #1
0
    def get_auth_endpoint(self, endpoint):
        if endpoint == constants.VAULT_AUTH_ENDPOINT:
            return get_keyvault_auth_endpoint(self.cloud_endpoints)

        elif endpoint == constants.STORAGE_AUTH_ENDPOINT:
            # These endpoints are not Cloud specific, but the suffixes are
            return constants.STORAGE_AUTH_ENDPOINT
        else:
            return getattr(self.cloud_endpoints.endpoints, endpoint)
 def test_get_keyvault_auth_china(self):
     auth = get_keyvault_auth_endpoint(AZURE_CHINA_CLOUD)
     self.assertEqual('https://vault.azure.cn', auth)
 def test_get_keyvault_auth_public(self):
     auth = get_keyvault_auth_endpoint(AZURE_PUBLIC_CLOUD)
     self.assertEqual('https://vault.azure.net', auth)