Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3716103
D1763.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
777 B
Referenced Files
None
Subscribers
None
D1763.diff
View Options
diff --git a/_modules/zr.py b/_modules/zr.py
--- a/_modules/zr.py
+++ b/_modules/zr.py
@@ -88,3 +88,22 @@
zr_command = "zr getcredentials {0} username".format(credential_id)
return __salt__['cmd.shell'](zr_command)
+
+
+def get_token(credential_expression):
+ """
+ A function to fetch credential through Zemke-Rhyne
+
+
+ CLI Example:
+
+ salt equatower zr.get_token 126
+
+ :param credential_expression: The credential number (K...) in Phabricator
+ or a key in zr_credentials pillar entry
+ :return: The secret value
+ """
+ credential_id = get_credential_id(credential_expression)
+
+ zr_command = "zr getcredentials {0} token".format(credential_id)
+ return __salt__['cmd.shell'](zr_command)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 12:30 (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2231838
Default Alt Text
D1763.diff (777 B)
Attached To
Mode
D1763: Allow to retrieve a token
Attached
Detach File
Event Timeline
Log In to Comment