Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- version: '2.0'
- name: neutron_workflows
- description: "neutron workflows by sapd"
- workflows:
- auto_delete_rules:
- input:
- - from_port
- - to_port
- - security_group_name: "default"
- output:
- rule_ids: <% $.rule_ids %>
- tasks:
- list_rules:
- action: nova.security_groups_list
- publish:
- rule_ids: <% let(root => $ ) -> task(list_rules).result.where($.name = $root.security_group_name and $.rules.from_port = $root.from_port and $.rules.to_port = $root.to_port).id %>
- on-success:
- - delete_rule: <% len($.rule_ids) > 0%>
- delete_rule:
- with-items: rule_id in <% $.rule_ids %>
- action: neutron.delete_security_group_rule security_group_rule =<% $.rule_id %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement