mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-01 22:09:08 -07:00
Add azure servicebus module (#51320)
This commit is contained in:
parent
08c7dd94b2
commit
8c3dca7e7b
12 changed files with 2202 additions and 0 deletions
|
@ -161,6 +161,8 @@ try:
|
|||
from azure.storage.blob import PageBlobService, BlockBlobService
|
||||
from adal.authentication_context import AuthenticationContext
|
||||
from azure.mgmt.sql import SqlManagementClient
|
||||
from azure.mgmt.servicebus import ServiceBusManagementClient
|
||||
import azure.mgmt.servicebus.models as ServicebusModel
|
||||
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
|
||||
from azure.mgmt.rdbms.mysql import MySQLManagementClient
|
||||
from azure.mgmt.rdbms.mariadb import MariaDBManagementClient
|
||||
|
@ -305,6 +307,7 @@ class AzureRMModuleBase(object):
|
|||
self._monitor_client = None
|
||||
self._resource = None
|
||||
self._log_analytics_client = None
|
||||
self._servicebus_client = None
|
||||
|
||||
self.check_mode = self.module.check_mode
|
||||
self.api_profile = self.module.params.get('api_profile')
|
||||
|
@ -990,6 +993,18 @@ class AzureRMModuleBase(object):
|
|||
self.log('Getting log analytics models')
|
||||
return LogAnalyticsModels
|
||||
|
||||
@property
|
||||
def servicebus_client(self):
|
||||
self.log('Getting servicebus client')
|
||||
if not self._servicebus_client:
|
||||
self._servicebus_client = self.get_mgmt_svc_client(ServiceBusManagementClient,
|
||||
base_url=self._cloud_environment.endpoints.resource_manager)
|
||||
return self._servicebus_client
|
||||
|
||||
@property
|
||||
def servicebus_models(self):
|
||||
return ServicebusModel
|
||||
|
||||
|
||||
class AzureRMAuthException(Exception):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue