Skip to content

Commit

Permalink
ironic-to-nautobot: use transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
skrobul committed Jul 16, 2024
1 parent dc8beb0 commit c11423f
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
Expand All @@ -12,16 +13,17 @@ spec:
- eventName: openstack
eventSourceName: openstack-amqp
name: ironic-dep
transform:
jq: ".body[\"oslo.message\"] | fromjson"
filters:
dataLogicalOperator: "and"
data:
- path: "body.oslo\\.message"
- path: "event_type"
type: "string"
value:
- ".*baremetal.node.update.end.*"
template: "{{ fromJson .Input }}"
- "baremetal.node.update.end"
template:
serviceAccountName: workflow
serviceAccountName: operate-workflow-sa
triggers:
- template:
name: ironic-node-update-trigger
Expand All @@ -30,11 +32,11 @@ spec:
parameters:
- dest: spec.arguments.parameters.0.value
src:
dataKey: body.payload.ironic_object.data.uuid
dataKey: payload.ironic_object\.data.uuid
dependencyName: ironic-dep
- dest: spec.arguments.parameters.1.value
src:
dataKey: body.payload.ironic_object.data.provision_state
dataKey: payload.ironic_object\.data.provision_state
dependencyName: ironic-dep
source:
resource:
Expand All @@ -54,9 +56,9 @@ spec:
templates:
- name: start
steps:
- - name: synchronize-provision_state-to-nautobot
- - name: synchronize-provision-state-to-nautobot
templateRef:
name: synchronize-provision_state-to-nautobot
name: synchronize-provision-state-to-nautobot
template: synchronize-state
arguments:
parameters:
Expand Down

0 comments on commit c11423f

Please sign in to comment.