TripleO Ansible project repository. Contains playbooks for use with TripleO OpenStack deployments.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.1 KiB

# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import configparser
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def get_config(host):
stdout = host.check_output('ovs-vsctl get open_vswitch . other_config')
content = '[default]\n' + stdout.replace('{', '').replace('}', '').replace(', ', '\n')
cfg = configparser.RawConfigParser()
return dict(cfg['default'])
def test_positive_dpdk_extra(host):
other_config = get_config(host)
dpdk_extra = other_config['dpdk-extra'].replace('"', '')
assert dpdk_extra == " -n 4"
def test_positive_pmd(host):
other_config = get_config(host)
val = other_config['pmd-cpu-mask'].replace('"', '')
assert val == "e002"
def test_positive_socket_mem(host):
other_config = get_config(host)
val = other_config['dpdk-socket-mem'].replace('"', '')
assert val == "1024,1024"
def test_positive_lcore(host):
other_config = get_config(host)
assert 'dpdk-lcore-mask' not in other_config
def test_positive_validator_threads(host):
other_config = get_config(host)
assert 'n-revalidator-threads' not in other_config
def test_positive_handler_threads(host):
other_config = get_config(host)
assert 'n-handler-threads' not in other_config
def test_positive_emc_prob(host):
other_config = get_config(host)
assert 'emc-insert-inv-prob' not in other_config