From 4cb022366d43ecc763c3add78afdaa17c7e530a9 Mon Sep 17 00:00:00 2001 From: Marek 'marx' Grac <mgrac@redhat.com> Date: Sun, 20 Dec 2009 19:37:44 +0100 Subject: [PATCH] fencing: Modify VMWare fence agent to be in sync with others Remove features which are not part of RHEL5 yet. --- fence/agents/vmware/fence_vmware.py | 32 ++++---------------------------- 1 files changed, 4 insertions(+), 28 deletions(-) diff --git a/fence/agents/vmware/fence_vmware.py b/fence/agents/vmware/fence_vmware.py index 75fd887..0d16ad9 100644 --- a/fence/agents/vmware/fence_vmware.py +++ b/fence/agents/vmware/fence_vmware.py @@ -23,11 +23,11 @@ # import sys, re, pexpect, exceptions -sys.path.append("@FENCEAGENTSLIBDIR@") +sys.path.append("/usr/bin/fence") from fencing import * #BEGIN_VERSION_GENERATION -RELEASE_VERSION="VMware Agent using VI Perl API and/or VIX vmrun command" +FENCE_RELEASE_NAME="VMware Agent using VI Perl API and/or VIX vmrun command" REDHAT_COPYRIGHT="" BUILD_DATE="" #END_VERSION_GENERATION @@ -299,30 +299,7 @@ def main(): # Default is secure connection options["-x"] = 1 - docs = { } - docs["shortdesc"] = "Fence agent for VMWare" - docs["longdesc"] = "fence_vmware is an I/O Fencing agent \ -which can be used with the VMware ESX, VMware ESXi or VMware Server \ -to fence virtual machines.\ -\n.P\n\ -Before you can use this agent, it must be installed VI Perl Toolkit or \ -vmrun command on every node you want to make fencing.\ -\n.P\n\ -VI Perl Toolkit is preferred for VMware ESX/ESXi and Virtual Center. Vmrun \ -command is only solution for VMware Server 1/2 (this command will works against \ -ESX/ESXi 3.5 up2 and VC up2 too, but not cluster aware!) and is available as part \ -of VMware VIX API SDK package. VI Perl and VIX API SDK are both available from \ -VMware web pages (not int RHEL repository!). \ -\n.P\n\ -You can specify type of VMware you are connecting to with \\fB-d\\fP switch \ -(or \\fIvmware_type\\fR for stdin). Possible values are esx, server2 and server1.\ -Default value is esx, which will use VI Perl. With server1 and server2, vmrun \ -command is used.\ -\n.P\n\ -After you have successfully installed VI Perl Toolkit or VIX API, you should \ -be able to run fence_vmware_helper (part of this agent) or vmrun command. \ -This agent supports only vmrun from version 2.0.0 (VIX API 1.6.0)." - show_docs(options, docs) + show_docs(options) # Check vmware type and set path vmware_check_vmware_type(options) @@ -333,9 +310,8 @@ This agent supports only vmrun from version 2.0.0 (VIX API 1.6.0)." fail_usage("Unsupported version of vmrun command! You must use at least version %d!"%(VMRUN_MINIMUM_REQUIRED_VERSION)) # Operate the fencing device - result = fence_action(None, options, set_power_status, get_power_status, get_outlets_status) + fence_action(None, options, set_power_status, get_power_status, get_outlets_status) - sys.exit(result) if __name__ == "__main__": main() -- 1.6.0.6