Listen for messages from internal introspect workflow
This way we can update the status of each introspected node as its state changes, instead of waiting until they all finish. Change-Id: If8c2e3819d1a3226109f3f6a312c25c9d0972331 Partial-Bug: 1716671
This commit is contained in:
parent
9a22f02c39
commit
8990d23cf5
|
@ -209,6 +209,23 @@ export default {
|
|||
};
|
||||
},
|
||||
|
||||
nodeIntrospectionFinished(messagePayload) {
|
||||
return (dispatch, getState, { getIntl }) => {
|
||||
const { formatMessage } = getIntl(getState());
|
||||
const nodeId = messagePayload.execution.input.node_uuid;
|
||||
dispatch(this.finishOperation([nodeId]));
|
||||
|
||||
if (messagePayload.status === 'FAILED') {
|
||||
dispatch(
|
||||
NotificationActions.notify({
|
||||
title: formatMessage(messages.introspectionFailedNotificationTitle),
|
||||
message: messagePayload.message
|
||||
})
|
||||
);
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
tagNodes(nodeIds, tag) {
|
||||
return (dispatch, getState) => {
|
||||
const nodes = getNodesByIds(getState(), nodeIds);
|
||||
|
|
|
@ -54,6 +54,10 @@ export default {
|
|||
dispatch(NodesActions.nodesIntrospectionFinished(payload));
|
||||
break;
|
||||
|
||||
case MistralConstants.BAREMETAL_INTROSPECT_INTERNAL:
|
||||
dispatch(NodesActions.nodeIntrospectionFinished(payload));
|
||||
break;
|
||||
|
||||
case MistralConstants.BAREMETAL_PROVIDE:
|
||||
dispatch(NodesActions.provideNodesFinished(payload));
|
||||
break;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
export default {
|
||||
BAREMETAL_INTROSPECT: 'tripleo.baremetal.v1.introspect',
|
||||
BAREMETAL_INTROSPECT_INTERNAL: 'tripleo.baremetal.v1._introspect',
|
||||
BAREMETAL_MANAGE: 'tripleo.baremetal.v1.manage',
|
||||
BAREMETAL_PROVIDE: 'tripleo.baremetal.v1.provide',
|
||||
BAREMETAL_REGISTER_OR_UPDATE: 'tripleo.baremetal.v1.register_or_update',
|
||||
|
|
Loading…
Reference in New Issue