Feature 10922: Stop, start and rebuild
[osm/RO.git] / NG-RO / osm_ng_ro / validation.py
index 91ea613..2601e90 100644 (file)
@@ -107,10 +107,27 @@ deploy_schema = {
                 "vld": deploy_item_list,
             },
         },
+        "affinity-or-anti-affinity-group": deploy_item_list,
     },
     "additionalProperties": False,
 }
 
+rebuild_schema = {
+    "$schema": "http://json-schema.org/draft-04/schema#",
+    "vm_rebuild": {
+        "type": "array",
+        "items": {
+            "type": "object",
+            "properties": {
+                "vdu-id": id_schema,
+                "vim_name": name_schema,
+                "member-vnf-index": name_schema,
+            },
+        },
+        "additionalProperties": True,
+    },
+}
+
 
 class ValidationError(Exception):
     def __init__(self, message, http_code=HTTPStatus.UNPROCESSABLE_ENTITY):