lib/fog/azurerm/models/network/express_route_circuit.rb in fog-azure-rm-0.1.0 vs lib/fog/azurerm/models/network/express_route_circuit.rb in fog-azure-rm-0.1.1
- old
+ new
@@ -27,11 +27,10 @@
express_route_circuit['name'] = circuit.name
express_route_circuit['location'] = circuit.location
express_route_circuit['service_key'] = circuit.service_key
express_route_circuit['service_provider_notes'] = circuit.service_provider_notes
express_route_circuit['resource_group'] = get_resource_group_from_id(circuit.id)
- express_route_circuit['resource_group'] = circuit.id.split('/')[4]
express_route_circuit['tags'] = circuit.tags
sku = circuit.sku
unless sku.nil?
express_route_circuit['sku_name'] = sku.name
express_route_circuit['sku_tier'] = sku.tier
@@ -54,23 +53,22 @@
express_route_circuit
end
def save
requires :location, :tags, :resource_group, :service_provider_name, :peering_location, :bandwidth_in_mbps
- express_route_parameters = express_route_circuit_params
- circuit = service.create_or_update_express_route_circuit(express_route_parameters)
+ circuit = service.create_or_update_express_route_circuit(express_route_circuit_params)
merge_attributes(Fog::Network::AzureRM::ExpressRouteCircuit.parse(circuit))
end
def destroy
service.delete_express_route_circuit(resource_group, name)
end
private
def express_route_circuit_params
- express_route_parameters = {
+ {
resource_group_name: resource_group,
circuit_name: name,
location: location,
tags: tags,
sku_name: sku_name,
@@ -79,10 +77,9 @@
service_provider_name: service_provider_name,
peering_location: peering_location,
bandwidth_in_mbps: bandwidth_in_mbps,
peerings: peerings
}
- express_route_parameters
end
end
end
end
end