mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 21:09:09 -07:00
adding mysqlserver facts (#43321)
This commit is contained in:
parent
7e39c5bf07
commit
ac895828c1
3 changed files with 306 additions and 0 deletions
|
@ -151,6 +151,8 @@ try:
|
|||
from azure.mgmt.containerservice import ContainerServiceClient
|
||||
from azure.storage.cloudstorageaccount import CloudStorageAccount
|
||||
from adal.authentication_context import AuthenticationContext
|
||||
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
|
||||
from azure.mgmt.rdbms.mysql import MySQLManagementClient
|
||||
except ImportError as exc:
|
||||
HAS_AZURE_EXC = exc
|
||||
HAS_AZURE = False
|
||||
|
@ -272,6 +274,8 @@ class AzureRMModuleBase(object):
|
|||
self._dns_client = None
|
||||
self._web_client = None
|
||||
self._containerservice_client = None
|
||||
self._mysql_client = None
|
||||
self._postgresql_client = None
|
||||
self._adfs_authority_url = None
|
||||
self._resource = None
|
||||
|
||||
|
@ -1061,3 +1065,19 @@ class AzureRMModuleBase(object):
|
|||
self._containerservice_client = self.get_mgmt_svc_client(ContainerServiceClient,
|
||||
base_url=self._cloud_environment.endpoints.resource_manager)
|
||||
return self._containerservice_client
|
||||
|
||||
@property
|
||||
def postgresql_client(self):
|
||||
self.log('Getting PostgreSQL client')
|
||||
if not self._postgresql_client:
|
||||
self._postgresql_client = self.get_mgmt_svc_client(PostgreSQLManagementClient,
|
||||
base_url=self._cloud_environment.endpoints.resource_manager)
|
||||
return self._postgresql_client
|
||||
|
||||
@property
|
||||
def mysql_client(self):
|
||||
self.log('Getting MySQL client')
|
||||
if not self._mysql_client:
|
||||
self._mysql_client = self.get_mgmt_svc_client(MySQLManagementClient,
|
||||
base_url=self._cloud_environment.endpoints.resource_manager)
|
||||
return self._mysql_client
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue