none kbd-scrolllock [kbd-numlock] kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock 
  9   ˆl–ßi~”êh¥8 Z¸!\e•1hß¿ƒ™ga–ßi~”Še¶¥8 _¸.Å1hßÃ Ñ    # Copyright (C) 2007 Red Hat, Inc., Eugene Teo <eteo@redhat.com>

# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution for further information.

from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin


class Sendmail(Plugin):
    """sendmail service
    """

    plugin_name = "sendmail"
    profiles = ('services', 'mail')
    packages = ('sendmail',)

    def setup(self):
        self.add_copy_spec("/etc/mail/*")
        self.add_cmd_output([
            'mailq',
            'mailq -Ac'
        ])


class RedHatSendmail(Sendmail, RedHatPlugin):

    files = ('/etc/rc.d/init.d/sendmail',)

    def setup(self):
        super(RedHatSendmail, self).setup()
        self.add_copy_spec('/var/log/maillog')


class DebianSendmail(Sendmail, DebianPlugin, UbuntuPlugin):

    files = ('/etc/init.d/sendmail',)

    def setup(self):
        super(DebianSendmail, self).setup()
        self.add_copy_spec("/var/log/mail.*")

# vim: set et ts=4 sw=4 :
  "   ˆl–äY>”ÊeJuA3pÜjbÑ¿ÁƒmÆƒ¿Ä 	    # Copyright 2013-2014 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the following
# conditions are met:
#
#   Redistributions of source code must retain the above copyright notice,
#   this list of conditions and the following disclaimer.
#
#   Redistributions in binary form must reproduce the above copyright
#   notice, this list of conditions and the following disclaimer in the
#   documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import socket

from requestbuilder import Arg, MutuallyExclusiveArgList
from requestbuilder.exceptions import ArgumentError

from euca2ools.commands.ec2 import EC2Request, parse_ports


class _ModifyNetworkAclEntry(EC2Request):
    DESCRIPTION = ('Modify a network ACL entry\n\nThis is not an '
                   'actual EC2 request -- see euca-create-network-acl-'
                   'entry(1) or euca-replace-network-acl-entry(1) for '
                   'something usable.')
    ARGS = [Arg('NetworkAclId', metavar='NACL',
                help='ID of the network ACL to add the entry to (required)'),
            Arg('-n', '--rule-number', dest='RuleNumber', metavar='INT',
                required=True, type=int,
                help='rule number for the new entry (required)'),
            MutuallyExclusiveArgList(
                Arg('--allow', dest='RuleAction', action='store_const',
                    const='allow',
                    help='make the new entry allow the traffic it matches'),
                Arg('--deny', dest='RuleAction', action='store_const',
                    const='deny',
                    help='make the new entry block the traffic it matches'))
            .required(),
   