def _allocate_tenant_net_segment(self, session): for network_type in self.tenant_network_types: segment = self._allocate_segment(session, network_type) if segment: return segment raise exc.NoNetworkAvailable()
def _allocate_ext_net_segment(self, context): network_type = cfg.CONF.ml2.external_network_type segment = self._allocate_segment(context, network_type) if segment: return segment raise exc.NoNetworkAvailable()