

def _pick_random_nic(self):
    'Choose one network from existing ones.'
    ctxt = self.context
    nets = [net['id'] for net in ctxt.get('tenant', {
        
    }).get('networks', [])]
    if ctxt:
        net_idx = (self.context['iteration'] % len(nets))
        return [{
            'net-id': nets[net_idx],
        }]

dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/nova/utils.py NovaScenario._pick_random_nic/VarMisuse@50/72 `nets`->`ctxt`