Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new module] Azure Traffic Manager profile module #43812

Merged
merged 29 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/ansible/module_utils/azure_rm_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
from azure.mgmt.web import WebSiteManagementClient
from azure.mgmt.containerservice import ContainerServiceClient
from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements
from azure.mgmt.trafficmanager import TrafficManagerManagementClient
from azure.storage.cloudstorageaccount import CloudStorageAccount
from adal.authentication_context import AuthenticationContext
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
Expand Down Expand Up @@ -222,6 +223,10 @@ def normalize_location_name(name):
'package_name': 'web',
'expected_version': '0.32.0'
},
'TrafficManagerManagementClient': {
'package_name': 'trafficmanager',
'expected_version': '0.50.0'
},
} if HAS_AZURE else {}


Expand Down Expand Up @@ -282,6 +287,8 @@ def __init__(self, derived_arg_spec, bypass_checks=False, no_log=False,
self._postgresql_client = None
self._containerregistry_client = None
self._containerinstance_client = None
self._traffic_manager_management_client = None

self._adfs_authority_url = None
self._resource = None

Expand Down Expand Up @@ -1109,3 +1116,11 @@ def marketplace_client(self):
self._marketplace_client = self.get_mgmt_svc_client(MarketplaceOrderingAgreements,
base_url=self._cloud_environment.endpoints.resource_manager)
return self._marketplace_client

@property
def traffic_manager_management_client(self):
self.log('Getting traffic manager client')
if not self._traffic_manager_management_client:
self._traffic_manager_management_client = self.get_mgmt_svc_client(TrafficManagerManagementClient,
base_url=self._cloud_environment.endpoints.resource_manager)
return self._traffic_manager_management_client