def add_subnets(self):
        subnets = [
            subnet for subnet in CONF.subnets.split(',')
            if subnet
        ]

        assert(subnets)

        subnet_mapping = {}
        for subnet in subnets:
            try:
                netaddr.IPNetwork(subnet)
            except Exception:
                raise RuntimeError('subnet %s format is invalid' % subnet)

            status, resp = self.client.add_subnet(subnet)
            LOG.info(
                'add subnet %s status %s response %s',
                subnet,
                status,
                resp
            )
            if not self.is_ok(status):
                raise RuntimeError(subnet % 'failed to add subnet %s')

            subnet_mapping[resp['subnet']] = resp['id']

        self.subnet_mapping = subnet_mapping
dataset/ETHPy150Open openstack/compass-core/bin/client.py/CompassClient.add_subnets/swapped operands of `%`