summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/Vnf.java22
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java12
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionServiceTest.java6
3 files changed, 29 insertions, 11 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/Vnf.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/Vnf.java
index b958e9b2..ca3b9c11 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/Vnf.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/sdc/bean/Vnf.java
@@ -30,28 +30,30 @@ public class Vnf {
private String name;
- @JsonCreator
- public Vnf(
- @JsonProperty String uuid,
- @JsonProperty String invariantUUID,
- @JsonProperty String name) {
- this.uuid = uuid;
- this.invariantUUID = invariantUUID;
- this.name = name;
- }
-
public String getUuid() {
return uuid;
}
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
public String getInvariantUUID() {
return invariantUUID;
}
+ public void setInvariantUUID(String invariantUUID) {
+ this.invariantUUID = invariantUUID;
+ }
+
public String getName() {
return name;
}
+ public void setName(String name) {
+ this.name = name;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java
index 6e06e012..4b21ec90 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/so/SOService.java
@@ -24,12 +24,24 @@ import retrofit2.http.*;
public interface SOService {
+ @Headers({
+ "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
+ "Accept: application/json"
+ })
@POST("/api/e2eServiceInstances/v3")
Call<ServiceOperation> instantiateService(@Body RequestBody body);
+ @Headers({
+ "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
+ "Accept: application/json"
+ })
@GET("/api/e2eServiceInstances/v3/{serviceId}/operations/{operationId}")
Call<OperationProgressInformation> queryOperationProgress(@Path("serviceId") String serviceId, @Path("operationId") String operationId);
+ @Headers({
+ "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
+ "Accept: application/json"
+ })
@DELETE("/api/e2eServiceInstances/v3/{serviceId}")
Call<DeleteOperationRsp> terminateService(@Path("serviceId") String serviceId);
}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionServiceTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionServiceTest.java
index f7009b18..56a2377a 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionServiceTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultPackageDistributionServiceTest.java
@@ -49,7 +49,11 @@ public class DefaultPackageDistributionServiceTest {
@Test
public void itCanRetrievePackageFromSDCAndAAI() {
List<SDCServiceTemplate> serviceTemplate = Collections.singletonList(new SDCServiceTemplate("1", "1", "service", "V1","", ""));
- List<Vnf> vnf = Collections.singletonList(new Vnf("2","2","vnf"));
+ Vnf o = new Vnf();
+ o.setInvariantUUID("2");
+ o.setUuid("2");
+ o.setName("vnf");
+ List<Vnf> vnf = Collections.singletonList(o);
SDCCatalogService sdcService = newSDCService(serviceTemplate, vnf);
List<VimInfo> vim = Collections.singletonList(new VimInfo("owner", "regionId"));