def __unicode__(self):
        if 'name' in self.group:
            vals = {'from': self.from_port,
                    'to': self.to_port,
                    'group': self.group['name']}
            return _('ALLOW %(from)s:%(to)s from %(group)s') % vals
        else:
            vals = {'from': self.from_port,
                    'to': self.to_port,
                    'cidr': self.ip_range['cidr']}
            return vals % _('ALLOW %(from)s:%(to)s from %(cidr)s')

    # The following attributes are defined to keep compatibility with Neutron
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/api/nova.py/SecurityGroupRule.__unicode__/swapped operands of `%`