Add goal_name & strategy_name in /audit_templates

In this changeset, I added both the 'goal_name' and the 'strategy_name'
field.

Change-Id: Ic164df84d4e23ec75b2b2f4b358cf827d0ad7fa5
Related-Bug: #1573582
This commit is contained in:
Vincent Françoise
2016-04-22 15:42:36 +02:00
parent 78689fbe3b
commit 8c6bf734af
7 changed files with 303 additions and 199 deletions

View File

@@ -58,17 +58,13 @@ class InfraOptimClientJSON(base.BaseInfraOptimClient):
def create_audit_template(self, **kwargs):
"""Creates an audit template with the specified parameters.
:param name: The name of the audit template. Default: My Audit Template
:param name: The name of the audit template.
:param description: The description of the audit template.
Default: AT Description
:param goal_uuid: The related Goal UUID associated.
Default: None
:param strategy_uuid: The related Strategy UUID associated.
Default: None
:param host_aggregate: ID of the host aggregate targeted by
this audit template. Default: 1
:param extra: IMetadata associated to this audit template.
Default: {}
this audit template.
:param extra: Metadata associated to this audit template.
:return: A tuple with the server response and the created audit
template.
"""
@@ -80,8 +76,8 @@ class InfraOptimClientJSON(base.BaseInfraOptimClient):
audit_template = {
'name': parameters.get('name', unique_name),
'description': parameters.get('description'),
'goal_uuid': parameters.get('goal_uuid'),
'strategy_uuid': parameters.get('strategy_uuid'),
'goal': parameters.get('goal'),
'strategy': parameters.get('strategy'),
'host_aggregate': parameters.get('host_aggregate', 1),
'extra': parameters.get('extra', {}),
}