summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-01-10 15:33:10 -0600
committerEd Leafe <ed@leafe.com>2011-01-10 15:33:10 -0600
commitbae57e82767b4877bae5c2dcb6fe052291d16b32 (patch)
tree1881306eec886d4039d880e1e86519adf3f5c858 /plugins
parentcb3667b95ceead8a677fdfa24abf2a56baf12992 (diff)
downloadnova-bae57e82767b4877bae5c2dcb6fe052291d16b32.tar.gz
nova-bae57e82767b4877bae5c2dcb6fe052291d16b32.tar.xz
nova-bae57e82767b4877bae5c2dcb6fe052291d16b32.zip
Fixed issues raised by reviews
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/agent16
1 files changed, 0 insertions, 16 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent b/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent
index 70726bf6f..82dd5466e 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent
@@ -39,8 +39,6 @@ configure_logging("xenstore")
import xenstore
AGENT_TIMEOUT = 30
-# Used for simulating an external agent for testing
-PRETEND_SECRET = 11111
def jsonify(fnc):
@@ -158,13 +156,6 @@ def key_init(self, arg_dict):
pub = int(arg_dict["pub"])
arg_dict["value"] = json.dumps({"name": "keyinit", "value": pub})
request_id = arg_dict["id"]
- if arg_dict.get("testing_mode"):
- # Pretend!
- pretend = SimpleDH(secret=PRETEND_SECRET)
- shared = pretend.compute_shared(pub)
- # Simulate the agent's response
- ret = {"returncode": "D0", "message": pretend.get_public(), "shared": shared}
- return ret
arg_dict["path"] = "data/host/%s" % request_id
xenstore.write_record(self, arg_dict)
try:
@@ -184,13 +175,6 @@ def password(self, arg_dict):
"""
pub = int(arg_dict["pub"])
enc_pass = arg_dict["enc_pass"]
- if arg_dict.get("testing_mode"):
- # Decrypt the password, and send it back to verify
- pretend = SimpleDH(secret=PRETEND_SECRET)
- pretend.compute_shared(pub)
- pw = pretend.decrypt(enc_pass)
- ret = {"returncode": "0", "message": pw}
- return ret
arg_dict["value"] = json.dumps({"name": "password", "value": enc_pass})
request_id = arg_dict["id"]
arg_dict["path"] = "data/host/%s" % request_id