Fix bug 1961 to allow IPv6 addresses besides IPv4 as instantiation param 25/11825/4
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 4 Apr 2022 14:33:59 +0000 (16:33 +0200)
committerbeierlm <mark.beierl@canonical.com>
Wed, 6 Apr 2022 10:01:38 +0000 (12:01 +0200)
Change-Id: Ib362e7749b67a279b0268d4939f8474289988c58
Signed-off-by: rodriguezgar <frodriguezg@indra.es>
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osm_nbi/validation.py

index fc16f06..d1cfc1d 100644 (file)
@@ -157,7 +157,7 @@ ns_instantiate_vdu = {
                 "type": "object",
                 "properties": {
                     "name": name_schema,
-                    "ip-address": ip_schema,
+                    "ip-address": {"oneOf": [ip_schema, ipv6_schema]},
                     "mac-address": mac_schema,
                     "floating-ip-required": bool_schema,
                 },
@@ -176,7 +176,7 @@ ip_profile_dns_schema = {
     "items": {
         "type": "object",
         "properties": {
-            "address": ip_schema,
+            "address": {"oneOf": [ip_schema, ipv6_schema]},
         },
         "required": ["address"],
         "additionalProperties": False,
@@ -246,7 +246,7 @@ provider_network_schema = {
 }
 
 ns_instantiate_internal_vld = {
-    "title": "ns action instantiate input schema for vdu",
+    "title": "ns action instantiate input schema for vld",
     "$schema": "http://json-schema.org/draft-04/schema#",
     "type": "object",
     "properties": {
@@ -391,7 +391,7 @@ ns_instantiate = {
                             "properties": {
                                 "member-vnf-index-ref": name_schema,
                                 "vnfd-connection-point-ref": name_schema,
-                                "ip-address": ip_schema,
+                                "ip-address": {"oneOf": [ip_schema, ipv6_schema]},
                                 # "mac-address": mac_schema,
                             },
                             "required": [