

def _create_network_group(self, expect_errors=False, cluster=None, **kwargs):
    if (not cluster):
        cluster = cluster.clusters[0]
    ng = {
        'release': cluster.release.id,
        'name': 'external',
        'vlan_start': 50,
        'cidr': '10.3.0.0/24',
        'gateway': '10.3.0.1',
        'group_id': Cluster.get_default_group(cluster).id,
        'meta': {
            'notation': consts.NETWORK_NOTATION.cidr,
            'use_gateway': True,
            'map_priority': 2,
        },
    }
    ng.update(kwargs)
    resp = self.app.post(reverse('NetworkGroupCollectionHandler'), jsonutils.dumps(ng), headers=self.default_headers, expect_errors=expect_errors)
    return resp

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/base.py EnvironmentManager._create_network_group/VarMisuse@31/39 `self`->`cluster`