Merge commit 'refs/changes/29/5829/2' of https://osm.etsi.org/gerrit/osm/RO into lcm 30/5830/1
authorAdam Israel <adam.israel@canonical.com>
Wed, 31 Jan 2018 23:41:57 +0000 (18:41 -0500)
committerAdam Israel <adam.israel@canonical.com>
Wed, 31 Jan 2018 23:41:57 +0000 (18:41 -0500)
lcm/dbbase.py [new file with mode: 0644]
lcm/lcm.py

diff --git a/lcm/dbbase.py b/lcm/dbbase.py
new file mode 100644 (file)
index 0000000..55041b6
--- /dev/null
@@ -0,0 +1,35 @@
+
+
+class DbException(Exception):
+
+    def __init__(self, message, http_code=404):
+        self.http_code = http_code
+        Exception.__init__(self, message)
+
+class dbbase(object):
+
+    def __init__(self):
+        pass
+
+    def db_connect(self, config):
+        pass
+
+    def db_disconnect(self):
+        pass
+
+    def get_list(self, table, filter={}):
+        pass
+
+    def get_one(self, table, filter={}, fail_on_empty=True, fail_on_more=True):
+        pass
+
+    def create(self, table, indata):
+        pass
+
+    def del_list(self, table, filter={}):
+        pass
+
+    def del_one(self, table, filter={}, fail_on_empty=True):
+        pass
+
+
index 2d292ba..d183963 100644 (file)
@@ -39,6 +39,7 @@ db = dbmemory.dbmemory()
 class RO_Exception(Exception):
     pass
 
+
 async def CreateNS(loop, nsr_id):
     logger.debug("CreateNS task nsr_id={} Enter".format(nsr_id))
     nsr_lcm = {
@@ -154,9 +155,14 @@ async def CreateNS(loop, nsr_id):
                 base_folder = vnfd["_admin"]["storage"]
                 path = base_folder + "/charms/" + proxy_charm
                 mgmt_ip = nsr_lcm['nsr_ip'][vnfd_index]
+<<<<<<< HEAD
                 # task = asyncio.ensure_future(DeployCharm(loop, path, mgmt_ip, config_primitive))
                 pass
                 # TODO launch VCA charm
+=======
+                # TODO launch VCA charm
+                # task = asyncio.ensure_future(DeployCharm(loop, path, mgmt_ip, config_primitive))
+>>>>>>> 6ce7cc879dda3b729b10d563bd26df613dc9f70f
         nsr_lcm["status"] = "DONE"
         db.replace("nsr_lcm", {"id": nsr_id}, nsr_lcm)
 
@@ -178,7 +184,11 @@ async def DestroyNS(loop, nsr_id):
     nsr_lcm["status"] = "DELETING"
     nsr_lcm["status_detailed"] = "Deleting charms"
     db.replace("nsr_lcm", {"id": nsr_id}, nsr_lcm)
+<<<<<<< HEAD
     # TODO destroy charms
+=======
+    # TODO destroy VCA charm
+>>>>>>> 6ce7cc879dda3b729b10d563bd26df613dc9f70f
 
     # remove from RO
     RO = ROclient.ROClient(loop, endpoint_url=ro_account["url"], tenant=ro_account["tenant"],
@@ -378,6 +388,3 @@ if __name__ == '__main__':
     db.create("ns_request", ns_request)
     # lcm2()
     lcm()
-
-
-