Sha256: 4c28a1f34e13b33fa841e587eb7283f414127a306147a529d1bf0a3c25176795

Contents?: true

Size: 1.81 KB

Versions: 47

Compression:

Stored size: 1.81 KB

Contents

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

      # Mock class for Express Route Circuit Peering Request
      class Mock
        def get_express_route_circuit_peering(*)
          {
            'name' => 'peering_name',
            'id' => '/subscriptions/########-####-####-####-############/resourceGroups/resource_group_name/providers/Microsoft.Network/expressRouteCircuits/circuit_name/peerings/peering_name',
            'etag' => '',
            'properties' => {
              'provisioningState' => 'Succeeded',
              'peeringType' => 'MicrosoftPeering',
              'peerASN' => '',
              'primaryPeerAddressPrefix' => '',
              'secondaryPeerAddressPrefix' => '',
              'primaryAzurePort' => 22,
              'secondaryAzurePort' => 21,
              'state' => 'Enabled',
              'sharedKey' => '',
              'vlanId' => 100,
              'microsoftPeeringConfig' => {
                'advertisedpublicprefixes' => %w(prefix1 prefix2),
                'advertisedPublicPrefixState' => 'ValidationNeeded',
                'customerAsn' => '',
                'routingRegistryName' => ''
              }
            }
          }
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
far-gem-0.5.6 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
far-gem-0.5.5 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
far-gem-0.5.4 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
far-gem-0.5.3 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
far-gem-0.5.2 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
far-gem-0.5.1 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb