-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"alias": "docs", | ||
"automation_alias": "automation", | ||
"automation_uid": "bbeb15d8f0a944a4", | ||
"tags": [ | ||
"automation" | ||
], | ||
"uid": "9558c9e6ca124065" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
|
||
from cmind.automation import Automation | ||
from cmind import utils | ||
|
||
class CAutomation(Automation): | ||
""" | ||
Automation actions | ||
""" | ||
|
||
############################################################ | ||
def __init__(self, cmind, automation_file): | ||
super().__init__(cmind, __file__) | ||
|
||
############################################################ | ||
def test(self, i): | ||
""" | ||
Test automation | ||
Args: | ||
(CM input dict): | ||
(out) (str): if 'con', output to console | ||
automation (str): automation as CM string object | ||
parsed_automation (list): prepared in CM CLI or CM access function | ||
[ (automation alias, automation UID) ] or | ||
[ (automation alias, automation UID), (automation repo alias, automation repo UID) ] | ||
(artifact) (str): artifact as CM string object | ||
(parsed_artifact) (list): prepared in CM CLI or CM access function | ||
[ (artifact alias, artifact UID) ] or | ||
[ (artifact alias, artifact UID), (artifact repo alias, artifact repo UID) ] | ||
... | ||
Returns: | ||
(CM return dict): | ||
* return (int): return code == 0 if no error and >0 if error | ||
* (error) (str): error string if return>0 | ||
* Output from this automation action | ||
""" | ||
|
||
import json | ||
print (json.dumps(i, indent=2)) | ||
|
||
return {'return':0} |