Sha256: 3f2ed9caac9063b8a7eeaeb9b430b18dc20b8df1d60030e2959b8da9c17c04fc

Contents?: true

Size: 1.28 KB

Versions: 46

Compression:

Stored size: 1.28 KB

Contents

module ApiStub
  module Models
    module KeyVault
      # Mock class for Vault Model
      class Vault
        def self.create_vault_response(key_vault_client)
          vault = {
            'id' => '/subscriptions/<AZURE_SUBSCRIPTION_ID>/resourceGroups/fog-test-rg/providers/Microsoft.KeyVault/vaults/fog-test-kv',
            'name' => 'fog-test-kv',
            'type' => 'Microsoft.KeyVault/vaults',
            'location' => 'westus',
            'tags' => {},
            'properties' => {
              'sku' => {
                'family' => 'A',
                'name' => 'standard'
              },
              'tenantId' => '<AZURE_TENANT_ID>',
              'accessPolicies' => [
                {
                  'tenantId' => '<AZURE_TENANT_ID>',
                  'objectId' => '<AZURE_OBJECT_ID>',
                  'permissions' => {
                    'keys' => ['all'],
                    'secrets' => ['all']
                  }
                }
              ],
              'enabledForDeployment' => false,
              'vaultUri' => 'https://fog-test-kv.vault.azure.net/'
            }
          }
          vault_mapper = Azure::ARM::KeyVault::Models::Vault.mapper
          key_vault_client.deserialize(vault_mapper, vault, 'result.body')
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.2.5 test/api_stub/models/key_vault/vault.rb
fog-azure-rm-0.2.4 test/api_stub/models/key_vault/vault.rb
fog-azure-rm-0.2.3 test/api_stub/models/key_vault/vault.rb
fog-azure-rm-0.2.2 test/api_stub/models/key_vault/vault.rb
fog-azure-rm-0.2.1 test/api_stub/models/key_vault/vault.rb
fog-azure-rm-0.2.0 test/api_stub/models/key_vault/vault.rb