Bug 496 fixed SDN controller creation 28/6128/2
authortierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 10 May 2018 16:33:16 +0000 (18:33 +0200)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 11 May 2018 10:01:22 +0000 (12:01 +0200)
Change-Id: I636b14ed615a03d09c667672c27a36261dc0a815
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
lcm/osm_lcm/ROclient.py
lcm/osm_lcm/lcm.py

index 08a0407..b6983d3 100644 (file)
@@ -229,6 +229,8 @@ class ROClient:
             return {'datacenter': indata}
         elif item == "ns" or item == "instances":
             return {'instance': indata}
+        elif item == "sdn":
+            return {'sdn_controller': indata}
         else:
             assert False, "_create_envelop with unknown item {}".format(item)
 
index aac7e82..f7b6ca6 100644 (file)
@@ -332,6 +332,7 @@ class Lcm:
             sdn_RO.pop("_admin", None)
             sdn_RO.pop("schema_version", None)
             sdn_RO.pop("schema_type", None)
+            sdn_RO.pop("description", None)
             desc = await RO.create("sdn", descriptor=sdn_RO)
             RO_sdn_id = desc["uuid"]
             db_sdn["_admin"]["deployed"]["RO"] = RO_sdn_id
@@ -370,6 +371,7 @@ class Lcm:
                 sdn_RO.pop("_admin", None)
                 sdn_RO.pop("schema_version", None)
                 sdn_RO.pop("schema_type", None)
+                sdn_RO.pop("description", None)
                 if sdn_RO:
                     desc = await RO.edit("sdn", RO_sdn_id, descriptor=sdn_RO)
                 db_sdn["_admin"]["operationalState"] = "ENABLED"