зеркало из https://github.com/Azure/Avere.git
First steps to supporting different templates
This commit is contained in:
Родитель
a8f65f561c
Коммит
74c367d327
|
@ -77,18 +77,20 @@ class AvereTemplateDeploy:
|
|||
self._debug('> Deleting resource group: ' + self.resource_group)
|
||||
return self.rm_client.resource_groups.delete(self.resource_group)
|
||||
|
||||
def deploy(self):
|
||||
def deploy(self, add_secrets_params=True):
|
||||
"""Deploys the Avere vFXT template."""
|
||||
self._debug('> Deploying template')
|
||||
|
||||
deploy_secrets = {
|
||||
'adminPassword': os.environ['AVERE_ADMIN_PW'],
|
||||
'controllerPassword': os.environ['AVERE_CONTROLLER_PW'],
|
||||
'servicePrincipalAppId': os.environ['AZURE_CLIENT_ID'],
|
||||
'servicePrincipalPassword': os.environ['AZURE_CLIENT_SECRET'],
|
||||
'servicePrincipalTenant': os.environ['AZURE_TENANT_ID']
|
||||
}
|
||||
params = {**deploy_secrets, **self.deploy_params}
|
||||
params = {**self.deploy_params}
|
||||
if add_secrets_params:
|
||||
deploy_secrets = {
|
||||
'adminPassword': os.environ['AVERE_ADMIN_PW'],
|
||||
'controllerPassword': os.environ['AVERE_CONTROLLER_PW'],
|
||||
'servicePrincipalAppId': os.environ['AZURE_CLIENT_ID'],
|
||||
'servicePrincipalPassword': os.environ['AZURE_CLIENT_SECRET'],
|
||||
'servicePrincipalTenant': os.environ['AZURE_TENANT_ID']
|
||||
}
|
||||
params = {**deploy_secrets, **params}
|
||||
|
||||
return self.rm_client.deployments.create_or_update(
|
||||
resource_group_name=self.resource_group,
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
Driver for testing template-based deployment of the Avere vFXT product.
|
||||
"""
|
||||
|
||||
import json
|
||||
from time import time
|
||||
|
||||
import pytest
|
||||
|
@ -48,6 +49,8 @@ def wait_for_op(op, timeout_sec=60):
|
|||
result = op.result()
|
||||
if result:
|
||||
print('>> operation result: {}'.format(result))
|
||||
print('>> result.properties: {}'.format(json.dumps(result.properties, indent=4)))
|
||||
return result
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Загрузка…
Ссылка в новой задаче