Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=c39920355... Commit: c399203557e791f7e92e838c948a1b7d5582d7cd Parent: 8015ec16e254bdd43fac75c6f56fe4dc1ba8031d Author: Marek 'marx' Grac mgrac@redhat.com AuthorDate: Thu Jun 27 13:18:56 2013 +0200 Committer: Marek 'marx' Grac mgrac@redhat.com CommitterDate: Thu Jun 27 13:18:56 2013 +0200
fence_apc: Change long options to short ones
Resolves: rhbz886614 --- fence/agents/apc/fence_apc.py | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py index d1c71b4..78e709f 100644 --- a/fence/agents/apc/fence_apc.py +++ b/fence/agents/apc/fence_apc.py @@ -186,7 +186,7 @@ def get_power_status5(conn, options):
conn.send_eol("olStatus all")
- exp_result = conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + exp_result = conn.log_expect(options, options["-c"], int(options["-Y"])) lines = conn.before.split("\n")
show_re = re.compile('^\s*(\d+): (.*): (On|Off)\s*$', re.IGNORECASE) @@ -196,11 +196,11 @@ def get_power_status5(conn, options): if (res != None): outlets[res.group(1)] = (res.group(2), res.group(3))
- if ["list", "monitor"].count(options["--action"]) == 1: + if ["list", "monitor"].count(options["-o"]) == 1: return outlets else: try: - (_, status) = outlets[options["--plug"]] + (_, status) = outlets[options["-n"]] return status.lower().strip() except KeyError: fail(EC_STATUS) @@ -209,10 +209,10 @@ def set_power_status5(conn, options): action = { 'on' : "olOn", 'off': "olOff" - }[options["--action"]] + }[options["-o"]]
- conn.send_eol(action + " " + options["--plug"]) - conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) + conn.send_eol(action + " " + options["-n"]) + conn.log_expect(options, options["-c"], int(options["-g"]))
def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug",