Skip to content

Instantly share code, notes, and snippets.

@jayunit100
Created January 29, 2016 19:00
Show Gist options
  • Save jayunit100/3435567c8a60032a3d78 to your computer and use it in GitHub Desktop.
Save jayunit100/3435567c8a60032a3d78 to your computer and use it in GitHub Desktop.
commit ff37e36290caf8ef9c69862548c4746ced520a63
Author: Jay Vyas <[email protected]>
Date: Fri Jan 29 13:58:29 2016 -0500
h
diff --git a/openshift_scalability/utils.py b/openshift_scalability/utils.py
index fafcfda..6f33c30 100644
--- a/openshift_scalability/utils.py
+++ b/openshift_scalability/utils.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import json, subprocess, time, copy, sys
+import json, subprocess, time, copy, sys, base64
from datetime import datetime
from time import gmtime, strftime
@@ -421,12 +421,16 @@ def clean_templates(templates):
for parameter in parameters:
for key, value in parameter.iteritems():
cmdstring += " -v %s=%s" % (key, value)
- cmdstring += " -v IDENTIFIER=%i" % (i%9)
+
+ b64=base64.b64encode("akey"+i)
+ cmdstring += " -v IDENTIFIER=%i" % (b64)
processedstr = subprocess.check_output(cmdstring, shell=True)
templatejson = json.loads(processedstr)
with open('/tmp/processed_template.json', 'w') as outfile:
json.dump(templatejson, outfile)
+
+
subprocess.call("oc delete -f /tmp/processed_template.json", shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment