Skip to content

Commit

Permalink
New module: azure_rm_eventhub (#519)
Browse files Browse the repository at this point in the history
* Eventhub CRUD operations

* Update azure_rm_common.py

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub_info.py

* Update ignore-2.10.txt

* Update ignore-2.11.txt

* Update ignore-2.12.txt

* Update ignore-2.9.txt

* Update main.yml

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub_info.py

* Update azure_rm_eventhub_info.py

* Update azure_rm_eventhub.py

* Update main.yml

* Update main.yml

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub_info.py

* Update ignore-2.9.txt

* Update ignore-2.12.txt

* Update ignore-2.11.txt

* Update ignore-2.10.txt

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub_info.py

* Update azure_rm_eventhub_info.py

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub_info.py

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub.py

* Update main.yml

* Update azure_rm_eventhub.py

* Update main.yml

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub.py

* Update main.yml

* Update main.yml

* Update azure_rm_eventhub.py

* Update azure_rm_eventhub.py

Co-authored-by: smalpani <[email protected]>
  • Loading branch information
saurabh3796 and smalpani13 authored May 28, 2021
1 parent b2338f2 commit c2a7a1a
Show file tree
Hide file tree
Showing 8 changed files with 850 additions and 1 deletion.
20 changes: 19 additions & 1 deletion plugins/module_utils/azure_rm_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def default_api_version(self):
'MySQLManagementClient': '2017-12-01',
'MariaDBManagementClient': '2019-03-01',
'ManagementLockClient': '2016-09-01',
'DataLakeStoreAccountManagementClient': '2016-11-01'
'DataLakeStoreAccountManagementClient': '2016-11-01',
'EventHubManagementClient': '2018-05-04'
},
'2019-03-01-hybrid': {
'StorageManagementClient': '2017-10-01',
Expand All @@ -122,6 +123,7 @@ def default_api_version(self):
'ManagementLockClient': '2016-09-01',
'PolicyClient': '2016-12-01',
'ResourceManagementClient': '2018-05-01',
'EventHubManagementClient': '2018-05-04',
'SubscriptionClient': '2016-06-01',
'DnsManagementClient': '2016-04-01',
'KeyVaultManagementClient': '2016-10-01',
Expand Down Expand Up @@ -277,6 +279,7 @@ def default_api_version(self):
from azure.mgmt.search import SearchManagementClient
from azure.mgmt.datalake.store import DataLakeStoreAccountManagementClient
import azure.mgmt.datalake.store.models as DataLakeStoreAccountModel
from azure.mgmt.eventhub import EventHubManagementClient

except ImportError as exc:
Authentication = object
Expand Down Expand Up @@ -364,6 +367,10 @@ def normalize_location_name(name):
'package_name': 'trafficmanager',
'expected_version': '0.50.0'
},
'EventHubManagementClient': {
'package_name': 'azure-mgmt-eventhub',
'expected_version': '2.0.0'
},
} if HAS_AZURE else {}


Expand Down Expand Up @@ -441,6 +448,7 @@ def __init__(self, derived_arg_spec, bypass_checks=False, no_log=False,
self._recovery_services_backup_client = None
self._search_client = None
self._datalake_store_client = None
self._event_hub_client = None

self.check_mode = self.module.check_mode
self.api_profile = self.module.params.get('api_profile')
Expand Down Expand Up @@ -1327,6 +1335,16 @@ def datalake_store_client(self):
def datalake_store_models(self):
return DataLakeStoreAccountModel

@property
def event_hub_client(self):
self.log('Getting event hub client')
if not self._event_hub_client:
self._event_hub_client = self.get_mgmt_svc_client(
EventHubManagementClient,
base_url=self._cloud_environment.endpoints.resource_manager,
api_version='2018-05-04')
return self._event_hub_client


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

0 comments on commit c2a7a1a

Please sign in to comment.