Example #1
0
def _test_ovn_provider(playbook_name):
    playbook_path = os.path.join(PLAYBOOK_DIR, playbook_name)
    playbook = Playbook(playbook_path)
    playbook.run()

    assert not playbook.execution_stats['failures']
    assert not playbook.idempotency_check_stats['failures']
    assert playbook.execution_stats['changed'].get('localhost', 0) > 0
    assert not playbook.idempotency_check_stats['changed']
def _provision_icmp_rule(source_ip, action):
    playbook_path = os.path.join(
        PLAYBOOK_DIR, action + '_icmp_rule_on_default_sec_group.yml')
    playbook = Playbook(playbook_path,
                        extra_vars={
                            'source_ip': source_ip,
                            'cloud_name': 'ovirt'
                        })
    playbook.run()
def _test_ovn_provider(playbook_name):
    playbook_path = os.path.join(PLAYBOOK_DIR, playbook_name)
    playbook = Playbook([playbook_path])
    playbook.run()

    assert not playbook.execution_stats.failures
    assert not playbook.idempotency_check_stats.failures
    assert playbook.execution_stats.changed.get('localhost', 0) > 0
    assert not playbook.idempotency_check_stats.changed
Example #4
0
def _test_ovn_provider(playbook_name, private_dir):
    playbook_path = os.path.join(suite.playbook_dir(), playbook_name)
    playbook = Playbook(playbook_path, private_dir=private_dir)
    playbook.run()

    assert not playbook.execution_stats['failures']
    assert not playbook.idempotency_check_stats['failures']
    assert playbook.execution_stats['changed'].get('localhost', 0) > 0
    assert not playbook.idempotency_check_stats['changed']
def _provision_icmp_rule(source_ip, action):
    playbook_path = os.path.join(PLAYBOOK_DIR,
                                 action +
                                 '_icmp_rule_on_default_sec_group.yml')
    playbook = Playbook(
        [playbook_path],
        extra_vars={
            'source_ip': source_ip,
            'cloud_name': 'ovirt'
        }
    )
    playbook.run()
def _provision_icmp_rule(source_ip, ip_version, action, private_dir):
    playbook_path = os.path.join(suite.playbook_dir(), action + '_icmp_rule_on_default_sec_group.yml')
    playbook = Playbook(
        playbook_path,
        extra_vars={
            'source_ip': source_ip,
            'cloud_name': 'ovirt',
            'ether_type': f'IPv{ip_version}',
        },
        private_dir=private_dir,
    )
    playbook.run()