diff options
| author | Justin Pettit <jpettit@nicira.com> | 2010-03-30 16:58:12 -0700 |
|---|---|---|
| committer | Justin Pettit <jpettit@nicira.com> | 2010-03-30 17:05:45 -0700 |
| commit | 7730bd8fde61da83fefaaee062b66c02332ff28e (patch) | |
| tree | 8997c1f4e47cfd820aab40b2a8ae68ab6da9d7e4 /xenserver/etc_xapi.d_plugins_openvswitch-cfg-update | |
| parent | 88b56f290a776da698633db8a4457a506600688a (diff) | |
| download | openvswitch-7730bd8fde61da83fefaaee062b66c02332ff28e.tar.gz | |
xenserver: Add emergency_reset hook to XAPI plugin
There's a requirement that OVS can be put back into a known good state
remotely. This will be implemented as a function through the OVS XAPI
plugin. This commit only provides a hook for testing purposes. The
functionality will be added later.
Diffstat (limited to 'xenserver/etc_xapi.d_plugins_openvswitch-cfg-update')
| -rwxr-xr-x | xenserver/etc_xapi.d_plugins_openvswitch-cfg-update | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update index f915b422d..27aeaf624 100755 --- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update +++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update @@ -25,6 +25,7 @@ import XenAPIPlugin import XenAPI import os import subprocess +import syslog vsctl="/usr/bin/ovs-vsctl" cacert_filename="/etc/openvswitch/vswitchd.cacert" @@ -102,6 +103,13 @@ def vswitchCfgMod(action_args): if exitcode != 0: raise XenAPIPlugin.Failure("VSWITCH_CONFIG_MOD_FAILURE", [ str(exitcode) , str(action_args) ]) + +def emergency_reset(session, args): + # This function is just a place holder for testing until the real + # functionality is implemented. + syslog.syslog("openvswitch-cfg-update: emergency_reset called") + return "Need to implement emergency_reset" if __name__ == "__main__": - XenAPIPlugin.dispatch({"update": update}) + XenAPIPlugin.dispatch({"update": update, + "emergency_reset": emergency_reset}) |
