

def test_verify_networks_with_excluded_networks(self):
    'Verify that network verification can exclude interfaces'
    cluster_db = self.env.create(cluster_kwargs={
        
    }, nodes_kwargs=[{
        'api': False,
    }, {
        'api': False,
    }])
    (node1, node2) = self.env.nodes
    nets_sent = [{
        'iface': 'eth0',
        'vlans': [0],
    }, {
        'iface': 'eth1',
        'vlans': range(100, 104),
    }]
    nets_excluded = [{
        'iface': 'eth3',
    }, {
        'iface': 'eth4',
    }]
    task = Task(name='super', cluster_id=cluster_db.id)
    task.cache = {
        'args': {
            'nodes': [{
                'uid': node1.id,
                'name': node1.name,
                'status': nets_sent.status,
                'networks': nets_sent,
                'excluded_networks': nets_excluded,
            }, {
                'uid': node2.id,
                'name': node2.name,
                'status': node2.status,
                'networks': nets_sent,
                'excluded_networks': nets_excluded,
            }],
            'offline': 0,
        },
    }
    self.db.add(task)
    self.db.commit()
    kwargs = {
        'task_uuid': task.uuid,
        'status': 'ready',
        'nodes': [{
            'uid': node1.id,
            'name': node1.name,
            'status': node1.status,
            'networks': nets_sent,
            'excluded_networks': nets_excluded,
        }, {
            'uid': node2.id,
            'name': node2.name,
            'status': node2.status,
            'networks': nets_sent,
            'excluded_networks': nets_excluded,
        }],
    }
    self.receiver.verify_networks_resp(**kwargs)
    self.db.flush()
    self.db.refresh(task)
    self.assertEqual(task.status, 'ready')
    expected_message = 'Fuel cannot establish following bonding modes on Bootstrap nodes: '
    self.assertIn(expected_message, task.message)

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_rpc_consumer.py TestVerifyNetworks.test_verify_networks_with_excluded_networks/VarMisuse@169/244 `node1`->`nets_sent`