{"action":"created","comment":{"url":"https://api.github.com/repos/foglamp/FogLAMP/pulls/comments/158018071","pull_request_review_id":84756425,"id":158018071,"diff_hunk":"@@ -7,113 +7,148 @@\n \"\"\"Backup and Restore Rest API support\"\"\"\n \n from aiohttp import web\n+from enum import IntEnum\n+from collections import OrderedDict\n+\n+from foglamp.services.core import connect\n+from foglamp.plugins.storage.postgres.backup_restore.backup_postgres import Backup\n+from foglamp.plugins.storage.postgres.backup_restore import exceptions\n+\n # TODO: remove this and call actual class methods\n from unittest.mock import MagicMock\n-Backup = MagicMock()\n+Backup_Mock = MagicMock()\n+\n \n __author__ = \"Vaibhav Singhal\"\n __copyright__ = \"Copyright (c) 2017 OSIsoft, LLC\"\n __license__ = \"Apache 2.0\"\n __version__ = \"${VERSION}\"\n \n+__DEFAULT_LIMIT = 20\n+__DEFAULT_OFFSET = 0\n \n _help = \"\"\"\n     -----------------------------------------------------------------------------------\n     | GET, POST       | /foglamp/backup                                                |\n-    | GET             | /foglamp/backup/{backup-id}                                    |\n-    | DELETE          | /foglamp/backup/{backup-id}                                    |\n-    |                                                                                  |\n+    | GET, DELETE     | /foglamp/backup/{backup-id}                                    |\n     | PUT             | /foglamp/backup/{backup-id}/restore                            |\n     -----------------------------------------------------------------------------------\n \"\"\"\n \n+\n+class Status(IntEnum):\n+    \"\"\"Enumeration for backup.status\"\"\"\n+    RUNNING = 1\n+    COMPLETED = 2\n+    CANCELLED = 3\n+    INTERRUPTED = 4\n+    FAILED = 5\n+    RESTORED = 6\n+\n+\n async def get_backups(request):\n-    \"\"\"\n-    Returns a list of all backups\n+    \"\"\" Returns a list of all backups\n \n-    :Example: curl -X GET  http://localhost:8082/foglamp/backup\n-    :Example: curl -X GET  http://localhost:8082/foglamp/backup?limit=2&skip=1&status=complete\n+    :Example: curl -X GET http://localhost:8081/foglamp/backup\n+    :Example: curl -X GET http://localhost:8081/foglamp/backup?limit=2&skip=1&status=completed\n     \"\"\"\n     try:\n-        limit = int(request.query['limit']) if 'limit' in request.query else None\n-        skip = int(request.query['skip']) if 'skip' in request.query else None\n-        status = request.query['status'] if 'status' in request.query else None\n-        # TODO : Fix after actual implementation\n-        Backup.get_backup_list.return_value = [{'id': 28, 'date': '2017-08-30 04:05:10.382', 'status': 'running'},\n-                                               {'id': 27, 'date': '2017-08-29 04:05:13.392', 'status': 'failed'},\n-                                               {'id': 26, 'date': '2017-08-28 04:05:08.201', 'status': 'complete'}]\n-\n-        # backup_json = [{\"id\": b[0], \"date\": b[1], \"status\": b[2]}\n-        #                for b in Backup.get_backup_list(limit=limit, skip=skip, status=status)]\n-        backup_json = Backup.get_backup_list(limit=limit, skip=skip, status=status)\n-    except Backup.DoesNotExist:\n-        raise web.HTTPNotFound(reason='No backups found for queried parameters')\n-    return web.json_response({\"backups\": backup_json})\n+        backup = Backup(connect.get_storage())\n+        limit = int(request.query['limit']) if 'limit' in request.query else __DEFAULT_LIMIT\n+        skip = int(request.query['skip']) if 'skip' in request.query else __DEFAULT_OFFSET\n+        status = Status[request.query['status'].upper()].value if 'status' in request.query else None\n+        backup_json = backup.get_all_backups(limit=limit, skip=skip, status=status)\n+\n+        res = []\n+        for row in backup_json:\n+            r = OrderedDict()\n+            r[\"id\"] = row[\"id\"]\n+            r[\"date\"] = row[\"ts\"]\n+            r[\"status\"] = _get_status(int(row[\"status\"]))\n+            res.append(r)\n+\n+    except ValueError as ex:\n+        raise web.HTTPBadRequest(reason=str(ex))\n+    except KeyError as ex:\n+        raise web.HTTPBadRequest(reason=\"{} not a valid status\".format(ex))\n+    except Exception as ex:\n+        raise web.HTTPException(reason=str(ex))\n+\n+    return web.json_response({\"backups\": res})\n \n async def create_backup(request):\n-    \"\"\"\n-    Creates a backup\n+    \"\"\" Creates a backup\n \n-    :Example: curl -X POST http://localhost:8082/foglamp/backup\n+    :Example: curl -X POST http://localhost:8081/foglamp/backup\n     \"\"\"\n-    # TODO : Fix after actual implementation\n-    Backup.create_backup.return_value = \"running\"\n-    status = Backup.create_backup()\n+    try:\n+        backup = Backup(connect.get_storage())\n+        status = await backup.create_backup()\n+    except Exception as ex:\n+        raise web.HTTPException(reason=str(ex))\n+\n     return web.json_response({\"status\": status})\n \n async def get_backup_details(request):\n-    \"\"\"\n-    Returns the details of a backup\n+    \"\"\" Returns the details of a backup\n \n-    :Example: curl -X GET  http://localhost:8082/foglamp/backup/1\n+    :Example: curl -X GET http://localhost:8081/foglamp/backup/1\n     \"\"\"\n     backup_id = request.match_info.get('backup_id', None)\n     if not backup_id:\n         raise web.HTTPBadRequest(reason='Backup id is required')\n-    else:\n-        try:\n-            backup_id = int(backup_id)\n-        except ValueError:\n-            raise web.HTTPBadRequest(reason='Invalid backup id')\n     try:\n-        # TODO : Fix after actual implementation\n-        Backup.get_backup_details.return_value = \\\n-            {\"date\": '2017-08-30 04:05:10.382', \"status\": \"running\"}\n-    except Backup.DoesNotExist:\n+        backup_id = int(backup_id)\n+        backup = Backup(connect.get_storage())\n+        backup_json = backup.get_backup_details(backup_id)\n+\n+        resp = {\"status\": _get_status(int(backup_json[\"status\"])),\n+                'id': backup_json[\"id\"],\n+                'date': backup_json[\"ts\"]\n+                }\n+\n+    except ValueError:\n+        raise web.HTTPBadRequest(reason='Invalid backup id')\n+    except exceptions.DoesNotExist:\n         raise web.HTTPNotFound(reason='Backup with {} does not exist'.format(backup_id))\n+    except Exception as ex:\n+        raise web.HTTPException(reason=(str(ex)))\n+\n+    return web.json_response(resp)\n \n-    _resp = Backup.get_backup_details(id=backup_id)\n-    _resp[\"id\"] = backup_id\n-    return web.json_response(_resp)\n \n async def delete_backup(request):\n-    \"\"\"\n-    Delete a backup\n+    \"\"\" Delete a backup\n \n-    :Example: curl -X DELETE  http://localhost:8082/foglamp/backup/1\n+    :Example: curl -X DELETE http://localhost:8081/foglamp/backup/1\n     \"\"\"\n     backup_id = request.match_info.get('backup_id', None)\n     if not backup_id:\n         raise web.HTTPBadRequest(reason='Backup id is required')\n-    else:\n-        try:\n-            backup_id = int(backup_id)\n-        except ValueError:\n-            raise web.HTTPBadRequest(reason='Invalid backup id')\n-        try:\n-            # TODO : Fix after actual implementation\n-            Backup.delete_backup.return_value = \"Backup deleted successfully\"\n-        except Backup.DoesNotExist:\n-            raise web.HTTPNotFound(reason='Backup with {} does not exist'.format(backup_id))\n+    try:\n+        backup_id = int(backup_id)\n+        backup = Backup(connect.get_storage())\n+        backup.delete_backup(backup_id)\n+        return web.json_response({'message': \"Backup deleted successfully\"})\n+    except ValueError:\n+        raise web.HTTPBadRequest(reason='Invalid backup id')\n+    except exceptions.DoesNotExist:\n+        raise web.HTTPNotFound(reason='Backup with {} does not exist'.format(backup_id))\n+    except Exception as ex:\n+        raise web.HTTPException(reason=str(ex))\n+\n \n-        _resp = Backup.delete_backup(id=backup_id)\n-        return web.json_response({'message': _resp})\n+def _get_status(status_code):\n+    if status_code not in range(1, 6):","path":"python/foglamp/services/core/api/backup_restore.py","position":194,"original_position":194,"commit_id":"c65c84e80c4dab074f975e03cd7be4994e4a3ccf","original_commit_id":"c65c84e80c4dab074f975e03cd7be4994e4a3ccf","user":{"login":"ashish-jabble","id":27723735,"avatar_url":"https://avatars0.githubusercontent.com/u/27723735?v=4","gravatar_id":"","url":"https://api.github.com/users/ashish-jabble","html_url":"https://github.com/ashish-jabble","followers_url":"https://api.github.com/users/ashish-jabble/followers","following_url":"https://api.github.com/users/ashish-jabble/following{/other_user}","gists_url":"https://api.github.com/users/ashish-jabble/gists{/gist_id}","starred_url":"https://api.github.com/users/ashish-jabble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashish-jabble/subscriptions","organizations_url":"https://api.github.com/users/ashish-jabble/orgs","repos_url":"https://api.github.com/users/ashish-jabble/repos","events_url":"https://api.github.com/users/ashish-jabble/events{/privacy}","received_events_url":"https://api.github.com/users/ashish-jabble/received_events","type":"User","site_admin":false},"body":"In your case below case fails:\r\n```\r\nif 6 not in range(1, 6):\r\n    print (\"YES\")\r\n```    \r\nYES\r\n\r\nSo, range check should (1, 7 ) as per Status enum","created_at":"2017-12-20T13:07:32Z","updated_at":"2017-12-20T13:07:32Z","html_url":"https://github.com/foglamp/FogLAMP/pull/392#discussion_r158018071","pull_request_url":"https://api.github.com/repos/foglamp/FogLAMP/pulls/392","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/foglamp/FogLAMP/pulls/comments/158018071"},"html":{"href":"https://github.com/foglamp/FogLAMP/pull/392#discussion_r158018071"},"pull_request":{"href":"https://api.github.com/repos/foglamp/FogLAMP/pulls/392"}}},"pull_request":{"url":"https://api.github.com/repos/foglamp/FogLAMP/pulls/392","id":158603904,"html_url":"https://github.com/foglamp/FogLAMP/pull/392","diff_url":"https://github.com/foglamp/FogLAMP/pull/392.diff","patch_url":"https://github.com/foglamp/FogLAMP/pull/392.patch","issue_url":"https://api.github.com/repos/foglamp/FogLAMP/issues/392","number":392,"state":"open","locked":false,"title":"FOGL-556 Implement Backup API","user":{"login":"Singhal-Vaibhav","id":27723439,"avatar_url":"https://avatars0.githubusercontent.com/u/27723439?v=4","gravatar_id":"","url":"https://api.github.com/users/Singhal-Vaibhav","html_url":"https://github.com/Singhal-Vaibhav","followers_url":"https://api.github.com/users/Singhal-Vaibhav/followers","following_url":"https://api.github.com/users/Singhal-Vaibhav/following{/other_user}","gists_url":"https://api.github.com/users/Singhal-Vaibhav/gists{/gist_id}","starred_url":"https://api.github.com/users/Singhal-Vaibhav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Singhal-Vaibhav/subscriptions","organizations_url":"https://api.github.com/users/Singhal-Vaibhav/orgs","repos_url":"https://api.github.com/users/Singhal-Vaibhav/repos","events_url":"https://api.github.com/users/Singhal-Vaibhav/events{/privacy}","received_events_url":"https://api.github.com/users/Singhal-Vaibhav/received_events","type":"User","site_admin":false},"body":"**Done:**\r\n\r\n| Verb | Endpoint |\r\n| --- | --- |\r\n| GET, POST | `/foglamp/backup` |\r\n| GET, DELETE | `/foglamp/backup/{backup-id}` |\r\n\r\nTests for the above endpoints.\r\n\r\n**TODO's**\r\n\r\n- [FOGL-865](https://scaledb.atlassian.net/browse/FOGL-865)\r\n- [FOGL-861](https://scaledb.atlassian.net/browse/FOGL-861)","created_at":"2017-12-15T13:32:27Z","updated_at":"2017-12-20T13:07:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3896731453da47d068c982e922f282e4b19fce76","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sstefano69","id":4919069,"avatar_url":"https://avatars3.githubusercontent.com/u/4919069?v=4","gravatar_id":"","url":"https://api.github.com/users/sstefano69","html_url":"https://github.com/sstefano69","followers_url":"https://api.github.com/users/sstefano69/followers","following_url":"https://api.github.com/users/sstefano69/following{/other_user}","gists_url":"https://api.github.com/users/sstefano69/gists{/gist_id}","starred_url":"https://api.github.com/users/sstefano69/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstefano69/subscriptions","organizations_url":"https://api.github.com/users/sstefano69/orgs","repos_url":"https://api.github.com/users/sstefano69/repos","events_url":"https://api.github.com/users/sstefano69/events{/privacy}","received_events_url":"https://api.github.com/users/sstefano69/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/foglamp/FogLAMP/pulls/392/commits","review_comments_url":"https://api.github.com/repos/foglamp/FogLAMP/pulls/392/comments","review_comment_url":"https://api.github.com/repos/foglamp/FogLAMP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/foglamp/FogLAMP/issues/392/comments","statuses_url":"https://api.github.com/repos/foglamp/FogLAMP/statuses/c65c84e80c4dab074f975e03cd7be4994e4a3ccf","head":{"label":"foglamp:FOGL-556","ref":"FOGL-556","sha":"c65c84e80c4dab074f975e03cd7be4994e4a3ccf","user":{"login":"foglamp","id":27822234,"avatar_url":"https://avatars0.githubusercontent.com/u/27822234?v=4","gravatar_id":"","url":"https://api.github.com/users/foglamp","html_url":"https://github.com/foglamp","followers_url":"https://api.github.com/users/foglamp/followers","following_url":"https://api.github.com/users/foglamp/following{/other_user}","gists_url":"https://api.github.com/users/foglamp/gists{/gist_id}","starred_url":"https://api.github.com/users/foglamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foglamp/subscriptions","organizations_url":"https://api.github.com/users/foglamp/orgs","repos_url":"https://api.github.com/users/foglamp/repos","events_url":"https://api.github.com/users/foglamp/events{/privacy}","received_events_url":"https://api.github.com/users/foglamp/received_events","type":"Organization","site_admin":false},"repo":{"id":88887957,"name":"FogLAMP","full_name":"foglamp/FogLAMP","owner":{"login":"foglamp","id":27822234,"avatar_url":"https://avatars0.githubusercontent.com/u/27822234?v=4","gravatar_id":"","url":"https://api.github.com/users/foglamp","html_url":"https://github.com/foglamp","followers_url":"https://api.github.com/users/foglamp/followers","following_url":"https://api.github.com/users/foglamp/following{/other_user}","gists_url":"https://api.github.com/users/foglamp/gists{/gist_id}","starred_url":"https://api.github.com/users/foglamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foglamp/subscriptions","organizations_url":"https://api.github.com/users/foglamp/orgs","repos_url":"https://api.github.com/users/foglamp/repos","events_url":"https://api.github.com/users/foglamp/events{/privacy}","received_events_url":"https://api.github.com/users/foglamp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/foglamp/FogLAMP","description":"An open source platform for the Internet of Things, it acts as an edge gateway between sensor devices and cloud storage systems","fork":false,"url":"https://api.github.com/repos/foglamp/FogLAMP","forks_url":"https://api.github.com/repos/foglamp/FogLAMP/forks","keys_url":"https://api.github.com/repos/foglamp/FogLAMP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foglamp/FogLAMP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foglamp/FogLAMP/teams","hooks_url":"https://api.github.com/repos/foglamp/FogLAMP/hooks","issue_events_url":"https://api.github.com/repos/foglamp/FogLAMP/issues/events{/number}","events_url":"https://api.github.com/repos/foglamp/FogLAMP/events","assignees_url":"https://api.github.com/repos/foglamp/FogLAMP/assignees{/user}","branches_url":"https://api.github.com/repos/foglamp/FogLAMP/branches{/branch}","tags_url":"https://api.github.com/repos/foglamp/FogLAMP/tags","blobs_url":"https://api.github.com/repos/foglamp/FogLAMP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foglamp/FogLAMP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foglamp/FogLAMP/git/refs{/sha}","trees_url":"https://api.github.com/repos/foglamp/FogLAMP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foglamp/FogLAMP/statuses/{sha}","languages_url":"https://api.github.com/repos/foglamp/FogLAMP/languages","stargazers_url":"https://api.github.com/repos/foglamp/FogLAMP/stargazers","contributors_url":"https://api.github.com/repos/foglamp/FogLAMP/contributors","subscribers_url":"https://api.github.com/repos/foglamp/FogLAMP/subscribers","subscription_url":"https://api.github.com/repos/foglamp/FogLAMP/subscription","commits_url":"https://api.github.com/repos/foglamp/FogLAMP/commits{/sha}","git_commits_url":"https://api.github.com/repos/foglamp/FogLAMP/git/commits{/sha}","comments_url":"https://api.github.com/repos/foglamp/FogLAMP/comments{/number}","issue_comment_url":"https://api.github.com/repos/foglamp/FogLAMP/issues/comments{/number}","contents_url":"https://api.github.com/repos/foglamp/FogLAMP/contents/{+path}","compare_url":"https://api.github.com/repos/foglamp/FogLAMP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foglamp/FogLAMP/merges","archive_url":"https://api.github.com/repos/foglamp/FogLAMP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foglamp/FogLAMP/downloads","issues_url":"https://api.github.com/repos/foglamp/FogLAMP/issues{/number}","pulls_url":"https://api.github.com/repos/foglamp/FogLAMP/pulls{/number}","milestones_url":"https://api.github.com/repos/foglamp/FogLAMP/milestones{/number}","notifications_url":"https://api.github.com/repos/foglamp/FogLAMP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foglamp/FogLAMP/labels{/name}","releases_url":"https://api.github.com/repos/foglamp/FogLAMP/releases{/id}","deployments_url":"https://api.github.com/repos/foglamp/FogLAMP/deployments","created_at":"2017-04-20T16:35:27Z","updated_at":"2017-12-18T17:00:09Z","pushed_at":"2017-12-20T13:03:41Z","git_url":"git://github.com/foglamp/FogLAMP.git","ssh_url":"git@github.com:foglamp/FogLAMP.git","clone_url":"https://github.com/foglamp/FogLAMP.git","svn_url":"https://github.com/foglamp/FogLAMP","homepage":"http://foglamp.readthedocs.io/","size":10570,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":12,"open_issues":7,"watchers":9,"default_branch":"develop"}},"base":{"label":"foglamp:develop","ref":"develop","sha":"05e41d55f4fc1a44b6d96c987c86dec7bf08b360","user":{"login":"foglamp","id":27822234,"avatar_url":"https://avatars0.githubusercontent.com/u/27822234?v=4","gravatar_id":"","url":"https://api.github.com/users/foglamp","html_url":"https://github.com/foglamp","followers_url":"https://api.github.com/users/foglamp/followers","following_url":"https://api.github.com/users/foglamp/following{/other_user}","gists_url":"https://api.github.com/users/foglamp/gists{/gist_id}","starred_url":"https://api.github.com/users/foglamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foglamp/subscriptions","organizations_url":"https://api.github.com/users/foglamp/orgs","repos_url":"https://api.github.com/users/foglamp/repos","events_url":"https://api.github.com/users/foglamp/events{/privacy}","received_events_url":"https://api.github.com/users/foglamp/received_events","type":"Organization","site_admin":false},"repo":{"id":88887957,"name":"FogLAMP","full_name":"foglamp/FogLAMP","owner":{"login":"foglamp","id":27822234,"avatar_url":"https://avatars0.githubusercontent.com/u/27822234?v=4","gravatar_id":"","url":"https://api.github.com/users/foglamp","html_url":"https://github.com/foglamp","followers_url":"https://api.github.com/users/foglamp/followers","following_url":"https://api.github.com/users/foglamp/following{/other_user}","gists_url":"https://api.github.com/users/foglamp/gists{/gist_id}","starred_url":"https://api.github.com/users/foglamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foglamp/subscriptions","organizations_url":"https://api.github.com/users/foglamp/orgs","repos_url":"https://api.github.com/users/foglamp/repos","events_url":"https://api.github.com/users/foglamp/events{/privacy}","received_events_url":"https://api.github.com/users/foglamp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/foglamp/FogLAMP","description":"An open source platform for the Internet of Things, it acts as an edge gateway between sensor devices and cloud storage systems","fork":false,"url":"https://api.github.com/repos/foglamp/FogLAMP","forks_url":"https://api.github.com/repos/foglamp/FogLAMP/forks","keys_url":"https://api.github.com/repos/foglamp/FogLAMP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foglamp/FogLAMP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foglamp/FogLAMP/teams","hooks_url":"https://api.github.com/repos/foglamp/FogLAMP/hooks","issue_events_url":"https://api.github.com/repos/foglamp/FogLAMP/issues/events{/number}","events_url":"https://api.github.com/repos/foglamp/FogLAMP/events","assignees_url":"https://api.github.com/repos/foglamp/FogLAMP/assignees{/user}","branches_url":"https://api.github.com/repos/foglamp/FogLAMP/branches{/branch}","tags_url":"https://api.github.com/repos/foglamp/FogLAMP/tags","blobs_url":"https://api.github.com/repos/foglamp/FogLAMP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foglamp/FogLAMP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foglamp/FogLAMP/git/refs{/sha}","trees_url":"https://api.github.com/repos/foglamp/FogLAMP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foglamp/FogLAMP/statuses/{sha}","languages_url":"https://api.github.com/repos/foglamp/FogLAMP/languages","stargazers_url":"https://api.github.com/repos/foglamp/FogLAMP/stargazers","contributors_url":"https://api.github.com/repos/foglamp/FogLAMP/contributors","subscribers_url":"https://api.github.com/repos/foglamp/FogLAMP/subscribers","subscription_url":"https://api.github.com/repos/foglamp/FogLAMP/subscription","commits_url":"https://api.github.com/repos/foglamp/FogLAMP/commits{/sha}","git_commits_url":"https://api.github.com/repos/foglamp/FogLAMP/git/commits{/sha}","comments_url":"https://api.github.com/repos/foglamp/FogLAMP/comments{/number}","issue_comment_url":"https://api.github.com/repos/foglamp/FogLAMP/issues/comments{/number}","contents_url":"https://api.github.com/repos/foglamp/FogLAMP/contents/{+path}","compare_url":"https://api.github.com/repos/foglamp/FogLAMP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foglamp/FogLAMP/merges","archive_url":"https://api.github.com/repos/foglamp/FogLAMP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foglamp/FogLAMP/downloads","issues_url":"https://api.github.com/repos/foglamp/FogLAMP/issues{/number}","pulls_url":"https://api.github.com/repos/foglamp/FogLAMP/pulls{/number}","milestones_url":"https://api.github.com/repos/foglamp/FogLAMP/milestones{/number}","notifications_url":"https://api.github.com/repos/foglamp/FogLAMP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foglamp/FogLAMP/labels{/name}","releases_url":"https://api.github.com/repos/foglamp/FogLAMP/releases{/id}","deployments_url":"https://api.github.com/repos/foglamp/FogLAMP/deployments","created_at":"2017-04-20T16:35:27Z","updated_at":"2017-12-18T17:00:09Z","pushed_at":"2017-12-20T13:03:41Z","git_url":"git://github.com/foglamp/FogLAMP.git","ssh_url":"git@github.com:foglamp/FogLAMP.git","clone_url":"https://github.com/foglamp/FogLAMP.git","svn_url":"https://github.com/foglamp/FogLAMP","homepage":"http://foglamp.readthedocs.io/","size":10570,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":12,"open_issues":7,"watchers":9,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/foglamp/FogLAMP/pulls/392"},"html":{"href":"https://github.com/foglamp/FogLAMP/pull/392"},"issue":{"href":"https://api.github.com/repos/foglamp/FogLAMP/issues/392"},"comments":{"href":"https://api.github.com/repos/foglamp/FogLAMP/issues/392/comments"},"review_comments":{"href":"https://api.github.com/repos/foglamp/FogLAMP/pulls/392/comments"},"review_comment":{"href":"https://api.github.com/repos/foglamp/FogLAMP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/foglamp/FogLAMP/pulls/392/commits"},"statuses":{"href":"https://api.github.com/repos/foglamp/FogLAMP/statuses/c65c84e80c4dab074f975e03cd7be4994e4a3ccf"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ashish-jabble"}}