summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorTrey Morris <trey.morris@rackspace.com>2011-02-17 19:32:30 +0000
committerTarmac <>2011-02-17 19:32:30 +0000
commit2b5866fb71e8d37835bf8b0778064ba53385b676 (patch)
tree9b9871ecd456bdf1c7a7fd66010c245eeb2fe472 /plugins
parentd4de56f78c9b70b7a7d25e48e774155005c6cefa (diff)
parentea4d21b546d9447bac50cf97a62c11129da12d21 (diff)
added labels to networks for use in multi-nic
added writing network data to xenstore param-list added call to agent to reset network added reset_network call to openstack api
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/agent15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent b/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent
index 031a49708..f99ea4082 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent
@@ -91,6 +91,18 @@ def password(self, arg_dict):
return resp
+@jsonify
+def resetnetwork(self, arg_dict):
+ """
+ Writes a resquest to xenstore that tells the agent to reset networking.
+
+ """
+ arg_dict['value'] = json.dumps({'name': 'resetnetwork', 'value': ''})
+ request_id = arg_dict['id']
+ arg_dict['path'] = "data/host/%s" % request_id
+ xenstore.write_record(self, arg_dict)
+
+
def _wait_for_agent(self, request_id, arg_dict):
"""Periodically checks xenstore for a response from the agent.
The request is always written to 'data/host/{id}', and
@@ -124,4 +136,5 @@ def _wait_for_agent(self, request_id, arg_dict):
if __name__ == "__main__":
XenAPIPlugin.dispatch(
{"key_init": key_init,
- "password": password})
+ "password": password,
+ "resetnetwork": resetnetwork})