minor issues with validation and git_ignore. Added vld:cp ip-address parameter 56/6456/4
authortierno <alfonso.tiernosepulveda@telefonica.com>
Mon, 3 Sep 2018 12:32:10 +0000 (14:32 +0200)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Wed, 12 Sep 2018 12:37:14 +0000 (14:37 +0200)
Change-Id: I9e79aea9bd8e53448a9ac54c3caf7ac08ac411b3
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
.gitignore-common
osm_nbi/engine.py
osm_nbi/html_public/version
osm_nbi/validation.py

index f0f10bd..6eb4b24 100644 (file)
@@ -32,4 +32,4 @@ osm_nbi/test/temp
 build
 dist
 *.egg-info
-
+.eggs
index 8722383..12849a8 100644 (file)
@@ -454,10 +454,10 @@ class Engine(object):
             for in_vld in get_iterable(indata.get("vld")):
                 for vldd in get_iterable(nsd.get("vld")):
                     if in_vld["name"] == vldd["name"] or in_vld["name"] == vldd["id"]:
-                            break
-                    else:
-                        raise EngineException("Invalid parameter vld:name='{}' is not present at nsd:vld".format(
-                            in_vld["name"]))
+                        break
+                else:
+                    raise EngineException("Invalid parameter vld:name='{}' is not present at nsd:vld".format(
+                        in_vld["name"]))
 
     def _format_new_data(self, session, item, indata):
         now = time()
@@ -671,7 +671,7 @@ class Engine(object):
                 "orchestration-progress": {},
                 # {"networks": {"active": 0, "total": 0}, "vms": {"active": 0, "total": 0}},
 
-                "crete-time": now,
+                "create-time": now,
                 "nsd-name-ref": nsd["name"],
                 "operational-events": [],   # "id", "timestamp", "description", "event",
                 "nsd-ref": nsd["id"],
index e18fca4..03db56b 100644 (file)
@@ -1,3 +1,3 @@
-0.1.16
-2018-08-28
+0.1.17
+2018-09-12
 
index 7cf9d1c..a84b0bd 100644 (file)
@@ -155,8 +155,10 @@ ns_instantiate_internal_vld = {
                 "properties": {
                     "id-ref": name_schema,
                     "ip-address": ip_schema,
+                    # "mac-address": mac_schema,
                 },
-                "required": ["id-ref", "ip-address"],
+                "required": ["id-ref"],
+                "minProperties": 2,
                 "additionalProperties": False
             },
         }
@@ -210,6 +212,22 @@ ns_instantiate = {
                     "name": string_schema,
                     "vim-network-name": {"OneOf": [string_schema, object_schema]},
                     "ip-profile": object_schema,
+                    "vnfd-connection-point-ref": {
+                        "type": "array",
+                        "minItems": 1,
+                        "items": {
+                            "type": "object",
+                            "properties": {
+                                "member-vnf-index-ref": name_schema,
+                                "vnfd-connection-point-ref": name_schema,
+                                "ip-address": ip_schema,
+                                # "mac-address": mac_schema,
+                            },
+                            "required": ["member-vnf-index-ref", "vnfd-connection-point-ref"],
+                            "minProperties": 3,
+                            "additionalProperties": False
+                        },
+                    }
                 },
                 "required": ["name"],
                 "additionalProperties": False