def setup(self):
for port in self.int_br.get_external_ports():
- LOG.debug(_('external port %s'), port)
+ LOG.debug(_('External port %s'), port)
self.api.update_port(rest_nw_id.NW_ID_EXTERNAL,
port.switch.datapath_id, port.ofport)
def check_ofp_rest_api_addr(db):
- LOG.debug("checking db")
+ LOG.debug(_("Checking db"))
servers = db.ofp_server.all()
elif serv.host_type == "controller":
ofp_controller_addr = serv.address
else:
- LOG.warn(_("ignoring unknown server type %s"), serv)
+ LOG.warn(_("Ignoring unknown server type %s"), serv)
- LOG.debug("api %s", ofp_rest_api_addr)
+ LOG.debug(_("API %s"), ofp_rest_api_addr)
if ofp_controller_addr:
LOG.warn(_('OF controller parameter is stale %s'), ofp_controller_addr)
if not ofp_rest_api_addr:
raise RuntimeError(_("Ryu rest API port isn't specified"))
- LOG.debug(_("going to ofp controller mode %s"), ofp_rest_api_addr)
+ LOG.debug(_("Going to ofp controller mode %s"), ofp_rest_api_addr)
return ofp_rest_api_addr
options = {"sql_connection": cfg.CONF.DATABASE.sql_connection}
db = SqlSoup(options["sql_connection"])
- LOG.info(_("Connecting to database \"%(database)s\" on %(host)s") %
+ LOG.info(_("Connecting to database \"%(database)s\" on %(host)s"),
{"database": db.engine.url.database,
"host": db.engine.url.host})
ofp_rest_api_addr = check_ofp_rest_api_addr(db)
OVSQuantumOFPRyuAgent(integ_br, ofp_rest_api_addr,
tunnel_ip, ovsdb_ip, ovsdb_port, root_helper)
except httplib.HTTPException, e:
- LOG.error(_("initialization failed: %s"), e)
+ LOG.error(_("Initialization failed: %s"), e)
sys.exit(1)
LOG.info(_("Ryu initialization on the node is done."
cfg.IntOpt('reconnect_interval', default=2),
cfg.IntOpt('sql_min_pool_size',
default=1,
- help="Minimum number of SQL connections to keep open in a "
- "pool"),
+ help=_("Minimum number of SQL connections to keep open in a "
+ "pool")),
cfg.IntOpt('sql_max_pool_size',
default=5,
- help="Maximum number of SQL connections to keep open in a "
- "pool"),
+ help=_("Maximum number of SQL connections to keep open in a "
+ "pool")),
cfg.IntOpt('sql_idle_timeout',
default=3600,
- help="Timeout in seconds before idle sql connections are "
- "reaped"),
+ help=_("Timeout in seconds before idle sql connections are "
+ "reaped")),
cfg.BoolOpt('sql_dbpool_enable',
default=False,
- help="Enable the use of eventlet's db_pool for MySQL"),
+ help=_("Enable the use of eventlet's db_pool for MySQL")),
]
ovs_opts = [
).params(last_key=last_key).one()
new_key = new_key[0] # the result is tuple.
- LOG.debug(_("last_key %(last_key)s new_key %(new_key)s") %
- {"last_key": last_key, "new_key": new_key})
+ LOG.debug(_("last_key %(last_key)s new_key %(new_key)s"),
+ locals())
if new_key > self.key_max:
- LOG.debug(_("no key found"))
+ LOG.debug(_("No key found"))
raise orm_exc.NoResultFound()
return new_key