* @par LLC "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
* @par Copyright : (c) Samsung Electronics Co, Ltd 2017. All rights reserved.
*/
-@Disabled
-@Ignore
public class PolicyWitoutCloudTest extends BasicUserAction {
private static final String DEVICE_DUID = "00000000-1111-2222-3333-4444444444444";
//CHECKSTYLE_OFF:Magic Number
private void checkPolicy(KafkaConsumer<byte[], byte[]> consumer, String policy) {
List<byte[]> policyList = new ArrayList<>();
- int attemptCounts = 10;
+ int attemptCounts = 0;
while (policyList.isEmpty() && attemptCounts >= 0) {
policyList = MQListenerAPI.getMessages(consumer);
attemptCounts--;
* @par LLC "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
* @par Copyright : (c) Samsung Electronics Co, Ltd 2017. All rights reserved.
*/
-@Disabled
-@Ignore
+
public class ReportsWithOutCloudTest extends BasicUserAction {
private static final String SMACK = "smack";
//CHECKSTYLE_OFF:Magic Number
private void checkNotification(KafkaConsumer<byte[], byte[]> consumer) {
List<byte[]> notificationList = new ArrayList<>();
- int attemptCounts = 10;
+ int attemptCounts = 0;
while (notificationList.isEmpty() && attemptCounts >= 0) {
notificationList = MQListenerAPI.getMessages(consumer);
attemptCounts--;
* @par LLC "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
* @par Copyright : (c) Samsung Electronics Co, Ltd 2017. All rights reserved.
*/
-@Disabled
-@Ignore
+
public class RestRuleReportsTest extends BasicUserAction {
private static final String SYSCALL = "syscall";
//CHECKSTYLE_OFF:Magic Number
private void checkNotification(KafkaConsumer<byte[], byte[]> consumer) {
List<byte[]> notificationList = new ArrayList<>();
- int attemptCounts = 10;
+ int attemptCounts = 0;
while (notificationList.isEmpty() && attemptCounts >= 0) {
notificationList = MQListenerAPI.getMessages(consumer);
attemptCounts--;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.samsung.commons.domain.Agent;
* @param deviceId the device id
* @return the response entity
*/
- @RequestMapping(value = "/request/{policyId}/device/{deviceId}")
+ @RequestMapping(value = "/request/{policyId}/device/{deviceId}", method = RequestMethod.POST)
public ResponseEntity<String> requestPolicy(@PathVariable Long policyId, @PathVariable String deviceId) {
LOG.info("Request policy - " + policyId);
// TODO add check for policy
* @param reportId report ID
* @return the response entity
*/
- @RequestMapping(value = "/newreport/{reportId}")
+ @RequestMapping(value = "/newreport/{reportId}", method = RequestMethod.POST)
public ResponseEntity<String> newReportNotification(@PathVariable Long reportId) {
LOG.info("Get new report " + reportId);
private static final Logger LOG = Logger.getLogger(DsmApiImpl.class);
- private static final String REST_FOR_NOTIFICATION = "restapi/report/newreport/";
+ private static final String REST_FOR_NOTIFICATION = "dsm/restapi/report/newreport/";
- private static final String REST_FOR_REQUEST_POLICY = "restapi/policy/request/";
+ private static final String REST_FOR_REQUEST_POLICY = "dsm/restapi/policy/request/";
/**
* Http Sender