Пример #1
0
def acl_test_files():
    """Fixture - get all testing *.json ACLs from data directory

    :returns dict

    """
    return get_test_files(TEST_FILES_DIR)
Пример #2
0
def acl_test_files():
    """Fixture - get all testing *.json ACLs from data directory

    :returns dict

    """
    return get_test_files(TEST_FILES_DIR)
Пример #3
0
__status__ = 'alpha'


"""
NFQ classifier tests

NOTES: - root privileges are required
         (as iptables requires it)
       - ODL running locally is required for some tests
         (these tests will be skipped if ODL is not running)
"""


#: constants
TEST_FILES_DIR = os.path.join(os.path.dirname(__file__), 'data')
TEST_FILES_COMMON = get_test_files()


def _odl_is_runing():
    """
    Helper - a dummy check if ODL is running on localhost

    :return str

    """
    odl_runing = False

    try:
        odl_port = ':{port}'.format(port=ODL_PORT)
        process = subprocess.Popen(['sudo', 'lsof', '-i', odl_port],
                                   stdout=subprocess.PIPE,
Пример #4
0
__email__ = '*****@*****.**'
__copyright__ = 'Copyright(c) 2015, Cisco Systems, Inc.'
__version__ = '0.1'
__status__ = 'alpha'
"""
NFQ classifier tests

NOTES: - root privileges are required
         (as iptables requires it)
       - ODL running locally is required for some tests
         (these tests will be skipped if ODL is not running)
"""

#: constants
TEST_FILES_DIR = os.path.join(os.path.dirname(__file__), 'data')
TEST_FILES_COMMON = get_test_files()


def _odl_is_runing():
    """
    Helper - a dummy check if ODL is running on localhost

    :return str

    """
    odl_runing = False

    try:
        odl_port = ':{port}'.format(port=ODL_PORT)
        process = subprocess.Popen(['sudo', 'lsof', '-i', odl_port],
                                   stdout=subprocess.PIPE,