summaryrefslogtreecommitdiffstats
path: root/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java
diff options
context:
space:
mode:
Diffstat (limited to 'so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java')
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java27
1 files changed, 24 insertions, 3 deletions
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java
index 488b384..074fd45 100644
--- a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java
@@ -226,10 +226,31 @@ public class CnfAdapterRest {
@ResponseBody
@RequestMapping(value = {"/api/cnf-adapter/v1/instance/{instanceId}/query"}, method = RequestMethod.GET,
produces = "application/json")
- public String getInstanceQueryByInstanceId(@PathVariable("instanceId") String instanceId) {
- logger.info("getInstanceQueryByInstanceId called.");
+ public String queryInstanceResources(
+ @PathVariable("instanceId") String instanceId,
+ @RequestParam(value = "Kind") String kind,
+ @RequestParam(value = "ApiVersion") String apiVersion,
+ @RequestParam(value = "Labels", required = false) String labels,
+ @RequestParam(value = "Namespace", required = false) String namespace,
+ @RequestParam(value = "Name", required = false) String name) {
+ logger.info("queryInstanceResources called.");
- return cnfAdapterService.getInstanceQueryByInstanceId(instanceId);
+ return cnfAdapterService.queryInstanceResources(instanceId, kind, apiVersion, name, labels, namespace);
+ }
+
+ @ResponseBody
+ @RequestMapping(value = {"/api/cnf-adapter/v1/query"}, method = RequestMethod.GET,
+ produces = "application/json")
+ public String queryResources(
+ @RequestParam(value = "Kind") String kind,
+ @RequestParam(value = "ApiVersion") String apiVersion,
+ @RequestParam(value = "Labels", required = false) String labels,
+ @RequestParam(value = "Namespace", required = false) String namespace,
+ @RequestParam(value = "Name", required = false) String name,
+ @RequestParam(value = "CloudRegion") String cloudRegion) {
+ logger.info("queryResources called.");
+
+ return cnfAdapterService.queryResources(kind, apiVersion, name, labels, namespace, cloudRegion);
}
@RequestMapping(value = {"/api/cnf-adapter/v1/instance"}, method = RequestMethod.GET, produces = "application/json")