Page MenuHomeDevCentral

D1763.id4473.diff
No OneTemporary

D1763.id4473.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, 01:24 (4 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259326
Default Alt Text
D1763.id4473.diff (777 B)

Event Timeline