Sha256: 70e299fe25c5aca79390ef7653ee7d4fb0cb54df163fd9f992a125867cfa661f

Contents?: true

Size: 1.72 KB

Versions: 6

Compression:

Stored size: 1.72 KB

Contents

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

      # Mock class for Network Request
      class Mock
        def list_express_route_circuit_peerings(*)
          [
            {
              'name' => 'AzurePrivatePeering',
              'id' => '/subscriptions/########-####-####-####-############/resourceGroups/resource_group_name/providers/Microsoft.Network/expressRouteCircuits/circuit_name/peerings/Private',
              'etag' => 'W/\"cb87537e-fd92-48c7-905f-2efc95a47c8f\"',
              'properties' => {
                'provisioningState' => 'Succeeded',
                'peeringType' => 'AzurePrivatePeering',
                'azureASN' => 120,
                'peerASN' => 100,
                'primaryPeerAddressPrefix' => '192.168.1.0/30',
                'secondaryPeerAddressPrefix' => '192.168.2.0/30',
                'primaryAzurePort' => 'BRKAZUREIXP01-BN1-04GMR-CIS-1-PRIMARY',
                'secondaryAzurePort' => 'BRKAZUREIXP01-DM2-04GMR-CIS-1-SECONDARY',
                'state' => 'Enabled',
                'vlanId' => 200
              }
            }
          ]
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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