Add topics end point to dmaap sim
[policy/models.git] / models-sim / models-sim-dmaap / src / main / java / org / onap / policy / models / sim / dmaap / provider / DmaapSimProvider.java
index c954ab8..2119a65 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2019 Nordix Foundation.
  *  Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ *  Modifications Copyright (C) 2021 Bell Canada. 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.
@@ -141,6 +142,20 @@ public class DmaapSimProvider extends ServiceManagerContainer {
         }
     }
 
+    /**
+     * Returns the list of default topics.
+     *
+     * @return the topic list
+     */
+    public Response processDmaapTopicsGet() {
+
+        LOGGER.debug("Request for listing DMaaP topics");
+        var response = new DmaapGetTopicResponse();
+        response.setTopics(List.of("POLICY-PDP-PAP", "POLICY-NOTIFICATION", "unauthenticated.DCAE_CL_OUTPUT",
+                        "POLICY-CL-MGT"));
+        return Response.status(Status.OK).entity(response).build();
+    }
+
     /**
      * Task to remove idle consumers from each topic.
      */