Skip to content

Commit

Permalink
[Network] Fix Express-Route RouteFilter issue (Azure#3419)
Browse files Browse the repository at this point in the history
* Fix issue with express-route peering create.

* Fix issue with update convenience arguments.
  • Loading branch information
tjprescott authored May 23, 2017
1 parent e1f79fd commit 6abab50
Show file tree
Hide file tree
Showing 5 changed files with 1,249 additions and 1,417 deletions.
2 changes: 2 additions & 0 deletions src/command_modules/azure-cli-network/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Release History
unreleased
++++++++++++++++++

* `express-route peering create`: fix bug when creating a peering without route filtering.
* `express-route update`: fix bug where --provider and --bandwidth arguments did not work.
* `network watcher show-topology`: Fix bug with location defaulting logic.

2.0.6 (2017-05-09)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1657,13 +1657,13 @@ def create_express_route(circuit_name, resource_group_name, bandwidth_in_mbps, p
def update_express_route(instance, bandwidth_in_mbps=None, peering_location=None,
service_provider_name=None, sku_family=None, sku_tier=None, tags=None):
if bandwidth_in_mbps is not None:
instance.service_provider_properties.bandwith = bandwidth_in_mbps
instance.service_provider_properties.bandwith_in_mbps = bandwidth_in_mbps

if peering_location is not None:
instance.service_provider_properties.peering_location = peering_location

if service_provider_name is not None:
instance.service_provider_properties.provider = service_provider_name
instance.service_provider_properties.service_provider_name = service_provider_name

if sku_family is not None:
instance.sku.family = sku_family
Expand Down Expand Up @@ -1727,7 +1727,7 @@ def create_express_route_peering(
secondary_peer_address_prefix=secondary_peer_address_prefix,
shared_key=shared_key,
microsoft_peering_config=peering_config)
if supported_api_version(ResourceType.MGMT_NETWORK, min_api='2016-12-01'):
if supported_api_version(ResourceType.MGMT_NETWORK, min_api='2016-12-01') and route_filter:
RouteFilter = get_sdk(ResourceType.MGMT_NETWORK, 'RouteFilter', mod='models')
peering.route_filter = RouteFilter(id=route_filter)
return client.create_or_update(
Expand Down
Loading

0 comments on commit 6abab50

Please sign in to comment.