Skip to content

Commit

Permalink
Add new module azure_rm_datalakestore (#352)
Browse files Browse the repository at this point in the history
* First functional create datalake store module

* Added absent action and added Api profile to latest in order to avoid warning

* Added more info from datalake to results.state and improved some piece of code

* Added tags and new tier capability. Update method added

* Added encryption state and config to variables

* Added firewall to parameters

* Added virtual network rules to parameters

* Fixed problems with encryption_config -> key_vault_meta_info parameter

* Added info module

* Added documentation to info module

* Restore poller, added compare lists for update and fix some issues with account_obj_to_dict

* Added test

* Completed documentation

* Added ignore sanity tests and added to pr-pipelines

* Resolved pylint messages

* Fixes sanity warnings

* Fixed sanity errors

* Change author to list

* Fixed name of returned param and set task name correctly

* Fix errors in merge

* Fix merge error

* Added missing blank line

* Modified comments on PR

Co-authored-by: haiyuan_zhang <[email protected]>
  • Loading branch information
next-davidduquehernandez and haiyuazhang authored Mar 22, 2021
1 parent cf5b2ce commit 3014856
Show file tree
Hide file tree
Showing 11 changed files with 1,515 additions and 1 deletion.
19 changes: 18 additions & 1 deletion plugins/module_utils/azure_rm_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def default_api_version(self):
'PostgreSQLManagementClient': '2017-12-01',
'MySQLManagementClient': '2017-12-01',
'MariaDBManagementClient': '2019-03-01',
'ManagementLockClient': '2016-09-01'
'ManagementLockClient': '2016-09-01',
'DataLakeStoreAccountManagementClient': '2016-11-01'
},
'2019-03-01-hybrid': {
'StorageManagementClient': '2017-10-01',
Expand Down Expand Up @@ -270,6 +271,8 @@ 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.datalake.store import DataLakeStoreAccountManagementClient
import azure.mgmt.datalake.store.models as DataLakeStoreAccountModel

except ImportError as exc:
Authentication = object
Expand Down Expand Up @@ -432,6 +435,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._datalake_store_client = None

self.check_mode = self.module.check_mode
self.api_profile = self.module.params.get('api_profile')
Expand Down Expand Up @@ -1296,6 +1300,19 @@ def recovery_services_backup_client(self):
def recovery_services_backup_models(self):
return RecoveryServicesBackupModels

@property
def datalake_store_client(self):
self.log('Getting datalake store client...')
if not self._datalake_store_client:
self._datalake_store_client = self.get_mgmt_svc_client(DataLakeStoreAccountManagementClient,
base_url=self._cloud_environment.endpoints.resource_manager,
api_version='2016-11-01')
return self._datalake_store_client

@property
def datalake_store_models(self):
return DataLakeStoreAccountModel


class AzureSASAuthentication(Authentication):
"""Simple SAS Authentication.
Expand Down
Loading

0 comments on commit 3014856

Please sign in to comment.