コード例 #1
0
admin_password=*********
admin_tenant_name=service
service_metadata_proxy=True
ovs_bridge=br-int
extension_sync_interval=600
rabbit_hosts=fd00:4888:1000:f901::c0,fd00:4888:1000:f901::c1,fd00:4888:1000:f901::c2
rabbit_use_ssl=False
rabbit_userid=guest
rabbit_password=*********
rabbit_virtual_host  =  /
rabbit_ha_queues=True
heartbeat_timeout_threshold=60
heartbeat_rate=2
"""

osp = OSP()
osp.role = "Compute"


def test_nova_conf():
    result = nova_conf.NovaConf(context_wrap(nova_content, osp=osp))
    print(result)
    assert result.get("DEFAULT", "notification_driver") == ""
    assert result.get("DEFAULT", "report_interval") == "10"
    assert result.get("DEFAULT",
                      "novncproxy_host") == "fd00:4888:1000:f901::c1"

    assert result.get(
        "keystone_authtoken",
        "auth_uri") == "http://[fd00:4888:1000:f901::a000]:5000/v2.0"
    assert result.get("keystone_authtoken", "service_metadata_proxy") == "True"
コード例 #2
0

listen mysql
  bind 10.0.1.10:3306
  option tcpka
  option httpchk
  stick on dst
  stick-table type ip size 1000
  timeout client 0
  timeout server 0
  server chicago-controller-0 10.0.1.14:3306 backup check fall 5 inter 2000 on-marked-down shutdown-sessions port 9200 rise 2
  server chicago-controller-1 10.0.1.12:3306 backup check fall 5 inter 2000 on-marked-down shutdown-sessions port 9200 rise 2
  server chicago-controller-2 10.0.1.15:3306 backup check fall 5 inter 2000 on-marked-down shutdown-sessions port 9200 rise 2

"""
osp_c = OSP()
osp_c.role = "Controller"


def test_haproxy_cls_1():
    r = HaproxyCfg(context_wrap(haproxy_osp, osp=osp_c))
    assert r.data.get("global").get("maxconn") == "10000"
    assert r.data.get("listen galera").get("mode") == "tcp"
    assert r.lines[2] == "group  haproxy"


def test_haproxy_cls_2():
    result = HaproxyCfg(context_wrap(haproxy_mysql, osp=osp_c))
    assert "daemon" in result.data.get("global")
    assert "maxconn" in result.data.get("global")
    assert result.data.get("defaults").get("maxconn") == "4096"
コード例 #3
0
from insights.core.context import OSP
from insights.contrib.pyparsing import ParseException as PyparsingParseException
from insights.parsers.rabbitmq import RabbitMQReport, RabbitMQReportOfContainers
from insights.tests import context_wrap

osp_controller = OSP()
osp_controller.role = "Controller"

RABBITMQCTL_REPORT_0 = """
Error: unable to connect to node rabbit@dprcclab002: nodedown

DIAGNOSTICS
===========

attempted to contact: [rabbit@dprcclab002]

rabbit@dprcclab002:
  * connected to epmd (port 4369) on dprcclab002
  * epmd reports: node 'rabbit' not running at all
                  no other nodes on dprcclab002
  * suggestion: start the node

current node details:
- node name: 'rabbitmq-cli-08@dprcclab002'
- home dir: /var/lib/rabbitmq
- cookie hash: k0XaAkNZ29GQG22RA/Uyxw==
"""

RABBITMQCTL_REPORT_1 = """
Reporting server status on {{2016,10,17},{3,42,41}}
コード例 #4
0
# If False fully disable profiling feature. (boolean value)
#profiler_enabled=false

# If False doesn't trace SQL requests. (boolean value)
#trace_sqlalchemy=false

[lvm]
iscsi_helper=lioadm
volume_group=cinder-volumes
iscsi_ip_address=192.168.88.10
volume_driver=cinder.volume.drivers.lvm.LVMVolumeDriver
volumes_dir=/var/lib/cinder/volumes
iscsi_protocol=iscsi
volume_backend_name=lvm

"""

osp = OSP()
osp.role = "Controller"


def test_match():
    result = CinderConf(context_wrap(cinder_content, osp=osp))
    assert result.data.get("DEFAULT", "enabled_backends") == "tripleo_ceph"
    assert result.data.get("DEFAULT", "glance_api_ssl_compression") == "False"
    assert result.data.get("DEFAULT", "eqlx_use_chap") == "false"

    assert result.data.get("lvm", "iscsi_helper") == "lioadm"
    assert result.data.get("lvm", "volumes_dir") == "/var/lib/cinder/volumes"
    assert result.data.get("lvm", "volume_backend_name") == "lvm"