mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
upgrading network packages (#47639)
This commit is contained in:
parent
e822450a79
commit
dfe554eaf8
7 changed files with 15 additions and 15 deletions
|
@ -61,7 +61,7 @@ AZURE_API_PROFILES = {
|
|||
snapshots='2017-03-30',
|
||||
virtual_machine_run_commands='2017-03-30'
|
||||
),
|
||||
'NetworkManagementClient': '2017-11-01',
|
||||
'NetworkManagementClient': '2018-08-01',
|
||||
'ResourceManagementClient': '2017-05-10',
|
||||
'StorageManagementClient': '2017-10-01',
|
||||
'WebsiteManagementClient': '2016-08-01',
|
||||
|
@ -212,7 +212,7 @@ AZURE_PKG_VERSIONS = {
|
|||
},
|
||||
'NetworkManagementClient': {
|
||||
'package_name': 'network',
|
||||
'expected_version': '1.7.1'
|
||||
'expected_version': '2.2.1'
|
||||
},
|
||||
'ResourceManagementClient': {
|
||||
'package_name': 'resource',
|
||||
|
@ -796,13 +796,13 @@ class AzureRMModuleBase(object):
|
|||
if not self._network_client:
|
||||
self._network_client = self.get_mgmt_svc_client(NetworkManagementClient,
|
||||
base_url=self._cloud_environment.endpoints.resource_manager,
|
||||
api_version='2017-11-01')
|
||||
api_version='2018-08-01')
|
||||
return self._network_client
|
||||
|
||||
@property
|
||||
def network_models(self):
|
||||
self.log("Getting network models...")
|
||||
return NetworkManagementClient.models("2017-11-01")
|
||||
return NetworkManagementClient.models("2018-08-01")
|
||||
|
||||
@property
|
||||
def rm_client(self):
|
||||
|
|
|
@ -434,7 +434,7 @@ from ansible.module_utils.common.dict_transformations import (
|
|||
|
||||
try:
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrestazure.azure_operation import AzureOperationPoller
|
||||
from msrest.polling import LROPoller
|
||||
from azure.mgmt.network import NetworkManagementClient
|
||||
from msrest.serialization import Model
|
||||
except ImportError:
|
||||
|
@ -835,7 +835,7 @@ class AzureRMApplicationGateways(AzureRMModuleBase):
|
|||
response = self.mgmt_client.application_gateways.create_or_update(resource_group_name=self.resource_group,
|
||||
application_gateway_name=self.name,
|
||||
parameters=self.parameters)
|
||||
if isinstance(response, AzureOperationPoller):
|
||||
if isinstance(response, LROPoller):
|
||||
response = self.get_poller_result(response)
|
||||
|
||||
except CloudError as exc:
|
||||
|
|
|
@ -693,7 +693,7 @@ class AzureRMLoadBalancer(AzureRMModuleBase):
|
|||
inbound_nat_pools_param = [self.network_models.InboundNatPool(
|
||||
name=item.get('name'),
|
||||
frontend_ip_configuration=self.network_models.SubResource(
|
||||
frontend_ip_configuration_id(
|
||||
id=frontend_ip_configuration_id(
|
||||
self.subscription_id,
|
||||
self.resource_group,
|
||||
self.name,
|
||||
|
@ -707,7 +707,7 @@ class AzureRMLoadBalancer(AzureRMModuleBase):
|
|||
load_balancing_rules_param = [self.network_models.LoadBalancingRule(
|
||||
name=item.get('name'),
|
||||
frontend_ip_configuration=self.network_models.SubResource(
|
||||
frontend_ip_configuration_id(
|
||||
id=frontend_ip_configuration_id(
|
||||
self.subscription_id,
|
||||
self.resource_group,
|
||||
self.name,
|
||||
|
@ -715,7 +715,7 @@ class AzureRMLoadBalancer(AzureRMModuleBase):
|
|||
)
|
||||
),
|
||||
backend_address_pool=self.network_models.SubResource(
|
||||
backend_address_pool_id(
|
||||
id=backend_address_pool_id(
|
||||
self.subscription_id,
|
||||
self.resource_group,
|
||||
self.name,
|
||||
|
@ -723,7 +723,7 @@ class AzureRMLoadBalancer(AzureRMModuleBase):
|
|||
)
|
||||
),
|
||||
probe=self.network_models.SubResource(
|
||||
probe_id(
|
||||
id=probe_id(
|
||||
self.subscription_id,
|
||||
self.resource_group,
|
||||
self.name,
|
||||
|
@ -739,7 +739,7 @@ class AzureRMLoadBalancer(AzureRMModuleBase):
|
|||
) for item in self.load_balancing_rules] if self.load_balancing_rules else None
|
||||
|
||||
self.new_load_balancer = self.network_models.LoadBalancer(
|
||||
sku=self.network_models.LoadBalancerSku(self.sku) if self.sku else None,
|
||||
sku=self.network_models.LoadBalancerSku(name=self.sku) if self.sku else None,
|
||||
location=self.location,
|
||||
tags=self.tags,
|
||||
frontend_ip_configurations=frontend_ip_configurations_param,
|
||||
|
|
|
@ -614,7 +614,7 @@ class AzureRMNetworkInterface(AzureRMModuleBase):
|
|||
if changed:
|
||||
if self.state == 'present':
|
||||
subnet = self.network_models.SubResource(
|
||||
'/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Network/virtualNetworks/{2}/subnets/{3}'.format(
|
||||
id='/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Network/virtualNetworks/{2}/subnets/{3}'.format(
|
||||
self.virtual_network['subscription_id'],
|
||||
self.virtual_network['resource_group'],
|
||||
self.virtual_network['name'],
|
||||
|
|
|
@ -322,7 +322,7 @@ class AzureRMSubnet(AzureRMModuleBase):
|
|||
address_prefix=results['address_prefix']
|
||||
)
|
||||
if results['network_security_group'].get('id'):
|
||||
subnet.network_security_group = self.network_models.NetworkSecurityGroup(results['network_security_group'].get('id'))
|
||||
subnet.network_security_group = self.network_models.NetworkSecurityGroup(id=results['network_security_group'].get('id'))
|
||||
if self.route_table:
|
||||
subnet.route_table = self.network_models.RouteTable(id=self.route_table)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ azure-mgmt-dns==1.2.0
|
|||
azure-mgmt-keyvault==0.40.0
|
||||
azure-mgmt-marketplaceordering==0.1.0
|
||||
azure-mgmt-monitor==0.5.2
|
||||
azure-mgmt-network==1.7.1
|
||||
azure-mgmt-network==2.3.0
|
||||
azure-mgmt-nspkg==2.0.0
|
||||
azure-mgmt-rdbms==1.4.1
|
||||
azure-mgmt-resource==1.2.2
|
||||
|
|
|
@ -13,7 +13,7 @@ azure-mgmt-dns==1.2.0
|
|||
azure-mgmt-keyvault==0.40.0
|
||||
azure-mgmt-marketplaceordering==0.1.0
|
||||
azure-mgmt-monitor==0.5.2
|
||||
azure-mgmt-network==1.7.1
|
||||
azure-mgmt-network==2.3.0
|
||||
azure-mgmt-nspkg==2.0.0
|
||||
azure-mgmt-rdbms==1.4.1
|
||||
azure-mgmt-resource==1.2.2
|
||||
|
|
Loading…
Reference in a new issue