Skip to content

Commit 01b943a

Browse files
committed
Fix sensor
1 parent 9e59b3d commit 01b943a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

workflows/openstack/sensors/sensor-neutron-olso-event.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
apiVersion: argoproj.io/v1alpha1
33
kind: Sensor
44
metadata:
5-
name: neutron-event-network-segment-range
5+
name: neutron-oslo-event
66
namespace: argo-events
77
annotations:
8-
workflows.argoproj.io/title: Add/edit Nautobot UCVNIGroup range field on Neutron network-segment-range operations
8+
workflows.argoproj.io/title: Add/edit Nautobot objects according to Neutron events
99
workflows.argoproj.io/description: |+
1010
Triggers on Events from Neutron:
1111
@@ -21,11 +21,11 @@ spec:
2121
name: oslo-event-type
2222
transform:
2323
# the event is a string-ified JSON so we need to decode it
24-
jq: ".body[\"oslo.message\"] | fromjson"
24+
jq: '{body: (.body["oslo.message"] | fromjson)}'
2525
filters:
2626
dataLogicalOperator: "and"
2727
data:
28-
- path: "event_type"
28+
- path: body.event_type
2929
type: "string"
3030
# any of the values will trigger
3131
value:
@@ -35,7 +35,6 @@ spec:
3535
- "subnet.create.end"
3636
- "subnet.update.end"
3737
- "subnet.delete.end"
38-
3938
template:
4039
serviceAccountName: sensor-submit-workflow
4140
triggers:
@@ -56,7 +55,7 @@ spec:
5655
apiVersion: argoproj.io/v1alpha1
5756
kind: Workflow
5857
metadata:
59-
generateName: ironic-node-port-
58+
generateName: neutron-oslo-event-
6059
namespace: argo-events
6160
spec:
6261
# defines the parameters being replaced above

0 commit comments

Comments
 (0)