{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/comments/73469644","id":73469644,"diff_hunk":"@@ -0,0 +1,489 @@\n+/*\n+ * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+ *\n+ * WSO2 Inc. licenses this file to you under the Apache License,\n+ * Version 2.0 (the \"License\"); you may not use this file except\n+ * in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.communication.http;\n+\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import org.eclipse.jetty.http.HttpStatus;\n+import org.eclipse.jetty.server.Request;\n+import org.eclipse.jetty.server.handler.AbstractHandler;\n+import org.wso2.carbon.device.mgt.iot.transport.TransportHandlerException;\n+import org.wso2.carbon.device.mgt.iot.transport.TransportUtils;\n+import org.wso2.carbon.device.mgt.iot.transport.http.HTTPTransportHandler;\n+import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.core.AgentConstants;\n+import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.core.AgentManager;\n+import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.exception.AgentCoreOperationException;\n+\n+import javax.servlet.ServletException;\n+import javax.servlet.http.HttpServletRequest;\n+import javax.servlet.http.HttpServletResponse;\n+import java.io.DataOutputStream;\n+import java.io.File;\n+import java.io.IOException;\n+import java.net.HttpURLConnection;\n+import java.net.Inet4Address;\n+import java.net.InetAddress;\n+import java.net.NetworkInterface;\n+import java.net.ProtocolException;\n+import java.net.SocketException;\n+import java.net.UnknownHostException;\n+import java.util.Enumeration;\n+import java.util.concurrent.Executors;\n+import java.util.concurrent.ScheduledExecutorService;\n+import java.util.concurrent.ScheduledFuture;\n+import java.util.concurrent.TimeUnit;\n+\n+public class FireAlarmHTTPCommunicator extends HTTPTransportHandler {\n+    private static final Log log = LogFactory.getLog(FireAlarmHTTPCommunicator.class);\n+\n+    private ScheduledExecutorService service = Executors.newScheduledThreadPool(2);\n+    private ScheduledFuture<?> dataPushServiceHandler;\n+    private ScheduledFuture<?> connectorServiceHandler;\n+\n+    public FireAlarmHTTPCommunicator() {\n+        super();\n+    }\n+\n+    public FireAlarmHTTPCommunicator(int port) {\n+        super(port);\n+    }\n+\n+    public FireAlarmHTTPCommunicator(int port, int reconnectionInterval) {\n+        super(port, reconnectionInterval);\n+    }\n+\n+    public ScheduledFuture<?> getDataPushServiceHandler() {\n+        return dataPushServiceHandler;\n+    }\n+\n+    public void connect() {\n+        Runnable connect = new Runnable() {\n+            public void run() {\n+                if (!isConnected()) {\n+                    try {\n+                        processIncomingMessage();\n+                        server.start();\n+                        registerThisDevice();\n+                        publishDeviceData(AgentManager.getInstance().getPushInterval());\n+                        log.info(\"HTTP Server started at port: \" + port);\n+\n+                    } catch (Exception e) {\n+                        if (log.isDebugEnabled()) {\n+                            log.warn(\"Unable to 'START' HTTP server. Will retry after \" +\n+                                     timeoutInterval / 1000 + \" seconds.\");\n+                        }\n+                    }\n+                }\n+            }\n+        };\n+\n+        connectorServiceHandler = service.scheduleAtFixedRate(connect, 0, timeoutInterval,\n+                                                              TimeUnit.MILLISECONDS);\n+    }\n+\n+\n+    @Override\n+    public void processIncomingMessage() {\n+        server.setHandler(new AbstractHandler() {\n+            public void handle(String s, Request request, HttpServletRequest\n+                    httpServletRequest,\n+                               HttpServletResponse httpServletResponse)\n+                    throws IOException, ServletException {\n+                httpServletResponse.setContentType(\"text/html;charset=utf-8\");\n+                httpServletResponse.setStatus(HttpServletResponse.SC_OK);\n+                request.setHandled(true);\n+\n+                AgentManager agentManager = AgentManager.getInstance();\n+                String pathContext = request.getPathInfo();\n+                String separator =  (File.separatorChar == '\\\\') ? (\"\\\\\\\\\") : (File.separator);\n+\n+                if (pathContext.toUpperCase().contains(\n+                        separator + AgentConstants.TEMPERATURE_CONTROL)) {\n+                    httpServletResponse.getWriter().println(\n+                            agentManager.getTemperature());\n+\n+                } else if (pathContext.toUpperCase().contains(\n+                        separator + AgentConstants.HUMIDITY_CONTROL)) {\n+                    httpServletResponse.getWriter().println(\n+                            agentManager.getHumidity());\n+\n+                } else if (pathContext.toUpperCase().contains(\n+                        separator + AgentConstants.BULB_CONTROL)) {\n+                    String[] pathVariables = pathContext.split(separator);\n+\n+                    if (pathVariables.length != 3) {\n+                        httpServletResponse.getWriter().println(\n+                                \"Invalid BULB-control received by the device. Need to be in \" +\n+                                \"'{host}:{port}/BULB/{ON|OFF}' format.\");\n+                        return;\n+                    }\n+\n+                    String switchState = pathVariables[2];\n+\n+                    if (switchState == null) {\n+                        httpServletResponse.getWriter().println(\n+                                \"Please specify switch-status of the BULB.\");\n+                    } else {\n+                        boolean status = switchState.toUpperCase().equals(\n+                                AgentConstants.CONTROL_ON);\n+                        agentManager.changeAlarmStatus(status);\n+                        httpServletResponse.getWriter().println(\"Bulb is \" + (status ?\n+                                                                              AgentConstants.CONTROL_ON : AgentConstants.CONTROL_OFF));\n+                    }\n+                } else {\n+                    httpServletResponse.getWriter().println(\n+                            \"Invalid control command received by the device.\");\n+                }\n+            }\n+        });\n+    }\n+\n+    @Override\n+    public void publishDeviceData(int publishInterval) {\n+        final AgentManager agentManager = AgentManager.getInstance();\n+        final String deviceOwner = agentManager.getAgentConfigs().getDeviceOwner();\n+        final String deviceID = agentManager.getAgentConfigs().getDeviceId();\n+        boolean simulationMode = false;\n+        int duration = 2 * 60;\n+        int frequency = 5;\n+\n+        Runnable pushDataRunnable = new Runnable() {\n+            @Override\n+            public void run() {\n+\n+                String pushDataPayload = String.format(AgentConstants.PUSH_DATA_PAYLOAD, deviceOwner,\n+                                                       deviceID, (agentManager.getDeviceIP() + \":\" + port),\n+                                                       agentManager.getTemperature());\n+                executeDataPush(pushDataPayload);\n+            }\n+        };\n+\n+        if (!simulationMode) {\n+            dataPushServiceHandler = service.scheduleAtFixedRate(pushDataRunnable, publishInterval,\n+                                                                 publishInterval,\n+                                                                 TimeUnit.SECONDS);\n+        } else {\n+            String pushDataPayload = String.format(AgentConstants.PUSH_SIMULATION_DATA_PAYLOAD, deviceOwner,\n+                                                   deviceID, (agentManager.getDeviceIP() + \":\" + port),\n+                                                   agentManager.getTemperature(), true, duration, frequency);\n+            executeDataPush(pushDataPayload);\n+\n+        }\n+    }\n+\n+    private void executeDataPush(String pushDataPayload) {\n+        AgentManager agentManager = AgentManager.getInstance();\n+        int responseCode = -1;\n+        String pushDataEndPointURL = agentManager.getPushDataAPIEP();\n+        HttpURLConnection httpConnection = null;\n+\n+        try {\n+            httpConnection = TransportUtils.getHttpConnection(agentManager.getPushDataAPIEP());\n+            httpConnection.setRequestMethod(AgentConstants.HTTP_POST);\n+            httpConnection.setRequestProperty(\"Authorization\", \"Bearer \" +\n+                                                               agentManager.getAgentConfigs().getAuthToken());\n+            httpConnection.setRequestProperty(\"Content-Type\",\n+                                              AgentConstants.APPLICATION_JSON_TYPE);\n+\n+            httpConnection.setDoOutput(true);\n+            DataOutputStream dataOutPutWriter = new DataOutputStream(\n+                    httpConnection.getOutputStream());\n+            dataOutPutWriter.writeBytes(pushDataPayload);\n+            dataOutPutWriter.flush();\n+            dataOutPutWriter.close();\n+\n+            responseCode = httpConnection.getResponseCode();\n+            httpConnection.disconnect();\n+\n+            log.info(AgentConstants.LOG_APPENDER + \"Message - '\" + pushDataPayload +\n+                     \"' was published to server at: \" + httpConnection.getURL());\n+\n+        } catch (ProtocolException exception) {\n+            String errorMsg =\n+                    \"Protocol specific error occurred when trying to set method to \" +\n+                    AgentConstants.HTTP_POST + \" for:\" + pushDataEndPointURL;\n+            log.error(AgentConstants.LOG_APPENDER + errorMsg);\n+\n+        } catch (IOException exception) {\n+            String errorMsg =\n+                    \"An IO error occurred whilst trying to get the response code from: \" +\n+                    pushDataEndPointURL + \" for a \" + AgentConstants.HTTP_POST +\n+                    \" \" + \"method.\";\n+            log.error(AgentConstants.LOG_APPENDER + errorMsg);\n+\n+        } catch (TransportHandlerException exception) {\n+            log.error(AgentConstants.LOG_APPENDER +\n+                      \"Error encountered whilst trying to create HTTP-Connection \" +\n+                      \"to IoT-Server EP at: \" +\n+                      pushDataEndPointURL);\n+        }\n+\n+        if (responseCode == HttpStatus.CONFLICT_409 ||\n+            responseCode == HttpStatus.PRECONDITION_FAILED_412) {\n+            log.warn(AgentConstants.LOG_APPENDER +\n+                     \"DeviceIP is being Re-Registered due to Push-Data failure \" +\n+                     \"with response code: \" +\n+                     responseCode);\n+            registerThisDevice();\n+\n+        } else if (responseCode != HttpStatus.NO_CONTENT_204) {\n+            if (log.isDebugEnabled()) {\n+                log.error(AgentConstants.LOG_APPENDER + \"Status Code: \" + responseCode +\n+                          \" encountered whilst trying to Push-Device-Data to IoT \" +\n+                          \"Server at: \" +\n+                          agentManager.getPushDataAPIEP());\n+            }\n+            agentManager.updateAgentStatus(AgentConstants.SERVER_NOT_RESPONDING);\n+        }\n+\n+        if (log.isDebugEnabled()) {\n+            log.debug(AgentConstants.LOG_APPENDER + \"Push-Data call with payload - \" +\n+                      pushDataPayload + \", to IoT Server returned status \" +\n+                      responseCode);\n+        }\n+    }\n+\n+    @Override\n+    public void disconnect() {\n+        Runnable stopConnection = new Runnable() {\n+            public void run() {\n+                while (isConnected()) {\n+                    try {\n+                        dataPushServiceHandler.cancel(true);\n+                        connectorServiceHandler.cancel(true);\n+                        closeConnection();\n+                    } catch (Exception e) {\n+                        if (log.isDebugEnabled()) {\n+                            log.warn(AgentConstants.LOG_APPENDER +\n+                                     \"Unable to 'STOP' HTTP server at port: \" + port);\n+                        }\n+\n+                        try {\n+                            Thread.sleep(timeoutInterval);\n+                        } catch (InterruptedException e1) {\n+                            log.error(AgentConstants.LOG_APPENDER +\n+                                      \"HTTP-Termination: Thread Sleep Interrupt \" +\n+                                      \"Exception\");\n+                        }\n+                    }\n+                }\n+            }\n+        };\n+\n+        Thread terminatorThread = new Thread(stopConnection);\n+        terminatorThread.setDaemon(true);\n+        terminatorThread.start();\n+    }\n+\n+    @Override\n+    public void processIncomingMessage(Object message, String... messageParams) {\n+\n+    }\n+\n+\n+    public void registerThisDevice() {\n+        final AgentManager agentManager = AgentManager.getInstance();\n+        agentManager.updateAgentStatus(\"Registering...\");\n+\n+        final Runnable ipRegistration = new Runnable() {\n+            @Override\n+            public void run() {\n+                while (isConnected()) {\n+                    try {\n+                        int responseCode = registerDeviceIP(\n+                                agentManager.getAgentConfigs().getDeviceOwner(),\n+                                agentManager.getAgentConfigs().getDeviceId());\n+\n+                        if (responseCode == HttpStatus.OK_200) {\n+                            agentManager.updateAgentStatus(AgentConstants.REGISTERED);\n+                            break;\n+                        } else {\n+                            log.error(AgentConstants.LOG_APPENDER +\n+                                      \"Device Registration with IoT Server at:\" + \" \" +\n+                                      agentManager.getIpRegistrationEP() +\n+                                      \" failed with response - '\" + responseCode + \":\" +\n+                                      HttpStatus.getMessage(responseCode) + \"'\");\n+                            agentManager.updateAgentStatus(AgentConstants.RETRYING_TO_REGISTER);\n+                        }\n+                    } catch (AgentCoreOperationException exception) {\n+                        log.error(AgentConstants.LOG_APPENDER +","path":"components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/advanced/communication/http/FireAlarmHTTPCommunicator.java","position":325,"original_position":325,"commit_id":"e59703ab6176a37fc87b1669004ea3343ea29366","original_commit_id":"c65175ff10ac1c47df46aa49b00b30ff48bbb8d0","user":{"login":"prabathabey","id":6664125,"avatar_url":"https://avatars.githubusercontent.com/u/6664125?v=3","gravatar_id":"","url":"https://api.github.com/users/prabathabey","html_url":"https://github.com/prabathabey","followers_url":"https://api.github.com/users/prabathabey/followers","following_url":"https://api.github.com/users/prabathabey/following{/other_user}","gists_url":"https://api.github.com/users/prabathabey/gists{/gist_id}","starred_url":"https://api.github.com/users/prabathabey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prabathabey/subscriptions","organizations_url":"https://api.github.com/users/prabathabey/orgs","repos_url":"https://api.github.com/users/prabathabey/repos","events_url":"https://api.github.com/users/prabathabey/events{/privacy}","received_events_url":"https://api.github.com/users/prabathabey/received_events","type":"User","site_admin":false},"body":"Exception trace is not logged. Please fix.","created_at":"2016-08-04T06:47:20Z","updated_at":"2016-08-04T06:47:20Z","html_url":"https://github.com/wso2/carbon-device-mgt-plugins/pull/21#discussion_r73469644","pull_request_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/comments/73469644"},"html":{"href":"https://github.com/wso2/carbon-device-mgt-plugins/pull/21#discussion_r73469644"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/21","id":52815302,"html_url":"https://github.com/wso2/carbon-device-mgt-plugins/pull/21","diff_url":"https://github.com/wso2/carbon-device-mgt-plugins/pull/21.diff","patch_url":"https://github.com/wso2/carbon-device-mgt-plugins/pull/21.patch","issue_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/21","number":21,"state":"closed","locked":false,"title":"Device type seperation","user":{"login":"charithag","id":3184302,"avatar_url":"https://avatars.githubusercontent.com/u/3184302?v=3","gravatar_id":"","url":"https://api.github.com/users/charithag","html_url":"https://github.com/charithag","followers_url":"https://api.github.com/users/charithag/followers","following_url":"https://api.github.com/users/charithag/following{/other_user}","gists_url":"https://api.github.com/users/charithag/gists{/gist_id}","starred_url":"https://api.github.com/users/charithag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charithag/subscriptions","organizations_url":"https://api.github.com/users/charithag/orgs","repos_url":"https://api.github.com/users/charithag/repos","events_url":"https://api.github.com/users/charithag/events{/privacy}","received_events_url":"https://api.github.com/users/charithag/received_events","type":"User","site_admin":false},"body":"* EMM based device types are separated.\r\n* Added IoT common components and virtual firealarm device type","created_at":"2015-12-07T08:07:17Z","updated_at":"2016-08-04T06:47:20Z","closed_at":"2015-12-07T08:08:09Z","merged_at":"2015-12-07T08:08:09Z","merge_commit_sha":"664e4308664097b5e4c5b0b1e660455c24a8c52d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/21/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/21/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/21/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/statuses/e59703ab6176a37fc87b1669004ea3343ea29366","head":{"label":"charithag:master","ref":"master","sha":"e59703ab6176a37fc87b1669004ea3343ea29366","user":{"login":"charithag","id":3184302,"avatar_url":"https://avatars.githubusercontent.com/u/3184302?v=3","gravatar_id":"","url":"https://api.github.com/users/charithag","html_url":"https://github.com/charithag","followers_url":"https://api.github.com/users/charithag/followers","following_url":"https://api.github.com/users/charithag/following{/other_user}","gists_url":"https://api.github.com/users/charithag/gists{/gist_id}","starred_url":"https://api.github.com/users/charithag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charithag/subscriptions","organizations_url":"https://api.github.com/users/charithag/orgs","repos_url":"https://api.github.com/users/charithag/repos","events_url":"https://api.github.com/users/charithag/events{/privacy}","received_events_url":"https://api.github.com/users/charithag/received_events","type":"User","site_admin":false},"repo":{"id":37982972,"name":"carbon-device-mgt-plugins","full_name":"charithag/carbon-device-mgt-plugins","owner":{"login":"charithag","id":3184302,"avatar_url":"https://avatars.githubusercontent.com/u/3184302?v=3","gravatar_id":"","url":"https://api.github.com/users/charithag","html_url":"https://github.com/charithag","followers_url":"https://api.github.com/users/charithag/followers","following_url":"https://api.github.com/users/charithag/following{/other_user}","gists_url":"https://api.github.com/users/charithag/gists{/gist_id}","starred_url":"https://api.github.com/users/charithag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charithag/subscriptions","organizations_url":"https://api.github.com/users/charithag/orgs","repos_url":"https://api.github.com/users/charithag/repos","events_url":"https://api.github.com/users/charithag/events{/privacy}","received_events_url":"https://api.github.com/users/charithag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/charithag/carbon-device-mgt-plugins","description":"","fork":true,"url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins","forks_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/forks","keys_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/teams","hooks_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/hooks","issue_events_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/events","assignees_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/tags","blobs_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/languages","stargazers_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/stargazers","contributors_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/contributors","subscribers_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/subscribers","subscription_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/subscription","commits_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/merges","archive_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/downloads","issues_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/labels{/name}","releases_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/charithag/carbon-device-mgt-plugins/deployments","created_at":"2015-06-24T12:26:42Z","updated_at":"2016-03-29T09:02:01Z","pushed_at":"2016-08-02T10:17:56Z","git_url":"git://github.com/charithag/carbon-device-mgt-plugins.git","ssh_url":"git@github.com:charithag/carbon-device-mgt-plugins.git","clone_url":"https://github.com/charithag/carbon-device-mgt-plugins.git","svn_url":"https://github.com/charithag/carbon-device-mgt-plugins","homepage":null,"size":113977,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:IoTS-1.0.0-M1","ref":"IoTS-1.0.0-M1","sha":"5a797d4de1aba92ac5d9cba5a159046a35b8e465","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":30521516,"name":"carbon-device-mgt-plugins","full_name":"wso2/carbon-device-mgt-plugins","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-device-mgt-plugins","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins","forks_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/forks","keys_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/events","assignees_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/merges","archive_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/deployments","created_at":"2015-02-09T06:12:40Z","updated_at":"2016-01-28T13:45:00Z","pushed_at":"2016-08-02T17:42:32Z","git_url":"git://github.com/wso2/carbon-device-mgt-plugins.git","ssh_url":"git@github.com:wso2/carbon-device-mgt-plugins.git","clone_url":"https://github.com/wso2/carbon-device-mgt-plugins.git","svn_url":"https://github.com/wso2/carbon-device-mgt-plugins","homepage":null,"size":114438,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":0,"forks":39,"open_issues":0,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/21"},"html":{"href":"https://github.com/wso2/carbon-device-mgt-plugins/pull/21"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/21"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/statuses/e59703ab6176a37fc87b1669004ea3343ea29366"}}}}
{"actor":{"display_login":"prabathabey"}}