6033N/AChanges to the Neutron L3 agent to port it to Solaris. These changes
6033N/Awill eventually be proposed upstream.
6033N/A
6033N/A--- neutron-2015.1.2/neutron/agent/l3_agent.py.~1~ 2015-10-13 10:35:16.000000000 -0700
6033N/A+++ neutron-2015.1.2/neutron/agent/l3_agent.py 2016-01-28 23:07:42.233773807 -0800
6033N/A@@ -14,6 +14,7 @@
6033N/A # License for the specific language governing permissions and limitations
6033N/A # under the License.
6033N/A
6033N/A+import platform
6033N/A import sys
6033N/A
6033N/A from oslo_config import cfg
6033N/A@@ -46,6 +47,8 @@ def main(manager='neutron.agent.l3.agent
6033N/A register_opts(cfg.CONF)
6033N/A common_config.init(sys.argv[1:])
6033N/A config.setup_logging()
6033N/A+ if platform.system() == "SunOS":
6033N/A+ manager = 'neutron.agent.evs_l3_agent.EVSL3NATAgent'
6033N/A server = neutron_service.Service.create(
6033N/A binary='neutron-l3-agent',
6033N/A topic=topics.L3_AGENT,
6033N/A--- neutron-2015.1.2/neutron/agent/linux/daemon.py.~1~ 2015-10-13 10:35:16.000000000 -0700
6033N/A+++ neutron-2015.1.2/neutron/agent/linux/daemon.py 2016-01-28 23:07:42.234372590 -0800
6033N/A@@ -18,12 +18,14 @@ import grp
6033N/A import logging as std_logging
6033N/A from logging import handlers
6033N/A import os
6033N/A+import platform
6033N/A import pwd
6033N/A import signal
6033N/A import sys
6033N/A
6033N/A from oslo_log import log as logging
6033N/A
6033N/A+from neutron.agent.linux import utils
6033N/A from neutron.common import exceptions
6033N/A from neutron.i18n import _LE, _LI
6033N/A
6033N/A@@ -140,6 +142,15 @@ class Pidfile(object):
6033N/A if not pid:
6033N/A return False
6033N/A
6033N/A+ if platform.system() == "SunOS":
6033N/A+ cmd = ['/usr/bin/pargs', pid]
6033N/A+ try:
6033N/A+ exec_out = utils.execute(cmd)
6033N/A+ except RuntimeError:
6033N/A+ return False
6033N/A+ return self.procname in exec_out and (not self.uuid or
6033N/A+ self.uuid in exec_out)
6033N/A+
6033N/A cmdline = '/proc/%s/cmdline' % pid
6033N/A try:
6033N/A with open(cmdline, "r") as f:
6033N/A--- neutron-2015.1.2/neutron/common/ipv6_utils.py.~1~ 2015-10-13 10:35:16.000000000 -0700
6033N/A+++ neutron-2015.1.2/neutron/common/ipv6_utils.py 2016-01-28 23:28:34.771113032 -0800
6033N/A@@ -17,6 +17,7 @@
6033N/A IPv6-related utilities and helper functions.
6033N/A """
6033N/A import os
6033N/A+import platform
6033N/A
6033N/A import netaddr
6033N/A from oslo_log import log
6033N/A@@ -51,6 +52,11 @@ def get_ipv6_addr_by_EUI64(prefix, mac):
6033N/A def is_enabled():
6033N/A global _IS_IPV6_ENABLED
6033N/A
6033N/A+ if platform.system() == "SunOS":
6033N/A+ if _IS_IPV6_ENABLED is None:
6033N/A+ _IS_IPV6_ENABLED = True
6033N/A+ return _IS_IPV6_ENABLED
6033N/A+
6033N/A if _IS_IPV6_ENABLED is None:
6033N/A disabled_ipv6_path = "/proc/sys/net/ipv6/conf/default/disable_ipv6"
6033N/A if os.path.exists(disabled_ipv6_path):