mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Add workspace module for azure (#53731)
* add workspace * add other properties * add facts modules * add test * add doc * fix lint * fix lint * rename the module * fix docs
This commit is contained in:
parent
fee4a0df94
commit
dc6c0cb9f8
8 changed files with 734 additions and 0 deletions
|
@ -166,6 +166,8 @@ try:
|
|||
from azure.mgmt.rdbms.mariadb import MariaDBManagementClient
|
||||
from azure.mgmt.containerregistry import ContainerRegistryManagementClient
|
||||
from azure.mgmt.containerinstance import ContainerInstanceManagementClient
|
||||
from azure.mgmt.loganalytics import LogAnalyticsManagementClient
|
||||
import azure.mgmt.loganalytics.models as LogAnalyticsModels
|
||||
except ImportError as exc:
|
||||
HAS_AZURE_EXC = traceback.format_exc()
|
||||
HAS_AZURE = False
|
||||
|
@ -302,6 +304,7 @@ class AzureRMModuleBase(object):
|
|||
self._traffic_manager_management_client = None
|
||||
self._monitor_client = None
|
||||
self._resource = None
|
||||
self._log_analytics_client = None
|
||||
|
||||
self.check_mode = self.module.check_mode
|
||||
self.api_profile = self.module.params.get('api_profile')
|
||||
|
@ -974,6 +977,19 @@ class AzureRMModuleBase(object):
|
|||
base_url=self._cloud_environment.endpoints.resource_manager)
|
||||
return self._monitor_client
|
||||
|
||||
@property
|
||||
def log_analytics_client(self):
|
||||
self.log('Getting log analytics client')
|
||||
if not self._log_analytics_client:
|
||||
self._log_analytics_client = self.get_mgmt_svc_client(LogAnalyticsManagementClient,
|
||||
base_url=self._cloud_environment.endpoints.resource_manager)
|
||||
return self._log_analytics_client
|
||||
|
||||
@property
|
||||
def log_analytics_models(self):
|
||||
self.log('Getting log analytics models')
|
||||
return LogAnalyticsModels
|
||||
|
||||
|
||||
class AzureRMAuthException(Exception):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue