diff options
32 files changed, 563 insertions, 273 deletions
diff --git a/.gitignore b/.gitignore index d66d73564..7943e8332 100755 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,6 @@ yang-gen-sal/ sdnc-northbound_bdio.jsonld blackDuckHubProjectName.txt blackDuckHubProjectVersionName.txt + +# Generated dependencies list +direct-dependencies.txt diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml deleted file mode 100644 index 571175b92..000000000 --- a/asdcApi/features/features-asdcApi/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>feature-repo-parent</artifactId> - <version>1.5.1-SNAPSHOT</version> - <relativePath/> - </parent> - - <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>features-asdcApi</artifactId> - <version>0.7.0-SNAPSHOT</version> - <packaging>feature</packaging> - - <name>ccsdk-sli-northbound :: asdcApi :: ${project.artifactId}</name> - - <properties> - <ccsdk.sli.northbound.version>${project.version}</ccsdk.sli.northbound.version> - </properties> - - <dependencies> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>ccsdk-asdcApi</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - </dependency> - - </dependencies> -</project> diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml deleted file mode 100755 index 36d0245b3..000000000 --- a/asdcApi/features/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>odlparent-lite</artifactId> - <version>1.5.1-SNAPSHOT</version> - </parent> - - <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>asdcApi-features</artifactId> - <version>0.7.0-SNAPSHOT</version> - <packaging>pom</packaging> - - <name>ccsdk-sli-northbound :: asdcApi :: ${project.artifactId}</name> - - <modules> - <module>ccsdk-asdcApi</module> - <module>features-asdcApi</module> - </modules> -</project> diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 93ddb55f5..cad3fb8b3 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -25,19 +25,6 @@ <dependencies> - <dependency> - <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>${application.name}</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>org.onap.ccsdk.sli.northbound</groupId> <artifactId>asdcApi-model</artifactId> diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index 6dcaf5cc6..baac617c2 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -22,7 +22,6 @@ <modules> <module>model</module> - <module>features</module> <module>provider</module> <module>installer</module> </modules> diff --git a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml b/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml deleted file mode 100644 index 3a9d260c7..000000000 --- a/daexim-offsite-backup/features/features-daexim-offsite-backup/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>feature-repo-parent</artifactId> - <version>1.5.1-SNAPSHOT</version> - <relativePath/> - </parent> - - <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>features-daexim-offsite-backup</artifactId> - <version>0.7.0-SNAPSHOT</version> - <packaging>feature</packaging> - - <name>ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId}</name> - - <dependencies> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>ccsdk-daexim-offsite-backup</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - </dependency> - </dependencies> -</project> diff --git a/daexim-offsite-backup/features/pom.xml b/daexim-offsite-backup/features/pom.xml deleted file mode 100755 index 9152cf598..000000000 --- a/daexim-offsite-backup/features/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>odlparent-lite</artifactId> - <version>1.5.1-SNAPSHOT</version> - </parent> - - <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>daexim-offsite-backup-features</artifactId> - <version>0.7.0-SNAPSHOT</version> - <packaging>pom</packaging> - - <name>ccsdk-sli-northbound :: daexim-offsite-backup :: ${project.artifactId}</name> - - <modules> - <module>ccsdk-daexim-offsite-backup</module> - <module>features-daexim-offsite-backup</module> - </modules> -</project> diff --git a/daexim-offsite-backup/installer/pom.xml b/daexim-offsite-backup/installer/pom.xml index 3e36f56ed..dae4a4fd3 100755 --- a/daexim-offsite-backup/installer/pom.xml +++ b/daexim-offsite-backup/installer/pom.xml @@ -22,19 +22,6 @@ <dependencies> <dependency> <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>${application.name}</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.northbound</groupId> <artifactId>daexim-offsite-backup-provider</artifactId> <version>${project.version}</version> </dependency> diff --git a/daexim-offsite-backup/pom.xml b/daexim-offsite-backup/pom.xml index 3af575352..65cf987d9 100755 --- a/daexim-offsite-backup/pom.xml +++ b/daexim-offsite-backup/pom.xml @@ -20,7 +20,6 @@ <modules> <module>model</module> <module>provider</module> - <module>features</module> <module>installer</module> </modules> diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml deleted file mode 100644 index 9a34429ca..000000000 --- a/dataChange/features/features-dataChange/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>feature-repo-parent</artifactId> - <version>1.5.1-SNAPSHOT</version> - <relativePath/> - </parent> - - <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>features-dataChange</artifactId> - <version>0.7.0-SNAPSHOT</version> - <packaging>feature</packaging> - - <name>ccsdk-sli-northbound :: dataChange :: ${project.artifactId}</name> - - <properties> - <ccsdk.sli.northbound.version>${project.version}</ccsdk.sli.northbound.version> - </properties> - - <dependencies> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>ccsdk-dataChange</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - </dependency> - - </dependencies> -</project> diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml deleted file mode 100755 index f16ed6951..000000000 --- a/dataChange/features/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>odlparent-lite</artifactId> - <version>1.5.1-SNAPSHOT</version> - <relativePath/> - </parent> - - <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>dataChange-features</artifactId> - <version>0.7.0-SNAPSHOT</version> - <packaging>pom</packaging> - - <name>ccsdk-sli-northbound :: dataChange :: ${project.artifactId}</name> - - <modules> - <module>ccsdk-dataChange</module> - <module>features-dataChange</module> - </modules> -</project> diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index abd4cc8bd..7516f0b56 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -27,19 +27,6 @@ <dependency> <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>${application.name}</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.northbound</groupId> <artifactId>dataChange-model</artifactId> <version>${project.version}</version> </dependency> diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 617f6b36a..75637886d 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -18,7 +18,6 @@ <modules> <module>model</module> - <module>features</module> <module>provider</module> <module>installer</module> </modules> diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/features/ccsdk-asdcApi/pom.xml index 35e2a54b6..35e2a54b6 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/features/ccsdk-asdcApi/pom.xml diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml b/features/ccsdk-daexim-offsite-backup/pom.xml index bdf789fa1..bdf789fa1 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/pom.xml +++ b/features/ccsdk-daexim-offsite-backup/pom.xml diff --git a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/src/main/feature/feature.xml b/features/ccsdk-daexim-offsite-backup/src/main/feature/feature.xml index 3dcb9002c..3dcb9002c 100644 --- a/daexim-offsite-backup/features/ccsdk-daexim-offsite-backup/src/main/feature/feature.xml +++ b/features/ccsdk-daexim-offsite-backup/src/main/feature/feature.xml diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/features/ccsdk-dataChange/pom.xml index 6621ee9c1..6621ee9c1 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/features/ccsdk-dataChange/pom.xml diff --git a/lcm/features/ccsdk-lcm/pom.xml b/features/ccsdk-lcm/pom.xml index 69ea1f2e9..69ea1f2e9 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/features/ccsdk-lcm/pom.xml diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 49196e71d..b9ad99f17 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -24,6 +24,59 @@ </properties> <dependencies> + <dependency> + <groupId>org.onap.ccsdk.sli.northbound</groupId> + <artifactId>ccsdk-asdcApi</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.northbound</groupId> + <artifactId>ccsdk-daexim-offsite-backup</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.northbound</groupId> + <artifactId>ccsdk-dataChange</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.northbound</groupId> + <artifactId>ccsdk-lcm</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> <groupId>org.onap.ccsdk.sli.northbound</groupId> diff --git a/features/pom.xml b/features/pom.xml index 560f3a0f4..4f3c2ae17 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -17,6 +17,10 @@ <name>ccsdk-sli-northbound :: features</name> <modules> + <module>ccsdk-asdcApi</module> + <module>ccsdk-daexim-offsite-backup</module> + <module>ccsdk-dataChange</module> + <module>ccsdk-lcm</module> <module>ccsdk-sli-northbound-all</module> <module>features-sli-northbound</module> <module>installer</module> diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml deleted file mode 100644 index 600ed4305..000000000 --- a/lcm/features/features-lcm/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>feature-repo-parent</artifactId> - <version>1.5.1-SNAPSHOT</version> - <relativePath/> - </parent> - - <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>features-lcm</artifactId> - <version>0.7.0-SNAPSHOT</version> - <packaging>feature</packaging> - - <name>ccsdk-sli-northbound :: lcm :: ${project.artifactId}</name> - - <properties> - <ccsdk.sli.northbound.version>${project.version}</ccsdk.sli.northbound.version> - </properties> - - <dependencies> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>ccsdk-lcm</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - </dependency> - - </dependencies> -</project> diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml deleted file mode 100755 index ac0258b71..000000000 --- a/lcm/features/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>odlparent-lite</artifactId> - <version>1.5.1-SNAPSHOT</version> - </parent> - - <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>lcm-features</artifactId> - <version>0.7.0-SNAPSHOT</version> - <packaging>pom</packaging> - - <name>ccsdk-sli-northbound :: lcm :: ${project.artifactId}</name> - - <modules> - <module>ccsdk-lcm</module> - <module>features-lcm</module> - </modules> -</project> diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index b7aa65f79..38b4f84b0 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -27,19 +27,6 @@ <dependency> <groupId>org.onap.ccsdk.sli.northbound</groupId> - <artifactId>${application.name}</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.northbound</groupId> <artifactId>lcm-model</artifactId> <version>${project.version}</version> </dependency> 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; + } + } } @@ -592,6 +600,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 **********************************************************************************/ rpc upgrade-post-check { diff --git a/lcm/pom.xml b/lcm/pom.xml index 555900372..4f19f8cdd 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -18,7 +18,6 @@ <modules> <module>model</module> - <module>features</module> <module>provider</module> <module>installer</module> </modules> diff --git a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java index 0074dfc65..6fd494360 100644 --- a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java +++ b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java @@ -761,6 +761,54 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override + public ListenableFuture<RpcResult<DownloadNeSwOutput>> downloadNeSw(DownloadNeSwInput input) { + DownloadNeSwInputBuilder iBuilder = new DownloadNeSwInputBuilder(input); + DownloadNeSwOutputBuilder oBuilder = new DownloadNeSwOutputBuilder(); + + try { + CommonLcmFields retval = callDG("download-ne-sw", iBuilder.build()); + oBuilder.setStatus(retval.getStatusBuilder().build()); + oBuilder.setCommonHeader(retval.getCommonHeaderBuilder().build()); + if (retval.getPayload() != null) { + oBuilder.setPayload(retval.getPayload()); + } + } catch (LcmRpcInvocationException e) { + LOG.debug(exceptionMessage, e); + oBuilder.setCommonHeader(e.getCommonHeader()); + oBuilder.setStatus(e.getStatus()); + } + + RpcResult<DownloadNeSwOutput> rpcResult = + RpcResultBuilder.<DownloadNeSwOutput> status(true).withResult(oBuilder.build()).build(); + // return error + return Futures.immediateFuture(rpcResult); + } + + @Override + public ListenableFuture<RpcResult<ActivateNeSwOutput>> activateNeSw(ActivateNeSwInput input) { + ActivateNeSwInputBuilder iBuilder = new ActivateNeSwInputBuilder(input); + ActivateNeSwOutputBuilder oBuilder = new ActivateNeSwOutputBuilder(); + + try { + CommonLcmFields retval = callDG("activate-ne-sw", iBuilder.build()); + oBuilder.setStatus(retval.getStatusBuilder().build()); + oBuilder.setCommonHeader(retval.getCommonHeaderBuilder().build()); + if (retval.getPayload() != null) { + oBuilder.setPayload(retval.getPayload()); + } + } catch (LcmRpcInvocationException e) { + LOG.debug(exceptionMessage, e); + oBuilder.setCommonHeader(e.getCommonHeader()); + oBuilder.setStatus(e.getStatus()); + } + + RpcResult<ActivateNeSwOutput> rpcResult = + RpcResultBuilder.<ActivateNeSwOutput> status(true).withResult(oBuilder.build()).build(); + // return error + return Futures.immediateFuture(rpcResult); + } + + @Override public ListenableFuture<RpcResult<StopOutput>> stop(StopInput input) { StopInputBuilder iBuilder = new StopInputBuilder(input); StopOutputBuilder oBuilder = new StopOutputBuilder(); diff --git a/lcm/provider/src/test/java/org/onap/ccsdk/sli/northbound/TestLcmProvider.java b/lcm/provider/src/test/java/org/onap/ccsdk/sli/northbound/TestLcmProvider.java index 8e82ccadf..e0d8e577e 100644 --- a/lcm/provider/src/test/java/org/onap/ccsdk/sli/northbound/TestLcmProvider.java +++ b/lcm/provider/src/test/java/org/onap/ccsdk/sli/northbound/TestLcmProvider.java @@ -106,6 +106,10 @@ import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329. import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.UpgradePreCheckOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.UpgradeSoftwareInputBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.UpgradeSoftwareOutput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.DownloadNeSwInputBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.DownloadNeSwOutput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ActivateNeSwInputBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ActivateNeSwOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ZULU; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.action.identifiers.ActionIdentifiersBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.common.header.CommonHeaderBuilder; @@ -1151,6 +1155,74 @@ public class TestLcmProvider { } @Test + public void testDownloadNeSw() { + DownloadNeSwInputBuilder builder = new DownloadNeSwInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + ActionIdentifiersBuilder aBuilder = new ActionIdentifiersBuilder(); + aBuilder.setServiceInstanceId("SVCID-123"); + aBuilder.setVfModuleId("vf-module-1"); + aBuilder.setVnfcName("my-vnfc"); + aBuilder.setVnfId("123"); + aBuilder.setVserverId("123"); + builder.setActionIdentifiers(aBuilder.build()); + + builder.setAction(Action.DownloadNeSw); + builder.setPayload(mock(Payload.class)); + + + try { + DownloadNeSwOutput results = provider.downloadNeSw(builder.build()).get().getResult(); + LOG.info("DownloadNeSw returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); + assert(results.getStatus().getCode() == 400); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("DownloadNeSw threw exception"); + } + } + + @Test + public void testActivateNeSw() { + ActivateNeSwInputBuilder builder = new ActivateNeSwInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + ActionIdentifiersBuilder aBuilder = new ActionIdentifiersBuilder(); + aBuilder.setServiceInstanceId("SVCID-123"); + aBuilder.setVfModuleId("vf-module-1"); + aBuilder.setVnfcName("my-vnfc"); + aBuilder.setVnfId("123"); + aBuilder.setVserverId("123"); + builder.setActionIdentifiers(aBuilder.build()); + + builder.setAction(Action.ActivateNeSw); + builder.setPayload(mock(Payload.class)); + + + try { + ActivateNeSwOutput results = provider.activateNeSw(builder.build()).get().getResult(); + LOG.info("ActivateNeSw returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); + assert(results.getStatus().getCode() == 400); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("ActivateNeSw threw exception"); + } + } + + @Test public void testStop() { StopInputBuilder builder = new StopInputBuilder(); diff --git a/lcm/provider/src/test/resources/graphs/lcm/LCM_activate-ne-sw.xml b/lcm/provider/src/test/resources/graphs/lcm/LCM_activate-ne-sw.xml new file mode 100644 index 000000000..99f74b6e9 --- /dev/null +++ b/lcm/provider/src/test/resources/graphs/lcm/LCM_activate-ne-sw.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='LCM' version='1.0.0'> + <method rpc='activate-ne-sw' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/lcm/provider/src/test/resources/graphs/lcm/LCM_download-ne-sw.xml b/lcm/provider/src/test/resources/graphs/lcm/LCM_download-ne-sw.xml new file mode 100644 index 000000000..fd586cce5 --- /dev/null +++ b/lcm/provider/src/test/resources/graphs/lcm/LCM_download-ne-sw.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights + reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='LCM' version='1.0.0'> + <method rpc='download-ne-sw' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/lcm/provider/src/test/resources/graphs/lcm/graph.versions b/lcm/provider/src/test/resources/graphs/lcm/graph.versions index 233aa459f..466be55b6 100644 --- a/lcm/provider/src/test/resources/graphs/lcm/graph.versions +++ b/lcm/provider/src/test/resources/graphs/lcm/graph.versions @@ -30,6 +30,8 @@ LCM resume-traffic 1.0.0 sync LCM distribute-traffic 1.0.0 sync LCM upgrade-pre-check 1.0.0 sync LCM upgrade-software 1.0.0 sync +LCM download-ne-sw 1.0.0 sync +LCM activate-ne-sw 1.0.0 sync LCM upgrade-post-check 1.0.0 sync LCM upgrade-backup 1.0.0 sync LCM upgrade-backout 1.0.0 sync @@ -76,7 +76,49 @@ </build> </profile> - + <profile> + <id>dependency-list</id> + <build> + <plugins> + <plugin> + <groupId>com.github.ferstl</groupId> + <artifactId>depgraph-maven-plugin</artifactId> + <executions> + <execution> + <phase>validate</phase> + <inherited>false</inherited> + <goals> + <goal>aggregate</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>attach-artifacts</id> + <phase>package</phase> + <inherited>false</inherited> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>${dependency-list.file}</file> + <type>txt</type> + <classifier>dependencies</classifier> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> </profiles> <build> |