From 1ee69b1f0a3fde8d77393f541b12ff6daee11600 Mon Sep 17 00:00:00 2001 From: Enbo Wang Date: Wed, 4 Dec 2019 21:14:48 +0800 Subject: Add LCM APIs for DownloadNeSw and ActivateNeSw actions Add two LCM APIs of DownloadNeSw and ActivateNeSw for PNF Software Upgrade. Change-Id: I5a8f143c2d7d54fd96772eeb1d31b2d2e8bfb523 Issue-ID: SDNC-856 Signed-off-by: Enbo Wang --- lcm/model/src/main/resources/lcm.20180329.json | 216 +++++++++++++++++++++++++ lcm/model/src/main/yang/lcm.yang | 62 +++++++ 2 files changed, 278 insertions(+) (limited to 'lcm/model') diff --git a/lcm/model/src/main/resources/lcm.20180329.json b/lcm/model/src/main/resources/lcm.20180329.json index 291e18fb1..2e9eabe6f 100644 --- a/lcm/model/src/main/resources/lcm.20180329.json +++ b/lcm/model/src/main/resources/lcm.20180329.json @@ -1252,6 +1252,70 @@ "description": "An operation to upgrade the target VNF to a new version and expected that the VNF is in a quiesced status .", "operationId": "upgrade-software" } + }, + "/operations/LCM:download-ne-sw": { + "post": { + "consumes": [ + "application/json", + "application/xml" + ], + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "required": false, + "schema": { + "$ref": "#/definitions/(download-ne-sw)input-TOP" + } + } + ], + "responses": { + "200": { + "description": "No response was specified", + "schema": { + "$ref": "#/definitions/(download-ne-sw)output-TOP" + } + } + }, + "description": "An operation to download NE software.", + "operationId": "download-ne-sw" + } + }, + "/operations/LCM:activate-ne-sw": { + "post": { + "consumes": [ + "application/json", + "application/xml" + ], + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "required": false, + "schema": { + "$ref": "#/definitions/(activate-ne-sw)input-TOP" + } + } + ], + "responses": { + "200": { + "description": "No response was specified", + "schema": { + "$ref": "#/definitions/(activate-ne-sw)output-TOP" + } + } + }, + "description": "An operation to activate NE software.", + "operationId": "activate-ne-sw" + } } }, "definitions": { @@ -4116,6 +4180,158 @@ }, "type": "object" }, + "(download-ne-sw)input": { + "properties": { + "LCM:action": { + "$ref": "#/definitions/Optional.empty" + }, + "LCM:action-identifiers": { + "description": "A block containing the action arguments. These are used to specify\\nthe object upon which APP-C LCM command is to operate", + "items": { + "$ref": "#/definitions/LCM(config)action-identifiers" + }, + "type": "object" + }, + "LCM:common-header": { + "description": "A common header for all APP-C requests", + "items": { + "$ref": "#/definitions/LCM(config)common-header" + }, + "type": "object" + }, + "LCM:payload": { + "$ref": "#/definitions/Optional.empty" + } + }, + "required": [ + "LCM:action", + "LCM:payload" + ], + "type": "object" + }, + "(download-ne-sw)input-TOP": { + "properties": { + "LCM:input": { + "items": { + "$ref": "#/definitions/(download-ne-sw)input" + }, + "type": "object" + } + }, + "type": "object" + }, + "(download-ne-sw)output": { + "properties": { + "LCM:common-header": { + "description": "A common header for all APP-C requests", + "items": { + "$ref": "#/definitions/LCM(config)common-header" + }, + "type": "object" + }, + "LCM:payload": { + "$ref": "#/definitions/Optional.empty" + }, + "LCM:status": { + "description": "The specific response codes are to be aligned with SDC reference doc\\n(main table removed to avoid duplication and digression from main table).\\nSee SDC and ECOMP Distribution Consumer Interface Agreement", + "items": { + "$ref": "#/definitions/LCM(config)status" + }, + "type": "object" + } + }, + "required": [ + "LCM:payload" + ], + "type": "object" + }, + "(download-ne-sw)output-TOP": { + "properties": { + "LCM:output": { + "items": { + "$ref": "#/definitions/(download-ne-sw)output" + }, + "type": "object" + } + }, + "type": "object" + }, + "(activate-ne-sw)input": { + "properties": { + "LCM:action": { + "$ref": "#/definitions/Optional.empty" + }, + "LCM:action-identifiers": { + "description": "A block containing the action arguments. These are used to specify\\nthe object upon which APP-C LCM command is to operate", + "items": { + "$ref": "#/definitions/LCM(config)action-identifiers" + }, + "type": "object" + }, + "LCM:common-header": { + "description": "A common header for all APP-C requests", + "items": { + "$ref": "#/definitions/LCM(config)common-header" + }, + "type": "object" + }, + "LCM:payload": { + "$ref": "#/definitions/Optional.empty" + } + }, + "required": [ + "LCM:action", + "LCM:payload" + ], + "type": "object" + }, + "(activate-ne-sw)input-TOP": { + "properties": { + "LCM:input": { + "items": { + "$ref": "#/definitions/(activate-ne-sw)input" + }, + "type": "object" + } + }, + "type": "object" + }, + "(activate-ne-sw)output": { + "properties": { + "LCM:common-header": { + "description": "A common header for all APP-C requests", + "items": { + "$ref": "#/definitions/LCM(config)common-header" + }, + "type": "object" + }, + "LCM:payload": { + "$ref": "#/definitions/Optional.empty" + }, + "LCM:status": { + "description": "The specific response codes are to be aligned with SDC reference doc\\n(main table removed to avoid duplication and digression from main table).\\nSee SDC and ECOMP Distribution Consumer Interface Agreement", + "items": { + "$ref": "#/definitions/LCM(config)status" + }, + "type": "object" + } + }, + "required": [ + "LCM:payload" + ], + "type": "object" + }, + "(activate-ne-sw)output-TOP": { + "properties": { + "LCM:output": { + "items": { + "$ref": "#/definitions/(activate-ne-sw)output" + }, + "type": "object" + } + }, + "type": "object" + }, "LCM(config)action-identifiers": { "properties": { "LCM:service-instance-id": { diff --git a/lcm/model/src/main/yang/lcm.yang b/lcm/model/src/main/yang/lcm.yang index cbb772fb0..55af1159d 100644 --- a/lcm/model/src/main/yang/lcm.yang +++ b/lcm/model/src/main/yang/lcm.yang @@ -114,6 +114,8 @@ module LCM { enum "DistributeTraffic"; enum "UpgradePreCheck"; enum "UpgradeSoftware"; + enum "DownloadNeSw"; + enum "ActivateNeSw"; enum "UpgradePostCheck"; enum "UpgradeBackup"; enum "UpgradeBackout"; @@ -311,6 +313,12 @@ module LCM { type string; mandatory false; } + leaf pnf-id { + description "identifies the PNF to which this action is to be applied."; + type string; + mandatory false; + } + } } @@ -591,6 +599,60 @@ module LCM { } } + /********************************************************************************** + * Define the downloadNeSw operation + **********************************************************************************/ + rpc download-ne-sw { + description "An operation to download NE software"; + input { + uses common-header; + leaf action { + type action; + mandatory true; + } + uses action-identifiers; + leaf payload { + type payload; + mandatory true; + } + } + output { + uses common-header; + uses status; + leaf payload { + type payload; + mandatory true; + } + } + } + + /********************************************************************************** + * Define the activateNeSw operation + **********************************************************************************/ + rpc activate-ne-sw { + description "An operation to activate NE software"; + input { + uses common-header; + leaf action { + type action; + mandatory true; + } + uses action-identifiers; + leaf payload { + type payload; + mandatory true; + } + } + output { + uses common-header; + uses status; + leaf payload { + type payload; + mandatory true; + } + } + } + /********************************************************************************** * Define the VNF UpgradePostCheck service **********************************************************************************/ -- cgit 1.2.3-korg