{"action":"closed","issue":{"url":"https://api.github.com/repos/telefonicaid/fiware-cygnus/issues/1147","repository_url":"https://api.github.com/repos/telefonicaid/fiware-cygnus","labels_url":"https://api.github.com/repos/telefonicaid/fiware-cygnus/issues/1147/labels{/name}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-cygnus/issues/1147/comments","events_url":"https://api.github.com/repos/telefonicaid/fiware-cygnus/issues/1147/events","html_url":"https://github.com/telefonicaid/fiware-cygnus/issues/1147","id":175215134,"number":1147,"title":"[cygnus][api] DELETE subscription error","user":{"login":"frbattid","id":3865056,"avatar_url":"https://avatars.githubusercontent.com/u/3865056?v=3","gravatar_id":"","url":"https://api.github.com/users/frbattid","html_url":"https://github.com/frbattid","followers_url":"https://api.github.com/users/frbattid/followers","following_url":"https://api.github.com/users/frbattid/following{/other_user}","gists_url":"https://api.github.com/users/frbattid/gists{/gist_id}","starred_url":"https://api.github.com/users/frbattid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frbattid/subscriptions","organizations_url":"https://api.github.com/users/frbattid/orgs","repos_url":"https://api.github.com/users/frbattid/repos","events_url":"https://api.github.com/users/frbattid/events{/privacy}","received_events_url":"https://api.github.com/users/frbattid/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/telefonicaid/fiware-cygnus/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"pcoello25","id":15360342,"avatar_url":"https://avatars.githubusercontent.com/u/15360342?v=3","gravatar_id":"","url":"https://api.github.com/users/pcoello25","html_url":"https://github.com/pcoello25","followers_url":"https://api.github.com/users/pcoello25/followers","following_url":"https://api.github.com/users/pcoello25/following{/other_user}","gists_url":"https://api.github.com/users/pcoello25/gists{/gist_id}","starred_url":"https://api.github.com/users/pcoello25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcoello25/subscriptions","organizations_url":"https://api.github.com/users/pcoello25/orgs","repos_url":"https://api.github.com/users/pcoello25/repos","events_url":"https://api.github.com/users/pcoello25/events{/privacy}","received_events_url":"https://api.github.com/users/pcoello25/received_events","type":"User","site_admin":false},"assignees":[{"login":"pcoello25","id":15360342,"avatar_url":"https://avatars.githubusercontent.com/u/15360342?v=3","gravatar_id":"","url":"https://api.github.com/users/pcoello25","html_url":"https://github.com/pcoello25","followers_url":"https://api.github.com/users/pcoello25/followers","following_url":"https://api.github.com/users/pcoello25/following{/other_user}","gists_url":"https://api.github.com/users/pcoello25/gists{/gist_id}","starred_url":"https://api.github.com/users/pcoello25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcoello25/subscriptions","organizations_url":"https://api.github.com/users/pcoello25/orgs","repos_url":"https://api.github.com/users/pcoello25/repos","events_url":"https://api.github.com/users/pcoello25/events{/privacy}","received_events_url":"https://api.github.com/users/pcoello25/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/telefonicaid/fiware-cygnus/milestones/28","html_url":"https://github.com/telefonicaid/fiware-cygnus/milestones/release/1.4.0","labels_url":"https://api.github.com/repos/telefonicaid/fiware-cygnus/milestones/28/labels","id":1800555,"number":28,"title":"release/1.4.0","description":"","creator":{"login":"frbattid","id":3865056,"avatar_url":"https://avatars.githubusercontent.com/u/3865056?v=3","gravatar_id":"","url":"https://api.github.com/users/frbattid","html_url":"https://github.com/frbattid","followers_url":"https://api.github.com/users/frbattid/followers","following_url":"https://api.github.com/users/frbattid/following{/other_user}","gists_url":"https://api.github.com/users/frbattid/gists{/gist_id}","starred_url":"https://api.github.com/users/frbattid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frbattid/subscriptions","organizations_url":"https://api.github.com/users/frbattid/orgs","repos_url":"https://api.github.com/users/frbattid/repos","events_url":"https://api.github.com/users/frbattid/events{/privacy}","received_events_url":"https://api.github.com/users/frbattid/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":1,"state":"open","created_at":"2016-06-01T07:27:45Z","updated_at":"2016-09-09T10:48:39Z","due_on":"2016-09-29T22:00:00Z","closed_at":null},"comments":2,"created_at":"2016-09-06T10:39:33Z","updated_at":"2016-09-09T10:48:39Z","closed_at":"2016-09-09T10:48:39Z","body":"As reported by a FIWARE user:\r\n\r\n\r\n\r\nThe test was done using the Cygnus version 1.2.0 on a Centos S.O.\r\n\r\nThe subscriptions's DELETE doesn't work due to an error on the input parameters.\r\nIt seems that the two parameters sent into the requests are not processed togheter. Only one of these is analyzed. The second one always not.\r\nNote that I performed a DELETE operation directly on the ORION server using CURL and also a REST request. In both cases it works and the subscription was deleted correctly.\r\n\r\nHere a recap of all 4 types of tests done.\r\n\r\n    First test sending the ngsi_version as first param\r\n    [centos@cygnus ~]$ curl --include --request DELETE http://localhost:8081/v1/subscriptions?ngsi_version=1&subscription_id=57c93ec8c1ff5ffad218f7cd\r\n    [1] 31461\r\n    [centos@cygnus ~]$ HTTP/1.1 400 Bad Request\r\n    Content-Type: application/json; charset=utf-8\r\n    Content-Length: 99\r\n    Server: Jetty(6.1.26)\r\n\r\n{\"success\":\"false\",\"error\":\"Parse error, wrong parameter (subscription_id). Check it for errors.\"}\r\n\r\n[1]+ Done curl --include --request DELETE http://localhost:8081/v1/subscriptions?ngsi_version=1\r\n[centos@cygnus ~]$\r\n\r\n    Second test sending the subscription_id as first param\r\n    [centos@cygnus ~]$ curl --include --request DELETE http://localhost:8081/v1/subscriptions?subscription_id=57c93ec8c1ff5ffad218f7cd&ngsi_version=1\r\n    [1] 31575\r\n    [centos@cygnus ~]$ HTTP/1.1 400 Bad Request\r\n    Content-Type: application/json; charset=utf-8\r\n    Content-Length: 96\r\n    Server: Jetty(6.1.26)\r\n\r\n{\"success\":\"false\",\"error\":\"Parse error, wrong parameter (ngsi_version). Check it for errors.\"}\r\n\r\n[1]+ Done curl --include --request DELETE http://localhost:8081/v1/subscriptions?subscription_id=57c93ec8c1ff5ffad218f7cd\r\n\r\nIn both of tests it seems that only the first parameter is processed.\r\n\r\n    Third test. I passed the address into the single quote '. The error is different. Is missing an end point\r\n    [centos@cygnus ~]$ curl --include --request DELETE 'http://localhost:8081/v1/subscriptions?ngsi_version=1&subscription_id=57c93ec8c1ff5ffad218f7cd'\r\n    HTTP/1.1 400 Bad Request\r\n    Content-Type: application/json; charset=utf-8\r\n    fiware-correlator: 178d26c1-7524-40b2-853d-fc16976f13f1\r\n    Content-Length: 47\r\n    Server: Jetty(6.1.26)\r\n\r\n{\"success\":\"false\",\"error\":\"Missing endpoint\"}\r\n\r\n[centos@cygnus ~]$\r\n\r\n    Fourth test. I passed a / slash as and endpoint. The error is that the operation is not implemented.\r\n    [centos@cygnus ~]$ curl --include --request DELETE 'http://localhost:8081/v1/subscriptions/?ngsi_version=1&subscription_id=57c93ec8c1ff5ffad218f7cd'\r\n    HTTP/1.1 501 Not Implemented\r\n    Content-Type: text/html; charset=utf-8\r\n    Content-Length: 42\r\n    Server: Jetty(6.1.26)\r\n\r\nDELETE /v1/subscriptions/ Not implemented\r\n[centos@cygnus ~]$\r\n"}}
{"actor":{"display_login":"pcoello25"}}