X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FRO.git;a=blobdiff_plain;f=NG-RO%2Fosm_ng_ro%2Fro_main.py;h=bd2ea9e029a434cea0049fa125c460e06b3e1d19;hp=eb5ff6c8d5e27a0a958c4d29f9e1e12e3e4c92ed;hb=78f474e69fde9d64e8716978b5ea38f9f5aace48;hpb=049cbb1b256805f589c24776dcf092c77fefec6a diff --git a/NG-RO/osm_ng_ro/ro_main.py b/NG-RO/osm_ng_ro/ro_main.py index eb5ff6c8..bd2ea9e0 100644 --- a/NG-RO/osm_ng_ro/ro_main.py +++ b/NG-RO/osm_ng_ro/ro_main.py @@ -83,6 +83,30 @@ valid_url_methods = { }, "ns": { "v1": { + "rebuild": { + "METHODS": ("POST",), + "ROLE_PERMISSION": "rebuild:", + "": { + "METHODS": ("POST",), + "ROLE_PERMISSION": "rebuild:id:", + }, + }, + "start": { + "METHODS": ("POST",), + "ROLE_PERMISSION": "start:", + "": { + "METHODS": ("POST",), + "ROLE_PERMISSION": "start:id:", + }, + }, + "stop": { + "METHODS": ("POST",), + "ROLE_PERMISSION": "stop:", + "": { + "METHODS": ("POST",), + "ROLE_PERMISSION": "stop:id:", + }, + }, "deploy": { "METHODS": ("GET",), "ROLE_PERMISSION": "deploy:", @@ -99,6 +123,26 @@ valid_url_methods = { }, }, }, + "recreate": { + "": { + "METHODS": ("POST"), + "ROLE_PERMISSION": "recreate:id:", + "": { + "METHODS": ("GET",), + "ROLE_PERMISSION": "recreate:id:id:", + }, + }, + }, + "migrate": { + "": { + "METHODS": ("POST"), + "ROLE_PERMISSION": "migrate:id:", + "": { + "METHODS": ("GET",), + "ROLE_PERMISSION": "migrate:id:id:", + }, + }, + }, } }, } @@ -150,6 +194,12 @@ class Server(object): "deploy:id:delete": self.ns.delete, "deploy:id:id:get": self.ns.status, "deploy:id:id:cancel:post": self.ns.cancel, + "rebuild:id:post": self.ns.rebuild_start_stop, + "start:id:post": self.ns.rebuild_start_stop, + "stop:id:post": self.ns.rebuild_start_stop, + "recreate:id:post": self.ns.recreate, + "recreate:id:id:get": self.ns.recreate_status, + "migrate:id:post": self.ns.migrate, } def _format_in(self, kwargs):