--- /dev/null
+package org.commscope.tr069adapter.netconf.server.ves;\r
+\r
+import org.commscope.tr069adapter.mapper.model.VESNotification;\r
+import org.commscope.tr069adapter.mapper.model.VESNotificationResponse;\r
+import org.commscope.tr069adapter.netconf.config.NetConfServerProperties;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.stereotype.Component;\r
+import org.springframework.web.client.RestTemplate;\r
+\r
+@Component\r
+public class VESNotificationSender {\r
+\r
+ private static final Logger LOG = LoggerFactory.getLogger(VESNotificationSender.class);\r
+ private RestTemplate restTemplate = new RestTemplate();\r
+\r
+ @Autowired\r
+ NetConfServerProperties config;\r
+\r
+ public VESNotificationResponse sendDeleteConfigNotification(VESNotification vesNotification) {\r
+ final String uri = getUri() + "/deleteConfig";\r
+ LOG.debug("Posting delete-config request to ves agent {}", uri);\r
+ return restTemplate.postForObject(uri, vesNotification, VESNotificationResponse.class);\r
+ }\r
+\r
+ private String getUri() {\r
+ return config.getVesURI();\r
+ }\r
+}\r