# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2014 OpenStack Foundation
# All Rights Reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import jinja2
import netaddr
import six
OPTS = [
]
# The configuration file for ndpd daemon expects all the 'key value' to be
# on the same line as that of the interface. For example:
#
# if net0 AdvSendAdvertisements on MinRtrAdvInterval 3 MaxRtrAdvInterval 10
# prefix 3234234 net0 AdvOnLinkFlag on AdvAutonomousFlag on
"""if {{ interface_name }} """
""" AdvSendAdvertisements on MinRtrAdvInterval 3 MaxRtrAdvInterval 10 """
""" {% if ra_mode == constants.DHCPV6_STATELESS %} """
""" AdvOtherConfigFlag on """
""" {% endif %} """
""" {% if ra_mode == constants.DHCPV6_STATEFUL %} """
""" AdvManagedFlag on """
""" {% endif %} """
""" {% if ra_mode in (constants.IPV6_SLAAC, """
""" constants.DHCPV6_STATELESS) %} """
"""\nprefix {{ prefix }} {{ interface_name }} """
""" AdvOnLinkFlag on AdvAutonomousFlag on """
""" {% endif %} """)
"""Manage the data and state of Solaris in.ndpd daemon"""
for p in router_ports:
return ndpd_conf
# ndpd SMF service doesn't support refresh method, so we
# need to restart
"configuration file"))
for p in router_ports:
break
else:
return
return 'online' in stdout