Request for graceful rule export to file system
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
Requesting an elegant way to export a rule from the operational environment to the file system.
It looks like the user would need to delete the 'extra' stuff (id, ref, uid...) in order to save the rule output to a file?
root@u16:/opt/stackstorm/packs/default/rules# st2 rule get -y core.beagleTag
action:
parameters:
description: '{{trigger.body.description}}'
gpio: '{{trigger.body.gpio}}'
hostname: '{{trigger.body.hostname}}'
ipaddress: '{{trigger.body.ipaddress}}'
password: $password$
trigger: '{{trigger.body.trigger}}'
username: user
value: '{{trigger.body.value}}'
ref: default.beagleTagEnableNetworking
criteria: {}
description: Start the BeagleTag Workflow
enabled: true
**id: 59a46f89de59a4051d69096d**
name: beagleTag
pack: core
ref: core.beagleTag
tags: []
trigger:
parameters:
url: beagleTag
**ref: core.c9603188-8c7a-41fd-9738-94cad5e90138**
type: core.st2.webhook
type:
parameters: {}
ref: standard
**uid: rule:core:beagleTag**
root@u16:/opt/stackstorm/packs/default/rules#
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the st2 rule get -y CLI output shown in the issue and trace how a rule is serialized for filesystem use. Done means an export path that produces a reusable rule without operational fields such as the id, uid, or generated references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100