From b3dbfcad6f4b2bebc9ebc20fd7129a18879cb20c Mon Sep 17 00:00:00 2001 From: Gabriel Cuba Date: Tue, 14 Mar 2023 10:58:39 -0500 Subject: [PATCH] Feature 10978: Add support of ipv6_address_mode and ipv6_ra_mode to openstack connector Change-Id: I8ca741a215bd2c52999dee1ea301d4e02aafcb24 Signed-off-by: Gabriel Cuba --- .../osm_rovim_openstack/vimconn_openstack.py | 9 +++++++++ ..._specific_parameters-1524903ddd764e28.yaml | 20 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 releasenotes/notes/feature_10978_IPv6_network_creation_with_specific_parameters-1524903ddd764e28.yaml diff --git a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py index 621324a4..e4ee15b8 100644 --- a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py +++ b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py @@ -934,6 +934,15 @@ class vimconnector(vimconn.VimConnector): ip_str = str(netaddr.IPAddress(ip_int)) subnet["allocation_pools"][0]["end"] = ip_str + if ( + ip_profile.get("ipv6_address_mode") + and ip_profile["ip_version"] != "IPv4" + ): + subnet["ipv6_address_mode"] = ip_profile["ipv6_address_mode"] + # ipv6_ra_mode can be set to the same value for most use cases, see documentation: + # https://docs.openstack.org/neutron/latest/admin/config-ipv6.html#ipv6-ra-mode-and-ipv6-address-mode-combinations + subnet["ipv6_ra_mode"] = ip_profile["ipv6_address_mode"] + # self.logger.debug(">>>>>>>>>>>>>>>>>> Subnet: %s", str(subnet)) self.neutron.create_subnet({"subnet": subnet}) diff --git a/releasenotes/notes/feature_10978_IPv6_network_creation_with_specific_parameters-1524903ddd764e28.yaml b/releasenotes/notes/feature_10978_IPv6_network_creation_with_specific_parameters-1524903ddd764e28.yaml new file mode 100644 index 00000000..dbb5ab8b --- /dev/null +++ b/releasenotes/notes/feature_10978_IPv6_network_creation_with_specific_parameters-1524903ddd764e28.yaml @@ -0,0 +1,20 @@ +####################################################################################### +# Copyright ETSI Contributors and Others. +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +####################################################################################### +--- +features: + - | + Feature 10978: Add support of ipv6_address_mode and ipv6_ra_mode to openstack connector. \ No newline at end of file -- 2.17.1