def connect_membership_to_external_network(self, membership, external_network_id, neutron):
        try:
            # check if the network actually exists
            response = neutron.show_network(external_network_id)
        except neutron_exceptions.NeutronClientException as e:
            logger.exception('External network with id %s does not exist. Stale data in database?', external_network_id)
            six.reraise(CloudBackendError, e)
        else:

            network_name = response['network']['name']
            subnet_id = response['network']['subnets'][0]
            # XXX: refactor function call, split get_or_create_router into more fine grained
            self.get_or_create_router(neutron, network_name, subnet_id, membership.tenant_id,
                                      external=True, network_id=response['network']['id'])

            membership.external_network_id = external_network_id
            membership.save()

            logger.info('Router between external network %s and tenant %s was successfully created',
                        external_network_id, membership.tenant_id)
            return external_network_id
Slices bounded DynamicMaps by setting the soft_ranges on key dimensions.
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/iaas/backend.py/OpenStackBackend.connect_membership_to_external_network--crossover with--dataset/ETHPy150Open ioam/holoviews/holoviews/core/spaces.py/DynamicMap._slice_bounded