Merge "Update i18n translation for neutron.cmd log msg's"
This commit is contained in:
commit
50f65e2a9a
@ -19,6 +19,7 @@ from neutron.agent.linux import ip_link_support
|
|||||||
from neutron.agent.linux import ovs_lib
|
from neutron.agent.linux import ovs_lib
|
||||||
from neutron.agent.linux import utils as agent_utils
|
from neutron.agent.linux import utils as agent_utils
|
||||||
from neutron.common import utils
|
from neutron.common import utils
|
||||||
|
from neutron.openstack.common.gettextutils import _LE
|
||||||
from neutron.openstack.common import log as logging
|
from neutron.openstack.common import log as logging
|
||||||
from neutron.plugins.common import constants as const
|
from neutron.plugins.common import constants as const
|
||||||
from neutron.plugins.openvswitch.common import constants as ovs_const
|
from neutron.plugins.openvswitch.common import constants as ovs_const
|
||||||
@ -67,11 +68,11 @@ def ofctl_arg_supported(root_helper, cmd, **kwargs):
|
|||||||
agent_utils.execute(full_args, root_helper=root_helper)
|
agent_utils.execute(full_args, root_helper=root_helper)
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
LOG.debug("Exception while checking supported feature via "
|
LOG.debug("Exception while checking supported feature via "
|
||||||
"command %s. Exception: %s" % (full_args, e))
|
"command %s. Exception: %s", (full_args, e))
|
||||||
return False
|
return False
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception(_("Unexpected exception while checking supported"
|
LOG.exception(_LE("Unexpected exception while checking supported"
|
||||||
" feature via command: %s") % full_args)
|
" feature via command: %s"), full_args)
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
@ -102,7 +103,7 @@ def vf_management_supported(root_helper):
|
|||||||
LOG.debug("ip link command does not support vf capability")
|
LOG.debug("ip link command does not support vf capability")
|
||||||
return False
|
return False
|
||||||
except ip_link_support.UnsupportedIpLinkCommand:
|
except ip_link_support.UnsupportedIpLinkCommand:
|
||||||
LOG.exception(_("Unexpected exception while checking supported "
|
LOG.exception(_LE("Unexpected exception while checking supported "
|
||||||
"ip link command"))
|
"ip link command"))
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -38,19 +38,19 @@ class BoolOptCallback(cfg.BoolOpt):
|
|||||||
def check_ovs_vxlan():
|
def check_ovs_vxlan():
|
||||||
result = checks.vxlan_supported(root_helper=cfg.CONF.AGENT.root_helper)
|
result = checks.vxlan_supported(root_helper=cfg.CONF.AGENT.root_helper)
|
||||||
if not result:
|
if not result:
|
||||||
LOG.error(_('Check for Open vSwitch VXLAN support failed. '
|
LOG.error(_LE('Check for Open vSwitch VXLAN support failed. '
|
||||||
'Please ensure that the version of openvswitch '
|
'Please ensure that the version of openvswitch '
|
||||||
'being used has VXLAN support.'))
|
'being used has VXLAN support.'))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def check_ovs_patch():
|
def check_ovs_patch():
|
||||||
result = checks.patch_supported(root_helper=cfg.CONF.AGENT.root_helper)
|
result = checks.patch_supported(root_helper=cfg.CONF.AGENT.root_helper)
|
||||||
if not result:
|
if not result:
|
||||||
LOG.error(_('Check for Open vSwitch patch port support failed. '
|
LOG.error(_LE('Check for Open vSwitch patch port support failed. '
|
||||||
'Please ensure that the version of openvswitch '
|
'Please ensure that the version of openvswitch '
|
||||||
'being used has patch port support or disable features '
|
'being used has patch port support or disable features '
|
||||||
'requiring patch ports (gre/vxlan, etc.).'))
|
'requiring patch ports (gre/vxlan, etc.).'))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
@ -67,9 +67,9 @@ def check_arp_responder():
|
|||||||
result = checks.arp_responder_supported(
|
result = checks.arp_responder_supported(
|
||||||
root_helper=cfg.CONF.AGENT.root_helper)
|
root_helper=cfg.CONF.AGENT.root_helper)
|
||||||
if not result:
|
if not result:
|
||||||
LOG.error(_('Check for Open vSwitch ARP responder support failed. '
|
LOG.error(_LE('Check for Open vSwitch ARP responder support failed. '
|
||||||
'Please ensure that the version of openvswitch '
|
'Please ensure that the version of openvswitch '
|
||||||
'being used has ARP flows support.'))
|
'being used has ARP flows support.'))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +44,8 @@ def _directory_to_check_translation(filename):
|
|||||||
# In order to try and speed up the integration of this we will
|
# In order to try and speed up the integration of this we will
|
||||||
# do it on a directory by directory basis. The last patch of the
|
# do it on a directory by directory basis. The last patch of the
|
||||||
# series will remove this and the entire code base will be validated.
|
# series will remove this and the entire code base will be validated.
|
||||||
dirs = ["neutron/agent"]
|
dirs = ["neutron/agent",
|
||||||
|
"neutron/cmd"]
|
||||||
return any([dir in filename for dir in dirs])
|
return any([dir in filename for dir in dirs])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user