

def create_security_group_rule(self, body):
    r = r.get('security_group_rules')[0]
    fields = ['direction', 'protocol', 'port_range_min', 'port_range_max', 'ethertype', 'remote_ip_prefix', 'tenant_id', 'security_group_id', 'remote_group_id']
    ret = {
        
    }
    for field in fields:
        ret[field] = r.get(field)
    ret['id'] = str(uuid.uuid4())
    self._fake_security_group_rules[ret['id']] = ret
    return {
        'security_group_rules': [ret],
    }

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/api/openstack/compute/test_neutron_security_groups.py MockClient.create_security_group_rule/VarMisuse@14/18 `body`->`r`