Sha256: 8ebea136191cbfe4c3139215b2f8f3c41cbf0a30600d00410f8963526e170b81

Contents?: true

Size: 1.34 KB

Versions: 2

Compression:

Stored size: 1.34 KB

Contents

module Fog
  module Network
    class AzureRM
      # Real class for Express Route Circuit Authorization Request
      class Real
        def get_express_route_circuit_authorization(resource_group_name, circuit_name, authorization_name)
          msg = "Getting Express Route Circuit Authorization #{authorization_name} from Resource Group #{resource_group_name}."
          Fog::Logger.debug msg
          begin
            circuit_authorization = @network_client.express_route_circuit_authorizations.get(resource_group_name, circuit_name, authorization_name)
          rescue MsRestAzure::AzureOperationError => e
            raise_azure_exception(e, msg)
          end
          circuit_authorization
        end
      end

      # Mock class for Express Route Circuit Authorization Request
      class Mock
        def get_express_route_circuit_authorization(*)
          authorization = {
            'name' => 'authorization-name',
            'properties' => {
              'authorizationKey' => 'authorization-key',
              'authorizationUseStatus' => 'Available'
            }
          }
          authorization_mapper = Azure::ARM::Network::Models::ExpressRouteCircuitAuthorization.mapper
          @network_client.deserialize(authorization_mapper, authorization, 'result.body')
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-azure-rm-0.0.8 lib/fog/azurerm/requests/network/get_express_route_circuit_authorization.rb
fog-azure-rm-0.0.6 lib/fog/azurerm/requests/network/get_express_route_circuit_authorization.rb