PRODUCT=11/1/1/ab41
NAME="AT Translated Set 2 keyboard"
PHYS="isa0060/serio0/input0"
PROP=0
EV=120013
KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe
MSC=10
LED=7
MODALIAS=input:b0011v0001p0001eAB41-e0,1,4,11,14,k71,72,73,74,75,76,77,79,7A,7B,7C,7D,7E,7F,80,8C,8E,8F,9B,9C,9D,9E,9F,A3,A4,A5,A6,AC,AD,B7,B8,B9,D9,E2,ram4,l0,1,2,sfw
  
   355 c    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
  "   li~e8Yn2oh      13:0
  #   	li~h
nbѿtN ?     	# Copyright (C) 2012-2016 Red Hat, Inc.
# (C) Copyright 2017 Hewlett Packard Enterprise Development LP
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; If not, see <http://www.gnu.org/licenses/>.
#
# Author: tasleson
#         Gris Ge <fge@redhat.com>

import os
import sys
import getpass
import re
import time
import tty
import termios
from argparse import ArgumentParser, ArgumentTypeError
from argparse import RawTextHelpFormatter
import six
from lsm import (Client, Pool, VERSION, LsmError, Disk,
                 Volume, JobStatus, ErrorNumber, BlockRange,
                 uri_parse, Proxy, size_human_2_size_bytes,
                 AccessGroup, FileSystem, NfsExport, TargetPort, LocalDisk,
                 Battery)

from lsm.lsmcli.data_display import (
    DisplayData, PlugData, out,
    vol_provision_str_to_type, vol_rep_type_str_to_type, VolumeRAIDInfo,
    PoolRAIDInfo, VcrCap, LocalDiskInfo, VolumeRAMCacheInfo)

_CONNECTION_FREE_COMMANDS = ['local-disk-list',
                             'local-disk-ident-led-on',
                             'local-disk-ident-led-off',
                             'local-disk-fault-led-on',
                             'local-disk-fault-led-off']

if six.PY3:
    long = int

try:
    from collections import OrderedDict
except ImportError:
    # python 2.6 or earlier, use backport
    # noinspection PyUnresolvedReferences
    from ordereddict import OrderedDict


# Wraps the invocation to the command line
# @param    c   Object to invoke calls on (optional)
def cmd_line_wrapper(c=None):
    """
    Common command line code, called.
    """
    err_exit = 0
    cli = None

    try:
        cli = CmdLine()
        cli.process(c)
    except ArgError as ae:
        sys.stderr.write(str(ae))
        sys.stderr.flush()
        err_exit = 2
    except LsmError as le:
        sys.stderr.write(str(le) + "\n")
        sys.stderr.flush()
        if le.code == ErrorNumber.PERMISSION_DENIED:
            err_exit = 13   # common error code for EACCES
        else:
            err_exit = 4
    except KeyboardInterrupt:
        err_exit = 1
    except SystemExit as se:
        # argparse raises a SystemExit
        err_exit = se.code
    except:
        import traceback
        traceback.print_exc(file=sys.stdout)
        # We get *any* other exception don't return a successful error code
        err_exit = 2
    finally:
        # Regardless of what happens, we will try to close the connection if
        # possible to allow the plugin to clean up gracefully.
        if cli:
            try:
                # This will exit if are successful
                cli.shutdown(err_exit)
            except Exception:
                pass
        sy