def get_driver_for_hosting_device(self, hd_id): try: return self._hosting_device_routing_drivers_binding[hd_id] except KeyError: with excutils.save_and_reraise_exception(reraise=False): raise cfg_exceptions.DriverNotFound(resource='hosting device', id=hd_id)
def get_driver(self, resource_id): try: return self._drivers[resource_id] except KeyError: with excutils.save_and_reraise_exception(reraise=False): raise cfg_exceptions.DriverNotFound(resource='router', id=resource_id)