Page MenuHomeDevCentral

D1763.id4476.diff
No OneTemporary

D1763.id4476.diff

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

Mime Type
text/plain
Expires
Sun, Nov 24, 23:08 (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259326
Default Alt Text
D1763.id4476.diff (777 B)

Event Timeline