Sha256: 26759a11bd49ce5de86fdf5a6dc0b5709b2ff0dfed886d1a17497e039c994726

Contents?: true

Size: 873 Bytes

Versions: 5

Compression:

Stored size: 873 Bytes

Contents

module Fog
  module Network
    class AzureRM
      # Real class for Network Request
      class Real
        def get_connection_shared_key(resource_group_name, connection_shared_key_name)
          msg = "Getting the shared key of Connection #{connection_shared_key_name} from Resource Group #{resource_group_name}."
          Fog::Logger.debug msg
          begin
            @network_client.virtual_network_gateway_connections.get_shared_key(resource_group_name, connection_shared_key_name).value
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
        end
      end

      # Mock class for Network Request
      class Mock
        def get_connection_shared_key(*)
          Fog::Logger.debug 'Get the shared key of Connection successfully.'
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.1 lib/fog/azurerm/requests/network/get_connection_shared_key.rb
fog-azure-rm-0.1.0 lib/fog/azurerm/requests/network/get_connection_shared_key.rb
fog-azure-rm-0.0.9 lib/fog/azurerm/requests/network/get_connection_shared_key.rb
fog-azure-rm-0.0.8 lib/fog/azurerm/requests/network/get_connection_shared_key.rb
fog-azure-rm-0.0.6 lib/fog/azurerm/requests/network/get_connection_shared_key.rb