Merge "Adds Update Parameters Workflow"
This commit is contained in:
commit
ce0810729d
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds a workflow to update the parameters in a given deployment plan so the
|
||||
tripleo.parameters.update action does not need to be called directly.
|
@ -27,7 +27,7 @@ from tripleo_common.actions import templates
|
||||
from tripleo_common import constants
|
||||
from tripleo_common import exception
|
||||
from tripleo_common.utils import nodes
|
||||
from tripleo_common.utils import parameters
|
||||
from tripleo_common.utils import parameters as parameter_utils
|
||||
from tripleo_common.utils import passwords as password_utils
|
||||
from tripleo_common.utils import plan as plan_utils
|
||||
|
||||
@ -223,7 +223,7 @@ class UpdateRoleParametersAction(UpdateParametersAction):
|
||||
def run(self, context):
|
||||
baremetal_client = self.get_baremetal_client(context)
|
||||
compute_client = self.get_compute_client(context)
|
||||
self.parameters = parameters.set_count_and_flavor_params(
|
||||
self.parameters = parameter_utils.set_count_and_flavor_params(
|
||||
self.role, baremetal_client, compute_client)
|
||||
return super(UpdateRoleParametersAction, self).run(context)
|
||||
|
||||
@ -508,8 +508,8 @@ class GetProfileOfFlavorAction(base.TripleOAction):
|
||||
def run(self, context):
|
||||
compute_client = self.get_compute_client(context)
|
||||
try:
|
||||
return parameters.get_profile_of_flavor(self.flavor_name,
|
||||
compute_client)
|
||||
return parameter_utils.get_profile_of_flavor(self.flavor_name,
|
||||
compute_client)
|
||||
except exception.DeriveParamsError as err:
|
||||
LOG.error('Derive Params Error: %s', err)
|
||||
return actions.Result(error=str(err))
|
||||
|
@ -591,6 +591,48 @@ workflows:
|
||||
on-success:
|
||||
- fail: <% $.get('status') = "FAILED" %>
|
||||
|
||||
update_parameters:
|
||||
description: >
|
||||
Updates plan environment with parameters.
|
||||
|
||||
tags:
|
||||
- tripleo-common-managed
|
||||
|
||||
input:
|
||||
- container: overcloud
|
||||
- parameters
|
||||
- key
|
||||
- queue_name: tripleo
|
||||
|
||||
tasks:
|
||||
update_parameters:
|
||||
action: tripleo.parameters.update
|
||||
input:
|
||||
container: <% $.container %>
|
||||
parameters: <% $.parameters %>
|
||||
key: <% $.key %>
|
||||
on-complete: notify_zaqar
|
||||
publish-on-error:
|
||||
status: FAILED
|
||||
message: <% task().result %>
|
||||
publish:
|
||||
status: SUCCESS
|
||||
message: <% task().result %>
|
||||
|
||||
notify_zaqar:
|
||||
action: zaqar.queue_post
|
||||
input:
|
||||
queue_name: <% $.queue_name %>
|
||||
messages:
|
||||
body:
|
||||
type: tripleo.plan_management.v1.update_parameters
|
||||
payload:
|
||||
status: <% $.status %>
|
||||
message: <% $.get('message', '') %>
|
||||
execution: <% execution() %>
|
||||
on-success:
|
||||
- fail: <% $.get('status') = "FAILED" %>
|
||||
|
||||
publish_ui_logs_to_swift:
|
||||
description: >
|
||||
This workflow drains a zaqar queue, and publish its messages into a log
|
||||
|
Loading…
Reference in New Issue
Block a user