def index(self, req):
        context = req.environ['nova.context']

        self.compute_api.ensure_default_security_group(context)
        groups = db.security_group_get_by_project(context,
                                                  context.project_id)
        limited_list = common.limited(groups, req)
        result = [self._format_security_group(context, group)
                     for group in limited_list]

        return {'security_groups':
                list(sorted(result,
                            key=lambda k: (k['tenant_id'], k['name'])))}
Generation of a warping field towards an image and given transformation parameters.
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/contrib/security_groups.py/SecurityGroupController.index--crossover with--dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/msct_register.py/generate_warping_field