

def create_nodes_w_interfaces_count(self, nodes_count, if_count=2, **kwargs):
    'Create nodes_count nodes with if_count interfaces each\n\n        Default random MAC is generated for each interface\n        '
    nodes = []
    for i in range(nodes_count):
        meta = self.default_metadata()
        if_list = [{
            'name': 'eth{0}'.format(i),
            'mac': self.generate_random_mac(),
        } for i in range(if_count)]
        if_list[0]['pxe'] = True
        self.set_interfaces_in_meta(meta, if_list)
        nodes.append(self.create_node(meta=meta, mac=if_list[0]['mac'], **kwargs))
    return nodes

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/base.py EnvironmentManager.create_nodes_w_interfaces_count/original