Skip to content

Commit

Permalink
Move sample improved pack config stuff to examples pack.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kami committed Jun 28, 2016
1 parent 4c6d50b commit 74d5052
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contrib/examples/actions/print_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from pprint import pprint

from st2actions.runners.pythonrunner import Action


class PrintConfigAction(Action):
def run(self):
print('=========')
pprint(self.config)
print('=========')
6 changes: 6 additions & 0 deletions contrib/examples/actions/print_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: print_config
runner_type: run-python
description: Action which prints config values.
enabled: true
entry_point: print_config.py
20 changes: 20 additions & 0 deletions contrib/examples/config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
api_key:
description: "API key"
type: "string"
secret: true
required: true
api_secret:
description: "API secret"
type: "string"
secret: true
required: true
region:
description: "API region to use"
type: "string"
required: true
default: "us-east-1"
private_key_path:
description: "Path to the private key file to use"
type: "string"
required: false

0 comments on commit 74d5052

Please sign in to comment.