summaryrefslogtreecommitdiffstats
path: root/lcm/provider/src
diff options
context:
space:
mode:
Diffstat (limited to 'lcm/provider/src')
-rw-r--r--lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java24
-rw-r--r--lcm/provider/src/test/java/org/onap/ccsdk/sli/northbound/TestLcmProvider.java34
-rw-r--r--lcm/provider/src/test/resources/graphs/lcm/LCM_activate-n-e-sw.xml (renamed from lcm/provider/src/test/resources/graphs/lcm/LCM_activate-ne-sw.xml)2
-rw-r--r--lcm/provider/src/test/resources/graphs/lcm/LCM_download-n-e-sw.xml (renamed from lcm/provider/src/test/resources/graphs/lcm/LCM_download-ne-sw.xml)2
-rw-r--r--lcm/provider/src/test/resources/graphs/lcm/graph.versions4
5 files changed, 34 insertions, 32 deletions
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 6fd494360..100496e39 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,12 +761,12 @@ public class LcmProvider implements AutoCloseable, LCMService {
}
@Override
- public ListenableFuture<RpcResult<DownloadNeSwOutput>> downloadNeSw(DownloadNeSwInput input) {
- DownloadNeSwInputBuilder iBuilder = new DownloadNeSwInputBuilder(input);
- DownloadNeSwOutputBuilder oBuilder = new DownloadNeSwOutputBuilder();
+ 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());
+ CommonLcmFields retval = callDG("download-n-e-sw", iBuilder.build());
oBuilder.setStatus(retval.getStatusBuilder().build());
oBuilder.setCommonHeader(retval.getCommonHeaderBuilder().build());
if (retval.getPayload() != null) {
@@ -778,19 +778,19 @@ public class LcmProvider implements AutoCloseable, LCMService {
oBuilder.setStatus(e.getStatus());
}
- RpcResult<DownloadNeSwOutput> rpcResult =
- RpcResultBuilder.<DownloadNeSwOutput> status(true).withResult(oBuilder.build()).build();
+ 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();
+ 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());
+ CommonLcmFields retval = callDG("activate-n-e-sw", iBuilder.build());
oBuilder.setStatus(retval.getStatusBuilder().build());
oBuilder.setCommonHeader(retval.getCommonHeaderBuilder().build());
if (retval.getPayload() != null) {
@@ -802,8 +802,8 @@ public class LcmProvider implements AutoCloseable, LCMService {
oBuilder.setStatus(e.getStatus());
}
- RpcResult<ActivateNeSwOutput> rpcResult =
- RpcResultBuilder.<ActivateNeSwOutput> status(true).withResult(oBuilder.build()).build();
+ RpcResult<ActivateNESwOutput> rpcResult =
+ RpcResultBuilder.<ActivateNESwOutput> status(true).withResult(oBuilder.build()).build();
// return error
return Futures.immediateFuture(rpcResult);
}
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 e0d8e577e..a7e1e1f2e 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,10 +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.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;
@@ -1155,8 +1155,8 @@ public class TestLcmProvider {
}
@Test
- public void testDownloadNeSw() {
- DownloadNeSwInputBuilder builder = new DownloadNeSwInputBuilder();
+ public void testDownloadNESw() {
+ DownloadNESwInputBuilder builder = new DownloadNESwInputBuilder();
CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder();
hdrBuilder.setApiVer("1");
@@ -1171,26 +1171,27 @@ public class TestLcmProvider {
aBuilder.setVfModuleId("vf-module-1");
aBuilder.setVnfcName("my-vnfc");
aBuilder.setVnfId("123");
+ aBuilder.setPnfId("456");
aBuilder.setVserverId("123");
builder.setActionIdentifiers(aBuilder.build());
- builder.setAction(Action.DownloadNeSw);
+ 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());
+ 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");
+ fail("DownloadNESw threw exception");
}
}
@Test
- public void testActivateNeSw() {
- ActivateNeSwInputBuilder builder = new ActivateNeSwInputBuilder();
+ public void testActivateNESw() {
+ ActivateNESwInputBuilder builder = new ActivateNESwInputBuilder();
CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder();
hdrBuilder.setApiVer("1");
@@ -1205,20 +1206,21 @@ public class TestLcmProvider {
aBuilder.setVfModuleId("vf-module-1");
aBuilder.setVnfcName("my-vnfc");
aBuilder.setVnfId("123");
+ aBuilder.setPnfId("456");
aBuilder.setVserverId("123");
builder.setActionIdentifiers(aBuilder.build());
- builder.setAction(Action.ActivateNeSw);
+ 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());
+ 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");
+ fail("ActivateNESw threw exception");
}
}
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-n-e-sw.xml
index 99f74b6e9..44343dd5f 100644
--- a/lcm/provider/src/test/resources/graphs/lcm/LCM_activate-ne-sw.xml
+++ b/lcm/provider/src/test/resources/graphs/lcm/LCM_activate-n-e-sw.xml
@@ -21,7 +21,7 @@
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'>
+ <method rpc='activate-n-e-sw' mode='sync'>
<set>
<parameter name='status.code' value='400' />
<parameter name='status.message' value='SUCCESS' />
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-n-e-sw.xml
index fd586cce5..6bb0e765c 100644
--- a/lcm/provider/src/test/resources/graphs/lcm/LCM_download-ne-sw.xml
+++ b/lcm/provider/src/test/resources/graphs/lcm/LCM_download-n-e-sw.xml
@@ -21,7 +21,7 @@
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'>
+ <method rpc='download-n-e-sw' mode='sync'>
<set>
<parameter name='status.code' value='400' />
<parameter name='status.message' value='SUCCESS' />
diff --git a/lcm/provider/src/test/resources/graphs/lcm/graph.versions b/lcm/provider/src/test/resources/graphs/lcm/graph.versions
index 466be55b6..420bcf619 100644
--- a/lcm/provider/src/test/resources/graphs/lcm/graph.versions
+++ b/lcm/provider/src/test/resources/graphs/lcm/graph.versions
@@ -30,8 +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 download-n-e-sw 1.0.0 sync
+LCM activate-n-e-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