#"neutron/plugins/brocade",
"neutron/plugins/cisco",
"neutron/plugins/common",
- #"neutron/plugins/embrane",
+ "neutron/plugins/embrane",
"neutron/plugins/hyperv",
#"neutron/plugins/ibm",
"neutron/plugins/linuxbridge",
from heleosapi import constants as h_con
from heleosapi import exceptions as h_exc
+from neutron.i18n import _LE
from neutron.openstack.common import log as logging
from neutron.plugins.embrane.agent.operations import router_operations
from neutron.plugins.embrane.common import constants as p_con
operation_context.item,
transient_state)
except Exception:
- LOG.exception(_("Unhandled exception occurred"))
+ LOG.exception(_LE("Unhandled exception occurred"))
from heleosapi import exceptions as h_exc
+from neutron.i18n import _LW
from neutron.openstack.common import log as logging
from neutron.plugins.embrane.common import constants as p_con
try:
api.delete_dva(tenant_id, neutron_router["id"])
except h_exc.DvaNotFound:
- LOG.warning(_("The router %s had no physical representation,"
- "likely already deleted"), neutron_router["id"])
+ LOG.warning(_LW("The router %s had no physical representation,"
+ "likely already deleted"), neutron_router["id"])
return p_con.Status.DELETED
dva = api.shrink_interface(tenant_id, neutron_router["id"],
neutron_router["admin_state_up"], port_id)
except h_exc.InterfaceNotFound:
- LOG.warning(_("Interface %s not found in the heleos back-end,"
- "likely already deleted"), port_id)
+ LOG.warning(_LW("Interface %s not found in the heleos back-end,"
+ "likely already deleted"), port_id)
return (p_con.Status.ACTIVE if neutron_router["admin_state_up"] else
p_con.Status.READY)
except h_exc.PreliminaryOperationsFailed as ex:
from neutron.db import l3_db
from neutron.db import models_v2
from neutron.extensions import l3
+from neutron.i18n import _LE
from neutron.openstack.common import log as logging
from neutron.plugins.embrane.agent import dispatcher
from neutron.plugins.embrane.common import config # noqa
try:
self._update_db_interfaces_state(context, neutron_router)
except Exception:
- LOG.exception(_("Unhandled exception occurred"))
+ LOG.exception(_LE("Unhandled exception occurred"))
return self._set_db_router_state(context, neutron_router, state)
def _retrieve_prefix_from_port(self, context, neutron_port):
self._esm_api.get_dva(id)
except h_exc.DvaNotFound:
- LOG.error(_("The following routers have not physical match: %s"),
+ LOG.error(_LE("The following routers have not physical match: %s"),
id)
self._set_db_router_state(context, neutron_router,
p_con.Status.ERROR)
- LOG.debug(_("Requested router: %s"), neutron_router)
+ LOG.debug("Requested router: %s", neutron_router)
return self._make_router_dict(neutron_router, fields)
def get_routers(self, context, filters=None, fields=None, sorts=None,
try:
self._esm_api.get_dvas(id_list)
except h_exc.DvaNotFound:
- LOG.error(_("The following routers have not physical match: %s"),
+ LOG.error(_LE("The following routers have not physical match: %s"),
repr(id_list))
error_routers = []
for id in id_list:
d_context=embrane_ctx.DispatcherContext(
p_con.Events.DELETE_ROUTER, neutron_router, context,
state_change), args=())
- LOG.debug(_("Deleting router=%s"), neutron_router)
+ LOG.debug("Deleting router=%s", neutron_router)
return neutron_router
def add_router_interface(self, context, router_id, interface_info):
from neutron.common import constants
from neutron.db import models_v2
+from neutron.i18n import _LI
from neutron.openstack.common import log as logging
LOG = logging.getLogger(__name__)
try:
subnet_id = neutron_port["fixed_ips"][0]["subnet_id"]
except (KeyError, IndexError):
- LOG.info(_("No ip allocation set"))
+ LOG.info(_LI("No ip allocation set"))
return
subnet = retrieve_subnet(context, subnet_id)
allocated_ip = neutron_port["fixed_ips"][0]["ip_address"]