ns_action,
ns_scale,
ns_update,
+ ns_heal,
nsi_instantiate,
ns_migrate,
)
"action": ns_action,
"update": ns_update,
"scale": ns_scale,
+ "heal": ns_heal,
"terminate": ns_terminate,
"migrate": ns_migrate,
}
"""
Check that user has enter right parameters for the operation
:param session: contains "username", "admin", "force", "public", "project_id", "set_project"
- :param operation: it can be: instantiate, terminate, action, update. TODO: heal
+ :param operation: it can be: instantiate, terminate, action, update, heal
:param indata: descriptor with the parameters of the operation
:return: None
"""
self._check_scale_ns_operation(indata, nsr)
elif operation == "update":
self._check_update_ns_operation(indata, nsr)
+ elif operation == "heal":
+ self._check_heal_ns_operation(indata, nsr)
elif operation == "instantiate":
self._check_instantiate_ns_operation(indata, nsr, session)
)
)
+ def _check_heal_ns_operation(self, indata, nsr):
+ return
+
def _check_instantiate_ns_operation(self, indata, nsr, session):
vnf_member_index_to_vnfd = {} # map between vnf_member_index to vnf descriptor.
vim_accounts = []
"required": ["primitive", "primitive_params"], # TODO add member_vnf_index
"additionalProperties": False,
}
+
ns_scale = { # TODO for the moment it is only VDU-scaling
"title": "ns scale input schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": False
}
+ns_heal = {
+ "title": "ns heal input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "lcmOperationType": string_schema,
+ "nsInstanceId": id_schema,
+ "timeout_ns_heal": integer1_schema,
+ "healVnfData": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "vnfInstanceId": id_schema,
+ "cause": description_schema,
+ "additionalParams": {
+ "type": "object",
+ "properties": {
+ "run-day1": bool_schema,
+ "vdu": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "run-day1": bool_schema,
+ "vdu-id": name_schema,
+ "count-index": integer0_schema,
+ },
+ "required": ["vdu-id"],
+ "additionalProperties": False,
+ },
+ },
+ },
+ "additionalProperties": False,
+ },
+ },
+ "required": ["vnfInstanceId"],
+ "additionalProperties": False,
+ },
+ },
+ },
+ "required": ["healVnfData"],
+ "additionalProperties": False,
+}
+
schema_version = {"type": "string", "enum": ["1.0"]}
schema_type = {"type": "string"}
vim_type = shortname_schema # {"enum": ["openstack", "openvim", "vmware", "opennebula", "aws", "azure", "fos"]}
"ns_action": ns_action,
"ns_scale": ns_scale,
"ns_update": ns_update,
+ "ns_heal": ns_heal,
"pdus": pdu_new_schema,
}