Skip to content

Commit

Permalink
Change register report format
Browse files Browse the repository at this point in the history
  • Loading branch information
int32bit committed Apr 27, 2017
1 parent 6c5d0eb commit 9cb8950
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ See "mistral-actions help COMMAND" for help on a specific command.

#### 3. Discover New Actions

```sh
```
$ mistral-actions discover
Follow actions discovered:
+-----------------------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+
Expand All @@ -72,17 +72,17 @@ Follow actions discovered:

#### 4. Register New Actions:

```sh
```
$ mistral-actions register
Follow actions have been registered:
int32bit.system.exec
int32bit.cinder.backups.assert_status
int32bit.cinder.backups.create
int32bit.cinder.volumes.assert_status
int32bit.cinder.snapshots.assert_status
int32bit.nova.servers.assert_status
int32bit.glance.images.assert_status
int32bit.glance.images.filter_by
int32bit.system.exec(cmd): Run command with arguments and return its output as a byte string.
int32bit.cinder.backups.assert_status(backup_id, status="available"): Assert a volume backup in special status.
int32bit.cinder.backups.create(volume_id, backup_name, snapshot_id=null, description=null, container=null, incremental=true, force=true): Creates a volume backup.
int32bit.cinder.volumes.assert_status(volume_id, status="available"): Assert a volume in special status.
int32bit.cinder.snapshots.assert_status(snapshot_id, status="available"): Assert a volume snapshot in special status.
int32bit.nova.servers.assert_status(server, status="ACTIVE"): Assert a server in special status.
int32bit.glance.images.assert_status(image_id, status="active"): Assert a image in special status.
int32bit.glance.images.filter_by(**kwargs): List image filtered by id, name, status, etc.
```

You need to restart mistral service before use new actions:
Expand Down
2 changes: 1 addition & 1 deletion action_catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
|int32bit.nova.servers.assert_status|Assert a server in special status.|server, status="ACTIVE"|
|int32bit.system.exec|Run command with arguments and return its output as a byte string.|cmd|

Update at 2017-04-27 05:13:57 UTC
Update at 2017-04-27 05:51:07 UTC
5 changes: 4 additions & 1 deletion mistral_actions/client/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def do_register(args):
actions_cli.register_all(discovered_actions)
print("Follow actions have been registered: ")
for action in discovered_actions:
print(action['name'])
print("%(name)s(%(args)s): %(description)s" %
{'name':action['name'],
'args': action['input_str'],
'description': action['description'].split('\n')[0]})
except Exception as ex:
print("Fail to register actions: %s" % ex)
else:
Expand Down
4 changes: 3 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh
python setup.py install
mistral-actions register --override

echo
mistral-actions register --override 2>/dev/null
systemctl restart openstack-mistral-engine openstack-mistral-executor

cat >action_catalog.md <<EOF
Expand Down

0 comments on commit 9cb8950

Please sign in to comment.