

def _create_rules_for_security_group(self, security_groups, rules_per_security_group, ip_protocol='tcp', cidr='0.0.0.0/0'):
    action_name = ('nova.create_%s_rules' % (rules_per_security_group * len(security_groups)))
    with atomic.ActionTimer(self, action_name):
        for (i, security_group) in enumerate(security_groups):
            for j in range(rules_per_security_group):
                self.clients('nova').security_group_rules.create(security_group.id, from_port=(((i * rules_per_security_group) + j) + 1), to_port=(((i * rules_per_security_group) + j) + 1), ip_protocol=ip_protocol, cidr=cidr)

dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/nova/utils.py NovaScenario._create_rules_for_security_group/original