Skip to content

Commit

Permalink
Merge branch 'dev' into add_vpnsite
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred-sun authored Apr 12, 2021
2 parents b7bd1b4 + d4c06b1 commit 6eb4604
Show file tree
Hide file tree
Showing 21 changed files with 2,677 additions and 5 deletions.
4 changes: 3 additions & 1 deletion plugins/doc_fragments/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ class ModuleDocFragment(object):
version_added: '0.0.1'
requirements:
- python >= 2.7
- azure >= 2.0.0
- The host that executes this module must have the azure.azcollection collection installed via galaxy
- All python packages listed in collection's requirements-azure.txt must be installed via pip on the host that executes modules from azure.azcollection
- Full installation instructions may be found https://galaxy.ansible.com/azure/azcollection
notes:
- For authentication with Azure you can pass parameters, set environment variables, use a profile stored
Expand Down
12 changes: 11 additions & 1 deletion plugins/module_utils/azure_rm_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def default_api_version(self):
'ManagementGroupsClient': '2020-05-01',
'NetworkManagementClient': '2019-06-01',
'ResourceManagementClient': '2017-05-10',
'SearchManagementClient': '2020-08-01',
'StorageManagementClient': '2019-06-01',
'SubscriptionClient': '2019-11-01',
'WebSiteManagementClient': '2018-02-01',
Expand Down Expand Up @@ -271,6 +272,7 @@ def default_api_version(self):
from azure.mgmt.resource.locks import ManagementLockClient
from azure.mgmt.recoveryservicesbackup import RecoveryServicesBackupClient
import azure.mgmt.recoveryservicesbackup.models as RecoveryServicesBackupModels
from azure.mgmt.search import SearchManagementClient
from azure.mgmt.datalake.store import DataLakeStoreAccountManagementClient
import azure.mgmt.datalake.store.models as DataLakeStoreAccountModel

Expand Down Expand Up @@ -435,6 +437,7 @@ def __init__(self, derived_arg_spec, bypass_checks=False, no_log=False,
self._IoThub_client = None
self._lock_client = None
self._recovery_services_backup_client = None
self._search_client = None
self._datalake_store_client = None

self.check_mode = self.module.check_mode
Expand Down Expand Up @@ -1301,6 +1304,14 @@ def recovery_services_backup_models(self):
return RecoveryServicesBackupModels

@property
def search_client(self):
self.log('Getting search client...')
if not self._search_client:
self._search_client = self.get_mgmt_svc_client(SearchManagementClient,
base_url=self._cloud_environment.endpoints.resource_manager,
api_version='2020-08-01')
return self._search_client

def datalake_store_client(self):
self.log('Getting datalake store client...')
if not self._datalake_store_client:
Expand All @@ -1309,7 +1320,6 @@ def datalake_store_client(self):
api_version='2016-11-01')
return self._datalake_store_client

@property
def datalake_store_models(self):
return DataLakeStoreAccountModel

Expand Down
Loading

0 comments on commit 6eb4604

Please sign in to comment.