コード例 #1
0
 def call_victim(self, config):
     env = ApplicationVersion("DEV", "04fab6", "my-branch")
     with mock.patch(
             "takeoff.azure.credentials.keyvault.ServicePrincipalCredentials.credentials",
             return_value="mylittlepony") as m_creds:
         victim.vault_and_client(config, env)
     m_creds.assert_called_once_with(config, "dev")
コード例 #2
0
 def __init__(self, env: ApplicationVersion, config: dict):
     super().__init__(env, config)
     self.vault_name, self.vault_client = KeyVaultClient.vault_and_client(
         self.config, self.env)
     self.databricks_client = Databricks(
         self.vault_name, self.vault_client).api_client(self.config)
     self.secret_api = SecretApi(self.databricks_client)
コード例 #3
0
ファイル: cosmos.py プロジェクト: timvancann/takeoff
 def _get_cosmos_management_client(self) -> CosmosDB:
     vault, client = KeyVaultClient.vault_and_client(self.config, self.env)
     credentials = ActiveDirectoryUserCredentials(
         vault_name=vault, vault_client=client).credentials(self.config)
     return CosmosDB(
         credentials,
         SubscriptionId(vault, client).subscription_id(self.config))
コード例 #4
0
 def __init__(self, config, app_version):
     super().__init__(config, app_version)
     self.vault_name, self.vault_client = KeyVaultClient.vault_and_client(
         self.config, self.env)
コード例 #5
0
 def __init__(self, env: ApplicationVersion, config: dict):
     super().__init__(env, config)
     self.vault_name, self.vault_client = KeyVaultClient.vault_and_client(
         self.config, self.env)
コード例 #6
0
 def __init__(self, env: ApplicationVersion, config: dict):
     self.env = env
     self.config = config
     self.vault_name, self.vault_client = KeyVaultClient.vault_and_client(
         self.config, self.env)