Class: Fog::Network::AzureRM::ExpressRouteServiceProvider

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/azurerm/models/network/express_route_service_provider.rb

Overview

Express Route Service Provider model class for Network Service

Class Method Summary collapse

Class Method Details

.parse(service_provider) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/fog/azurerm/models/network/express_route_service_provider.rb', line 11

def self.parse(service_provider)
  express_route_service_provider = {}
  express_route_service_provider['id'] = service_provider.id
  express_route_service_provider['name'] = service_provider.name

  express_route_service_provider['peering_locations'] = []
  service_provider.peering_locations.each do |peering_location|
    express_route_service_provider['peering_locations'] << peering_location
  end unless service_provider.peering_locations.nil?
  express_route_service_provider['bandwidths_offered'] = []
  service_provider.bandwidths_offered.each do |bandwidth_offered|
    express_route_service_provider['bandwidths_offered'] << bandwidth_offered
  end unless service_provider.bandwidths_offered.nil?
  express_route_service_provider
end