Fix Bug 2086 Updating VNF status configurable
[osm/RO.git] / NG-RO / osm_ng_ro / ro_main.py
index bd2ea9e..376c087 100644 (file)
@@ -143,6 +143,16 @@ valid_url_methods = {
                     },
                 },
             },
+            "verticalscale": {
+                "<ID>": {
+                    "METHODS": ("POST"),
+                    "ROLE_PERMISSION": "verticalscale:id:",
+                    "<ID>": {
+                        "METHODS": ("GET",),
+                        "ROLE_PERMISSION": "verticalscale:id:id:",
+                    },
+                },
+            },
         }
     },
 }
@@ -200,6 +210,7 @@ class Server(object):
             "recreate:id:post": self.ns.recreate,
             "recreate:id:id:get": self.ns.recreate_status,
             "migrate:id:post": self.ns.migrate,
+            "verticalscale:id:post": self.ns.verticalscale,
         }
 
     def _format_in(self, kwargs):
@@ -843,7 +854,7 @@ def _start_service():
             elif k1 == "tools":
                 # update [/] configuration
                 engine_config["/"]["tools." + k2.replace("_", ".")] = yaml.safe_load(v)
-            elif k1 in ("message", "database", "storage", "authentication"):
+            elif k1 in ("message", "database", "storage", "authentication", "period"):
                 engine_config[k1][k2] = yaml.safe_load(v)
 
         except Exception as e: