predicate = expected_keys.__eq__ if strict else expected_keys.issubset
if not predicate(provided_keys):
- msg = (_("Validation of dictionary's keys failed."
+ msg = (_("Validation of dictionary's keys failed. "
"Expected keys: %(expected_keys)s "
"Provided keys: %(provided_keys)s") %
{'expected_keys': expected_keys,
cfg.BoolOpt('allow_overlapping_ips', default=False,
help=_("Allow overlapping IP support in Neutron")),
cfg.StrOpt('host', default=utils.get_hostname(),
- help=_("Hostname to be used by the neutron server, agents and"
+ help=_("Hostname to be used by the neutron server, agents and "
"services running on this machine. All the agents and "
"services running on this machine must use the same "
"host value.")),
class PortInUse(InUse):
message = _("Unable to complete operation on port %(port_id)s "
- "for network %(net_id)s. Port already has an attached"
+ "for network %(net_id)s. Port already has an attached "
"device %(device_id)s.")
class OverlappingAllocationPools(Conflict):
- message = _("Found overlapping allocation pools:"
+ message = _("Found overlapping allocation pools: "
"%(pool_1)s %(pool_2)s for subnet %(subnet_cidr)s.")
try:
api.delete_dva(tenant_id, neutron_router["id"])
except h_exc.DvaNotFound:
- LOG.warning(_LW("The router %s had no physical representation,"
+ 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(_LW("Interface %s not found in the heleos back-end,"
+ 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)
new_controller = info.get('new_controller')
out_of_band = info.get('out_of_band')
if self.int_br and new_controller:
- LOG.debug("info_update received. New controller"
+ LOG.debug("info_update received. New controller "
"is to be set to: %s", new_controller)
self.int_br.set_controller(["tcp:" + new_controller])
if out_of_band:
- LOG.debug("info_update received. New controller"
+ LOG.debug("info_update received. New controller "
"is set to be out of band")
self.int_br.set_db_attribute("Controller",
self.int_bridge_name,
'body': body, 'header': self.headers})
resp, replybody = self.httpclient.request(
myurl, method=method, body=body, headers=self.headers)
- LOG.debug(("Response recd from SDN-VE. resp: %(resp)s"
- "body: %(body)s"),
+ LOG.debug("Response recd from SDN-VE. resp: %(resp)s "
+ "body: %(body)s",
{'resp': resp.status, 'body': replybody})
status_code = resp.status
def get_bridge_name(self, network_id):
if not network_id:
- LOG.warning(_LW("Invalid Network ID, will lead to incorrect bridge"
- "name"))
+ LOG.warning(_LW("Invalid Network ID, will lead to incorrect "
+ "bridge name"))
bridge_name = BRIDGE_NAME_PREFIX + network_id[0:11]
return bridge_name
cfg.StrOpt('eapi_username',
default='',
help=_('Username for Arista EOS. This is required field. '
- 'If not set, all communications to Arista EOS'
+ 'If not set, all communications to Arista EOS '
'will fail.')),
cfg.StrOpt('eapi_password',
default='',
cfg.StrOpt('eapi_host',
default='',
help=_('Arista EOS IP address. This is required field. '
- 'If not set, all communications to Arista EOS'
+ 'If not set, all communications to Arista EOS '
'will fail.')),
cfg.BoolOpt('use_fqdn',
default=True,
default=False,
help=_('A "True" value for this flag indicates to create a '
'router in VRF. If not set, all routers are created '
- 'in default VRF.'
+ 'in default VRF. '
'This is optional. If not set, a value of "False" '
'is assumed.')),
cfg.IntOpt('l3_sync_interval',
self.device_owner = device_owner
def __str__(self):
- return ("OVSPort: id = %s, ofport = %s, mac = %s,"
+ return ("OVSPort: id = %s, ofport = %s, mac = %s, "
"device_owner = %s, subnets = %s" %
(self.id, self.ofport, self.mac,
self.device_owner, self.subnets))
try:
skipped_devices = self.treat_devices_added_or_updated(
devices_added_updated, ovs_restarted)
- LOG.debug("process_network_ports - iteration:%(iter_num)d -"
+ LOG.debug("process_network_ports - iteration:%(iter_num)d - "
"treat_devices_added_or_updated completed. "
"Skipped %(num_skipped)d devices of "
"%(num_current)d devices currently available. "
if 'removed' in port_info:
start = time.time()
resync_b = self.treat_devices_removed(port_info['removed'])
- LOG.debug("process_network_ports - iteration:%(iter_num)d -"
+ LOG.debug("process_network_ports - iteration:%(iter_num)d - "
"treat_devices_removed completed in %(elapsed).3f",
{'iter_num': self.iter_num,
'elapsed': time.time() - start})
# If treat devices fails - must resync with plugin
sync = self.process_network_ports(port_info,
ovs_restarted)
- LOG.debug("Agent rpc_loop - iteration:%(iter_num)d -"
+ LOG.debug("Agent rpc_loop - iteration:%(iter_num)d - "
"ports processed. Elapsed:%(elapsed).3f",
{'iter_num': self.iter_num,
'elapsed': time.time() - start})
if self.ancillary_brs:
port_info = self.update_ancillary_ports(
ancillary_ports)
- LOG.debug("Agent rpc_loop - iteration:%(iter_num)d -"
+ LOG.debug("Agent rpc_loop - iteration:%(iter_num)d - "
"ancillary port info retrieved. "
"Elapsed:%(elapsed).3f",
{'iter_num': self.iter_num,
if port_info:
rc = self.process_ancillary_network_ports(
port_info)
- LOG.debug("Agent rpc_loop - iteration:"
+ LOG.debug("Agent rpc_loop - iteration: "
"%(iter_num)d - ancillary ports "
"processed. Elapsed:%(elapsed).3f",
{'iter_num': self.iter_num,
self.target_field = re.findall(r'^\%\((.*)\)s$',
match)[0]
except IndexError:
- err_reason = (_("Unable to identify a target field from:%s."
- "match should be in the form %%(<field_name>)s") %
+ err_reason = (_("Unable to identify a target field from:%s. "
+ "Match should be in the form %%(<field_name>)s") %
match)
LOG.exception(err_reason)
raise exceptions.PolicyInitError(