Fix bug 1407 12/10412/5
authorsousaedu <eduardo.sousa@canonical.com>
Mon, 1 Mar 2021 23:15:52 +0000 (00:15 +0100)
committersousaedu <eduardo.sousa@canonical.com>
Tue, 2 Mar 2021 09:52:16 +0000 (10:52 +0100)
Change-Id: I694f47c2403983c87850447f027f370a6f375eb2
Signed-off-by: sousaedu <eduardo.sousa@canonical.com>
.dockerignore [new file with mode: 0644]
NG-RO/osm_ng_ro/ns.py

diff --git a/.dockerignore b/.dockerignore
new file mode 100644 (file)
index 0000000..715b6fd
--- /dev/null
@@ -0,0 +1,29 @@
+#######################################################################################
+# 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.
+#######################################################################################
+
+.tox
+.idea
+charms
+deprecated
+devops-stages
+docker
+instance-scenarios
+scenarios
+sdn
+test-docker
+venv
+vnfs
\ No newline at end of file
index 2db33e4..e62eef5 100644 (file)
@@ -785,6 +785,17 @@ class Ns(object):
                         continue  # interface not connected to any vld
 
                     extra_dict["depends_on"].append(net_text)
+
+                    if "port-security-enabled" in interface:
+                        interface["port_security"] = (
+                            interface.pop("port-security-enabled")
+                        )
+
+                    if "port-security-disable-strategy" in interface:
+                        interface["port_security_disable_strategy"] = (
+                            interface.pop("port-security-disable-strategy")
+                        )
+
                     net_item = {
                         x: v
                         for x, v in interface.items()