COMPATIBILITY BREAK: remove option -T / --test / test
PATCH 1/7 COMPATIBILITY BREAK: remove option -T / --test / test
Option -T was not used in all fence agents and its functionality differs. If you want to know if your fence device is working correctly use '-o monitor / --action monitor / STDIN: action=monitor'.
--- fence/agents/alom/fence_alom.py | 2 +- fence/agents/apc/fence_apc.py | 2 +- fence/agents/apc_snmp/fence_apc_snmp.py | 2 +- fence/agents/cisco_mds/fence_cisco_mds.py | 2 +- fence/agents/eaton_snmp/fence_eaton_snmp.py | 2 +- fence/agents/eps/fence_eps.py | 2 +- fence/agents/ibmblade/fence_ibmblade.py | 2 +- fence/agents/ifmib/fence_ifmib.py | 2 +- fence/agents/intelmodular/fence_intelmodular.py | 2 +- fence/agents/ipdu/fence_ipdu.py | 2 +- fence/agents/ldom/fence_ldom.py | 2 +- fence/agents/lib/fencing.py.py | 7 ------- fence/agents/virsh/fence_virsh.py | 2 +- fence/agents/vmware/fence_vmware.py | 2 +- fence/agents/wti/fence_wti.py | 2 +- fence/agents/xenapi/fence_xenapi.py | 2 +- 16 files changed, 15 insertions(+), 22 deletions(-)
fence/agents/alom/fence_alom.py +1 -1
@@ -31,7 +31,7 @@ def set_power_status(conn, options): time.sleep(int(options["--power-timeout"])) def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", "test" ] + device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure" ] atexit.register(atexit_handler)
fence/agents/apc/fence_apc.py +1 -1
@@ -175,7 +175,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ - "port", "switch", "test" ] + "port", "switch" ] atexit.register(atexit_handler)
fence/agents/apc_snmp/fence_apc_snmp.py +1 -1
@@ -159,7 +159,7 @@ def apc_snmp_define_defaults(): # Main agent method def main(): device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ - "test", "port", "snmp_version", "community" ] + "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/cisco_mds/fence_cisco_mds.py +1 -1
@@ -78,7 +78,7 @@ def main(): global PORT_OID device_opt = [ "fabric_fencing", "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ - "test", "port", "snmp_version", "community" ] + "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/eaton_snmp/fence_eaton_snmp.py +1 -1
@@ -198,7 +198,7 @@ def get_outlets_status(conn, options): # Main agent method def main(): device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ - "test", "port", "snmp_version", "community" ] + "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/eps/fence_eps.py +1 -1
@@ -99,7 +99,7 @@ def eps_define_new_opts(): # Starting point of fence agent def main(): device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \ - "port", "hidden_page", "test" ] + "port", "hidden_page" ] atexit.register(atexit_handler)
fence/agents/ibmblade/fence_ibmblade.py +1 -1
@@ -51,7 +51,7 @@ def get_outlets_status(conn, _): # Main agent method def main(): device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ - "test", "port", "snmp_version", "community" ] + "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/ifmib/fence_ifmib.py +1 -1
@@ -96,7 +96,7 @@ def get_outlets_status(conn, options): # Main agent method def main(): device_opt = [ "fabric_fencing", "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ - "test", "port", "snmp_version", "community" ] + "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/intelmodular/fence_intelmodular.py +1 -1
@@ -62,7 +62,7 @@ def get_outlets_status(conn, options): # Main agent method def main(): device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", - "test", "port", "snmp_version", "community" ] + "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/ipdu/fence_ipdu.py +1 -1
@@ -126,7 +126,7 @@ def get_outlets_status(conn, options): # Main agent method def main(): device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ - "test", "port", "snmp_version", "community" ] + "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/ldom/fence_ldom.py +1 -1
@@ -70,7 +70,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ - "port", "test" ] + "port" ] atexit.register(atexit_handler)
fence/agents/lib/fencing.py.py +0 -7
@@ -198,11 +198,6 @@ all_opt = { "required" : "0", "shortdesc" : "Physical switch number on device", "order" : 1 }, - "test" : { - "getopt" : "T", - "help" : "", - "order" : 1, - "obsolete" : "use -o status instead" }, "exec" : { "getopt" : "e:", "longopt" : "exec",
@@ -583,8 +578,6 @@ def process_input(avail_opt): ## Compatibility Layer ##### z = dict(opt) - if z.has_key("-T") == 1: - z["--action"] = "status" if z.has_key("--plug") == 1: z["-m"] = z["--plug"]
fence/agents/virsh/fence_virsh.py +1 -1
@@ -60,7 +60,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ - "test", "port", "sudo" ] + "port", "sudo" ] atexit.register(atexit_handler)
fence/agents/vmware/fence_vmware.py +1 -1
@@ -281,7 +281,7 @@ def vmware_check_vmware_type(options): # Main agent method def main(): device_opt = [ "ipaddr", "login", "passwd", "secure", - "test", "exec", "vmware_type", "vmware_datacenter"] + "exec", "vmware_type", "vmware_datacenter"] atexit.register(atexit_handler)
fence/agents/wti/fence_wti.py +1 -1
@@ -83,7 +83,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "ipaddr", "ipport", "login", "passwd", "no_login", "no_password", \ - "cmd_prompt", "secure", "port", "test" ] + "cmd_prompt", "secure", "port" ] atexit.register(atexit_handler)
fence/agents/xenapi/fence_xenapi.py +1 -1
@@ -201,7 +201,7 @@ def return_vm_reference(session, options): def main(): device_opt = [ "login", "passwd", "port", "no_login", "no_password", "session_url", - "test", "uuid" ] + "uuid" ] atexit.register(atexit_handler)
Signature · 1 line
1.7.7.6
PATCH 2/7 COMPATIBILITY BREAK: fence_drac5 replace --m / --modulename / modulename / module_name with standard -n / --plug / port
This change apply to you only if you use fence agent against DRAC CMC, other DRACs are bound to one machine, so they do not use this option at all. Device option no_port (no port is needed) was added, previously modulename was optional and this is not true with 'port' option by default.
--- fence/agents/drac5/fence_drac5.py | 10 ++++---- fence/agents/lib/fencing.py.py | 41 ++++++++---------------------------- 2 files changed, 14 insertions(+), 37 deletions(-)
fence/agents/drac5/fence_drac5.py +5 -5
@@ -24,7 +24,7 @@ BUILD_DATE="March, 2008" def get_power_status(conn, options): if options["model"] == "DRAC CMC": - conn.send_eol("racadm serveraction powerstatus -m " + options["--module-name"]) + conn.send_eol("racadm serveraction powerstatus -m " + options["--plug"]) elif options["model"] == "DRAC 5": conn.send_eol("racadm serveraction powerstatus")
@@ -43,7 +43,7 @@ def set_power_status(conn, options): }[options["--action"]] if options["model"] == "DRAC CMC": - conn.send_eol("racadm serveraction " + action + " -m " + options["--module-name"]) + conn.send_eol("racadm serveraction " + action + " -m " + options["--plug"]) elif options["model"] == "DRAC 5": conn.send_eol("racadm serveraction " + action) conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
@@ -79,7 +79,7 @@ def define_new_opts(): def main(): device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ - "drac_version", "module_name" ] + "drac_version", "port", "no_port" ] atexit.register(atexit_handler)
@@ -105,8 +105,8 @@ By default, the telnet interface is not enabled." conn = fence_login(options) if conn.before.find("CMC") >= 0: - if 0 == options.has_key("--module-name") and 0 == ["monitor", "list"].count(options["--action"].lower()): - fail_usage("Failed: You have to enter module name (-m)") + if 0 == options.has_key("--plug") and 0 == ["monitor", "list"].count(options["--action"].lower()): + fail_usage("Failed: You have to enter module name (-n)") options["model"] = "DRAC CMC" elif conn.before.find("DRAC 5") >= 0:
fence/agents/lib/fencing.py.py +9 -32
89 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH 3/7 COMPATIBILITY BREAK: fence_lpar replace --n / --partition / partition with standard -n / --plug / port
In reply to Marek 'marx' Grac--- fence/agents/lib/fencing.py.py | 3 +-- fence/agents/lpar/fence_lpar.py | 26 ++++++++------------------ 2 files changed, 9 insertions(+), 20 deletions(-)
fence/agents/lib/fencing.py.py +1 -2
@@ -759,8 +759,7 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list = None try: ## Process options that manipulate fencing device ##### - if (options["--action"] == "list") and \ - 0 == options["device_opt"].count("port") and 0 == options["device_opt"].count("partition"): + if (options["--action"] == "list") and 0 == options["device_opt"].count("port"): print "N/A" return elif (options["--action"] == "list" and get_outlet_list == None):
fence/agents/lpar/fence_lpar.py +8 -18
@@ -22,15 +22,15 @@ BUILD_DATE="" def get_power_status(conn, options): if options["--hmc-version"] == "3": - conn.send("lssyscfg -r lpar -m " + options["--managed"] + " -n " + options["--partition"] + " -F name,state\n") + conn.send("lssyscfg -r lpar -m " + options["--managed"] + " -n " + options["--plug"] + " -F name,state\n") conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) try: - status = re.compile("^" + options["--partition"] + ",(.*?),.*$", re.IGNORECASE | re.MULTILINE).search(conn.before).group(1) + status = re.compile("^" + options["--plug"] + ",(.*?),.*$", re.IGNORECASE | re.MULTILINE).search(conn.before).group(1) except AttributeError: fail(EC_STATUS_HMC) elif options["--hmc-version"] == "4": - conn.send("lssyscfg -r lpar -m "+ options["--managed"] +" --filter 'lpar_names=" + options["--partition"] + "'\n") + conn.send("lssyscfg -r lpar -m "+ options["--managed"] +" --filter 'lpar_names=" + options["--plug"] + "'\n") conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) try:
@@ -50,18 +50,18 @@ def get_power_status(conn, options): def set_power_status(conn, options): if options["--hmc-version"] == "3": conn.send("chsysstate -o " + options["--action"] + " -r lpar -m " + options["--managed"] - + " -n " + options["--partition"] + "\n") + + " -n " + options["--plug"] + "\n") conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) elif options["--hmc-version"] == "4": if options["--action"] == "on": conn.send("chsysstate -o on -r lpar -m " + options["--managed"] + - " -n " + options["--partition"] + + " -n " + options["--plug"] + " -f `lssyscfg -r lpar -F curr_profile " + " -m " + options["--managed"] + - " --filter \"lpar_names="+ options["--partition"] +"\"`\n" ) + " --filter \"lpar_names="+ options["--plug"] +"\"`\n" ) else: conn.send("chsysstate -o shutdown -r lpar --immed" + - " -m " + options["--managed"] + " -n " + options["--partition"] + "\n") + " -m " + options["--managed"] + " -n " + options["--plug"] + "\n") conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) def get_lpar_list(conn, options):
@@ -115,17 +115,10 @@ def define_new_opts(): "shortdesc" : "Force HMC version to use (3 or 4)", "default" : "4", "order" : 1 } - all_opt["partition"] = { - "getopt" : "n:", - "longopt" : "partition", - "help" : "-n <id> Name of the partition", - "required" : "0", - "shortdesc" : "Partition name", - "order" : 1 } def main(): device_opt = [ "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt", \ - "partition", "managed", "hmc_version" ] + "port", "managed", "hmc_version" ] atexit.register(atexit_handler)
@@ -145,9 +138,6 @@ def main(): if 0 == options.has_key("--managed"): fail_usage("Failed: You have to enter name of managed system") - if (0 == ["list", "monitor"].count(options["--action"].lower())) and (0 == options.has_key("--partition")): - fail_usage("Failed: You have to enter name of the partition") - if 1 == options.has_key("--hmc-version") and (options["--hmc-version"] != "3" and options["--hmc-version"] != "4"): fail_usage("Failed: You have to enter valid version number: 3 or 4")
Signature · 1 line
1.7.7.6
PATCH 4/7 COMPATIBILITY BREAK: fence_rsb replace -n / telnet_port with standard --ipport / ipport
In reply to Marek 'marx' Gractelnet_port has same functionality as ipport and -n is usually used for port number/UUID
--- fence/agents/rsb/fence_rsb.py | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-)
fence/agents/rsb/fence_rsb.py +3 -12
@@ -37,27 +37,18 @@ def set_power_status(conn, options): conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) def main(): - device_opt = [ "ipaddr", "ipport", "telnet_port", "login", "passwd", "secure", "cmd_prompt" ] + device_opt = [ "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt" ] atexit.register(atexit_handler) - all_opt["telnet_port"] = { - "getopt" : "n:", - "longopt" : "telnet_port", - "help" : "-n TCP port to use (deprecated, use -u)", - "required" : "0", - "shortdesc" : "TCP port to use for connection with device (default is 3172 for telnet)", - "order" : 1 - } + all_opt["cmd_prompt"]["default"] = "to quit:" opt = process_input(device_opt) - # option -n for backward compatibility (-n is normally port no) - if 1 == opt.has_key("--telnet_port"): - opt["--port"] = opt["--telnet_port"] # set default port for telnet only if 0 == opt.has_key("--ssh") and 0 == opt.has_key("--ipport"): opt["--ipport"] = "3172" + options = check_input(device_opt, opt) docs = { }
Signature · 1 line
1.7.7.6
PATCH 5/7 COMPATIBILITY BREAK: Remove obsolete options from STDIN
In reply to Marek 'marx' GracFor historical reasons and backward compatibility we supported these options blade -> port
option -> action
fm -> port
hostname -> ipaddr
These options were not in documentation and are completely removed now.
--- fence/agents/lib/fencing.py.py | 13 ------------- 1 files changed, 0 insertions(+), 13 deletions(-)
fence/agents/lib/fencing.py.py +0 -13
@@ -577,19 +577,6 @@ def process_input(avail_opt): (name, value) = (line + "=").split("=", 1) value = value[:-1] - ## Compatibility Layer - ###### - if name == "blade": - name = "port" - elif name == "option": - name = "action" - elif name == "fm": - name = "port" - elif name == "hostname": - name = "ipaddr" - - ## - ###### if avail_opt.count(name) == 0: sys.stderr.write("Parse error: Ignoring unknown option '"+line+"'\n") continue
Signature · 1 line
1.7.7.6
PATCH 6/7 COMPATIBILITY BREAK: replace udpport with ipport, make ipport dependent on ipaddress
In reply to Marek 'marx' Grac--- fence/agents/alom/fence_alom.py | 2 +- fence/agents/apc/fence_apc.py | 2 +- fence/agents/apc_snmp/fence_apc_snmp.py | 2 +- fence/agents/bladecenter/fence_bladecenter.py | 2 +- fence/agents/cisco_mds/fence_cisco_mds.py | 2 +- fence/agents/cisco_ucs/fence_cisco_ucs.py | 3 +-- fence/agents/drac5/fence_drac5.py | 2 +- fence/agents/eaton_snmp/fence_eaton_snmp.py | 2 +- fence/agents/hds_cb/fence_hds_cb.py | 2 +- fence/agents/hpblade/fence_hpblade.py | 3 +-- fence/agents/ibmblade/fence_ibmblade.py | 2 +- fence/agents/ifmib/fence_ifmib.py | 2 +- fence/agents/ilo/fence_ilo.py | 2 +- fence/agents/intelmodular/fence_intelmodular.py | 2 +- fence/agents/ipdu/fence_ipdu.py | 2 +- fence/agents/ldom/fence_ldom.py | 3 +-- fence/agents/lib/fencing.py.py | 13 +++---------- fence/agents/lib/fencing_snmp.py.py | 3 +-- fence/agents/lpar/fence_lpar.py | 2 +- fence/agents/rhevm/fence_rhevm.py | 2 +- fence/agents/rsa/fence_rsa.py | 2 +- fence/agents/rsb/fence_rsb.py | 2 +- fence/agents/sanbox2/fence_sanbox2.py | 2 +- fence/agents/virsh/fence_virsh.py | 3 +-- fence/agents/vmware_soap/fence_vmware_soap.py | 2 +- fence/agents/wti/fence_wti.py | 2 +- 26 files changed, 28 insertions(+), 40 deletions(-)
fence/agents/alom/fence_alom.py +1 -1
@@ -31,7 +31,7 @@ def set_power_status(conn, options): time.sleep(int(options["--power-timeout"])) def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure" ] + device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure" ] atexit.register(atexit_handler)
fence/agents/apc/fence_apc.py +1 -1
@@ -174,7 +174,7 @@ def set_power_status(conn, options): conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ + device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", \ "port", "switch" ] atexit.register(atexit_handler)
fence/agents/apc_snmp/fence_apc_snmp.py +1 -1
@@ -158,7 +158,7 @@ def apc_snmp_define_defaults(): # Main agent method def main(): - device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ + device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \ "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/bladecenter/fence_bladecenter.py +1 -1
@@ -78,7 +78,7 @@ def get_blades_list(conn, options): return outlets def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ + device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", \ "port", "missing_as_off" ] atexit.register(atexit_handler)
fence/agents/cisco_mds/fence_cisco_mds.py +1 -1
@@ -77,7 +77,7 @@ def get_outlets_status(conn, options): def main(): global PORT_OID - device_opt = [ "fabric_fencing", "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ + device_opt = [ "fabric_fencing", "ipaddr", "login", "passwd", "no_login", "no_password", \ "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/cisco_ucs/fence_cisco_ucs.py +1 -2
@@ -107,8 +107,7 @@ def define_new_opts(): "order" : 1 } def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", \ - "port", "web", "suborg" ] + device_opt = [ "ipaddr", "login", "passwd", "ssl", "port", "web", "suborg" ] atexit.register(atexit_handler)
fence/agents/drac5/fence_drac5.py +1 -1
@@ -78,7 +78,7 @@ def define_new_opts(): "order" : 1 } def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ + device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", \ "drac_version", "port", "no_port" ] atexit.register(atexit_handler)
fence/agents/eaton_snmp/fence_eaton_snmp.py +1 -1
@@ -197,7 +197,7 @@ def get_outlets_status(conn, options): # Main agent method def main(): - device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ + device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \ "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/hds_cb/fence_hds_cb.py +1 -1
@@ -107,7 +107,7 @@ def get_blades_list(conn, options): return outlets def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ + device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", \ "port", "missing_as_off" ] atexit.register(atexit_handler)
fence/agents/hpblade/fence_hpblade.py +1 -2
@@ -57,8 +57,7 @@ def get_blades_list(conn, options): return outlets def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ - "port", "missing_as_off" ] + device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", "port", "missing_as_off" ] atexit.register(atexit_handler)
fence/agents/ibmblade/fence_ibmblade.py +1 -1
@@ -50,7 +50,7 @@ def get_outlets_status(conn, _): # Main agent method def main(): - device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ + device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \ "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/ifmib/fence_ifmib.py +1 -1
@@ -95,7 +95,7 @@ def get_outlets_status(conn, options): # Main agent method def main(): - device_opt = [ "fabric_fencing", "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ + device_opt = [ "fabric_fencing", "ipaddr", "login", "passwd", "no_login", "no_password", \ "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/ilo/fence_ilo.py +1 -1
@@ -62,7 +62,7 @@ def define_new_opts(): "order" : 1 } def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "ribcl" ] + device_opt = [ "ipaddr", "login", "passwd", "ssl", "ribcl" ] atexit.register(atexit_handler)
fence/agents/intelmodular/fence_intelmodular.py +1 -1
@@ -61,7 +61,7 @@ def get_outlets_status(conn, options): # Main agent method def main(): - device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", + device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/ipdu/fence_ipdu.py +1 -1
@@ -125,7 +125,7 @@ def get_outlets_status(conn, options): # Main agent method def main(): - device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \ + device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \ "port", "snmp_version", "community" ] atexit.register(atexit_handler)
fence/agents/ldom/fence_ldom.py +1 -2
@@ -69,8 +69,7 @@ def set_power_status(conn, options): conn.log_expect(options, COMMAND_PROMPT_REG, int(options["--power-timeout"])) def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ - "port" ] + device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", "port" ] atexit.register(atexit_handler)
fence/agents/lib/fencing.py.py +3 -10
@@ -101,9 +101,9 @@ all_opt = { "ipport" : { "getopt" : "u:", "longopt" : "ipport", - "help" : "-u, --ipport=<port> TCP port to use", + "help" : "-u, --ipport=<port> TCP/UDP port to use", "required" : "0", - "shortdesc" : "TCP port to use for connection with device", + "shortdesc" : "TCP/UDP port to use for connection with device", "order" : 1 }, "login" : { "getopt" : "l:",
@@ -280,13 +280,6 @@ all_opt = { "required" : "0", "shortdesc" : "Forces agent to use IPv6 addresses only", "order" : 1 }, - "udpport" : { - "getopt" : "u:", - "longopt" : "udpport", - "help" : "-u, --udpport UDP/TCP port to use", - "required" : "0", - "shortdesc" : "UDP/TCP port to use for connection with device", - "order" : 1}, "separator" : { "getopt" : "C:", "longopt" : "separator",
@@ -371,7 +364,7 @@ DEPENDENCY_OPT = { "power_timeout", "shell_timeout", "login_timeout", "power_wait", "retry_on", "delay" ], "passwd" : [ "passwd_script" ], "secure" : [ "identity_file", "ssh_options" ], - "ipaddr" : [ "inet4_only", "inet6_only" ], + "ipaddr" : [ "ipport", "inet4_only", "inet6_only" ], "port" : [ "separator" ], "community" : [ "snmp_auth_prot", "snmp_sec_level", "snmp_priv_prot", \ "snmp_priv_passwd", "snmp_priv_passwd_script" ]
fence/agents/lib/fencing_snmp.py.py +1 -2
@@ -14,7 +14,6 @@ BUILD_DATE = "" # Fix for RHBZ#527844 def snmp_define_defaults (): - all_opt["udpport"]["default"] = "161" all_opt["ipport"]["default"] = "161" class FencingSnmp:
@@ -82,7 +81,7 @@ class FencingSnmp: force_ipvx = "udp:" cmd += " '%s%s%s'"% (force_ipvx, self.quote_for_run(self.options["--ip"]), - self.options.has_key("--udpport") and self.quote_for_run(":" + str (self.options["--udpport"])) or "") + self.options.has_key("--ipport") and self.quote_for_run(":" + str (self.options["--ipport"])) or "") return cmd def run_command(self, command, additional_timemout=0):
fence/agents/lpar/fence_lpar.py +1 -1
@@ -117,7 +117,7 @@ def define_new_opts(): "order" : 1 } def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt", \ + device_opt = [ "ipaddr", "login", "passwd", "secure", "cmd_prompt", \ "port", "managed", "hmc_version" ] atexit.register(atexit_handler)
fence/agents/rhevm/fence_rhevm.py +1 -1
@@ -101,7 +101,7 @@ def send_command(opt, command, method = "GET"): return result def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "web", "port" ] + device_opt = [ "ipaddr", "login", "passwd", "ssl", "web", "port" ] atexit.register(atexit_handler)
fence/agents/rsa/fence_rsa.py +1 -1
@@ -34,7 +34,7 @@ def set_power_status(conn, options): conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure" ] + device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure" ] atexit.register(atexit_handler)
fence/agents/rsb/fence_rsb.py +1 -1
@@ -37,7 +37,7 @@ def set_power_status(conn, options): conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt" ] + device_opt = [ "ipaddr", "login", "passwd", "secure", "cmd_prompt" ] atexit.register(atexit_handler)
fence/agents/sanbox2/fence_sanbox2.py +1 -1
@@ -100,7 +100,7 @@ def get_list_devices(conn, options): return outlets def main(): - device_opt = [ "fabric_fencing", "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "port" ] + device_opt = [ "fabric_fencing", "ipaddr", "login", "passwd", "cmd_prompt", "port" ] atexit.register(atexit_handler)
fence/agents/virsh/fence_virsh.py +1 -2
@@ -59,8 +59,7 @@ def set_power_status(conn, options): time.sleep(1) def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \ - "port", "sudo" ] + device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", "port", "sudo" ] atexit.register(atexit_handler)
fence/agents/vmware_soap/fence_vmware_soap.py +1 -1
@@ -156,7 +156,7 @@ def set_power_status(conn, options): conn.service.PowerOffVM_Task(mo_machine) def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "port", "uuid" ] + device_opt = [ "ipaddr", "login", "passwd", "ssl", "port", "uuid" ] atexit.register(atexit_handler)
fence/agents/wti/fence_wti.py +1 -1
@@ -82,7 +82,7 @@ def set_power_status(conn, options): conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) def main(): - device_opt = [ "ipaddr", "ipport", "login", "passwd", "no_login", "no_password", \ + device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \ "cmd_prompt", "secure", "port" ] atexit.register(atexit_handler)
Signature · 1 line
1.7.7.6
PATCH 7/7 COMPATIBILITY BREAK: remove -q / quiet
In reply to Marek 'marx' GracThis option was never widely used because fence agents are quite quiet by default.
--- fence/agents/lib/fencing.py.py | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
fence/agents/lib/fencing.py.py +1 -5
@@ -45,10 +45,6 @@ all_opt = { "required" : "0", "shortdesc" : "Display version information and exit", "order" : 53 }, - "quiet" : { - "getopt" : "q", - "help" : "", - "order" : 50 }, "verbose" : { "getopt" : "v", "longopt" : "verbose",
@@ -360,7 +356,7 @@ all_opt = { # options which are added automatically if 'key' is encountered ("default" is always added) DEPENDENCY_OPT = { - "default" : [ "help", "debug", "verbose", "quiet", "version", "action", "agent", \ + "default" : [ "help", "debug", "verbose", "version", "action", "agent", \ "power_timeout", "shell_timeout", "login_timeout", "power_wait", "retry_on", "delay" ], "passwd" : [ "passwd_script" ], "secure" : [ "identity_file", "ssh_options" ],
Signature · 1 line
1.7.7.6