mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
[new module] Azure Traffic Manager profile module (#43812)
* add traffic manager client and models in azure_rm_common - add traffic manager management client - import traffic manager models to 'traffic_manager_models' proprety - azure.mgmt.trafficmanager doesn't have models(), so use direct import for now * add traffic manager facts module * add traffic manager module * add integration test for two modules * fix package info in requirements * fix sanity check * fix monitor config default value * fix facts module doc * move model import into module * resolve comments except seprating endpoint * remove endpoint operation * fix test after removing endpoint operation * change module name to azure_rm_trafficmanagerprofile/facts * fix sanity test * seperate endpoint into delegate module * fix typo * fix lint * fix lint * fix test * fix test * resolve comments * fix test * fix test * fix test * fix bug in return * resolve comments * fix lint * fix lint * add sample in endpoint module
This commit is contained in:
parent
fbcdf8ba5b
commit
ccb7909cc5
10 changed files with 1814 additions and 0 deletions
|
@ -150,6 +150,7 @@ try:
|
|||
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
|
||||
|
@ -222,6 +223,10 @@ AZURE_PKG_VERSIONS = {
|
|||
'package_name': 'web',
|
||||
'expected_version': '0.32.0'
|
||||
},
|
||||
'TrafficManagerManagementClient': {
|
||||
'package_name': 'trafficmanager',
|
||||
'expected_version': '0.50.0'
|
||||
},
|
||||
} if HAS_AZURE else {}
|
||||
|
||||
|
||||
|
@ -282,6 +287,8 @@ class AzureRMModuleBase(object):
|
|||
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
|
||||
|
||||
|
@ -1109,3 +1116,11 @@ class AzureRMModuleBase(object):
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue