Page MenuHomeDevCentral

D1763.diff
No OneTemporary

D1763.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
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)

Event Timeline