summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorNiamh Core <niamh.core@est.tech>2021-08-30 14:24:33 +0000
committerGerrit Code Review <gerrit@onap.org>2021-08-30 14:24:33 +0000
commit73d38f489970c344a859863f728cf93bc198aff7 (patch)
tree9b68be8d3634230327df5900ce60a0eac1f3c259 /src/main/java
parent776c1451ddb2eb676520f8d34103b9c889a4ea26 (diff)
parent11e9f72aa953516053d867e09a0e95c77d7d1a88 (diff)
Merge "fix getforentity in onap DMI plugin"
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemas.java2
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/service/client/SdncRestconfClient.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemas.java b/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemas.java
index 1794dedf..5945168b 100644
--- a/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemas.java
+++ b/src/main/java/org/onap/cps/ncmp/dmi/model/ModuleSchemas.java
@@ -20,6 +20,7 @@
package org.onap.cps.ncmp.dmi.model;
+import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
@@ -30,5 +31,6 @@ import lombok.Setter;
@Setter
public class ModuleSchemas {
+ @JsonProperty("ietf-netconf-monitoring:schemas")
private ModuleSchemaList schemas;
}
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/client/SdncRestconfClient.java b/src/main/java/org/onap/cps/ncmp/dmi/service/client/SdncRestconfClient.java
index fe13a38d..bbc39da5 100644
--- a/src/main/java/org/onap/cps/ncmp/dmi/service/client/SdncRestconfClient.java
+++ b/src/main/java/org/onap/cps/ncmp/dmi/service/client/SdncRestconfClient.java
@@ -23,6 +23,7 @@ package org.onap.cps.ncmp.dmi.service.client;
import org.onap.cps.ncmp.dmi.config.DmiConfiguration.SdncProperties;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
@@ -60,7 +61,8 @@ public class SdncRestconfClient {
final String sdncRestconfUrl = sdncBaseUrl.concat(getResourceUrl);
httpHeaders.setBasicAuth(sdncProperties.getAuthUsername(), sdncProperties.getAuthPassword());
final var httpEntity = new HttpEntity<>(httpHeaders);
- return restTemplate.getForEntity(sdncRestconfUrl, String.class, httpEntity);
+ return restTemplate.exchange(sdncRestconfUrl,
+ HttpMethod.GET, httpEntity, String.class);
}
/**