{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/liota/pulls/comments/72142892","id":72142892,"diff_hunk":"@@ -53,4 +53,8 @@ def subscribe(self):\n         pass\n \n     def create_metric(self, gw, details, unit, sampling_function, sampling_interval_sec=10, aggregation_size=6):\n+        self.publish_unit(gw, details, unit)","path":"liota/dcc/dcc_base.py","position":4,"original_position":4,"commit_id":"38c4291175964f106465413a78d59b06ae3fe993","original_commit_id":"38c4291175964f106465413a78d59b06ae3fe993","user":{"login":"bfrggit","id":2565735,"avatar_url":"https://avatars.githubusercontent.com/u/2565735?v=3","gravatar_id":"","url":"https://api.github.com/users/bfrggit","html_url":"https://github.com/bfrggit","followers_url":"https://api.github.com/users/bfrggit/followers","following_url":"https://api.github.com/users/bfrggit/following{/other_user}","gists_url":"https://api.github.com/users/bfrggit/gists{/gist_id}","starred_url":"https://api.github.com/users/bfrggit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfrggit/subscriptions","organizations_url":"https://api.github.com/users/bfrggit/orgs","repos_url":"https://api.github.com/users/bfrggit/repos","events_url":"https://api.github.com/users/bfrggit/events{/privacy}","received_events_url":"https://api.github.com/users/bfrggit/received_events","type":"User","site_admin":false},"body":"Maybe, but that would require a change to the interface because optional parameters cannot go before mandatory ones. I would say, that sounds reasonable but probably not a high priority one now.","created_at":"2016-07-25T20:55:16Z","updated_at":"2016-07-25T20:55:16Z","html_url":"https://github.com/vmware/liota/pull/14#discussion_r72142892","pull_request_url":"https://api.github.com/repos/vmware/liota/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/vmware/liota/pulls/comments/72142892"},"html":{"href":"https://github.com/vmware/liota/pull/14#discussion_r72142892"},"pull_request":{"href":"https://api.github.com/repos/vmware/liota/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/liota/pulls/14","id":78514735,"html_url":"https://github.com/vmware/liota/pull/14","diff_url":"https://github.com/vmware/liota/pull/14.diff","patch_url":"https://github.com/vmware/liota/pull/14.patch","issue_url":"https://api.github.com/repos/vmware/liota/issues/14","number":14,"state":"open","locked":false,"title":"SI support for vROps DCC","user":{"login":"bfrggit","id":2565735,"avatar_url":"https://avatars.githubusercontent.com/u/2565735?v=3","gravatar_id":"","url":"https://api.github.com/users/bfrggit","html_url":"https://github.com/bfrggit","followers_url":"https://api.github.com/users/bfrggit/followers","following_url":"https://api.github.com/users/bfrggit/following{/other_user}","gists_url":"https://api.github.com/users/bfrggit/gists{/gist_id}","starred_url":"https://api.github.com/users/bfrggit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfrggit/subscriptions","organizations_url":"https://api.github.com/users/bfrggit/orgs","repos_url":"https://api.github.com/users/bfrggit/repos","events_url":"https://api.github.com/users/bfrggit/events{/privacy}","received_events_url":"https://api.github.com/users/bfrggit/received_events","type":"User","site_admin":false},"body":"Included in this pull request are\r\n1. `liota/dcc/dcc_base.py`\r\n2. `liota/dcc/vrops.py`\r\n3. `liota/utilities/si_unit.py`\r\n\r\nWork done on those files\r\n1. Added an abstract method `publish_unit` for the base DCC class.\r\n2. Added implementation for this method in vROps. Units are sent to vROps using `set_properties`.\r\n3. Added an `si_unit.py` in utilities, that contains necessary methods to parse unit into prefix and name strings. Testing codes are provided to demonstrate the parser works for units listed in SI standard documents, and the output names are consistent with those in SI documents. For derived units not listed in the documents, we deliver our best effort to parse them.\r\n4. Improved formatting in `vrops.py` for two methods - they were indented with two spaces per level, and I changed that two four spaces.\r\n\r\nTested working in my VM.\r\n\r\nTwo units not supported by pint currently:\r\n1. kat (You will have to use 'mol / s')\r\n2. Sv (It is actually supported but it is implemented as an alias of Gy. Pint will always output its name as Gy for *gray* instead of Sv, though.)","created_at":"2016-07-22T17:48:13Z","updated_at":"2016-07-25T20:55:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14cbd638553a75bfbc264ead142f99bcf44af127","assignee":{"login":"KohliDev","id":5468034,"avatar_url":"https://avatars.githubusercontent.com/u/5468034?v=3","gravatar_id":"","url":"https://api.github.com/users/KohliDev","html_url":"https://github.com/KohliDev","followers_url":"https://api.github.com/users/KohliDev/followers","following_url":"https://api.github.com/users/KohliDev/following{/other_user}","gists_url":"https://api.github.com/users/KohliDev/gists{/gist_id}","starred_url":"https://api.github.com/users/KohliDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KohliDev/subscriptions","organizations_url":"https://api.github.com/users/KohliDev/orgs","repos_url":"https://api.github.com/users/KohliDev/repos","events_url":"https://api.github.com/users/KohliDev/events{/privacy}","received_events_url":"https://api.github.com/users/KohliDev/received_events","type":"User","site_admin":false},"assignees":[{"login":"KohliDev","id":5468034,"avatar_url":"https://avatars.githubusercontent.com/u/5468034?v=3","gravatar_id":"","url":"https://api.github.com/users/KohliDev","html_url":"https://github.com/KohliDev","followers_url":"https://api.github.com/users/KohliDev/followers","following_url":"https://api.github.com/users/KohliDev/following{/other_user}","gists_url":"https://api.github.com/users/KohliDev/gists{/gist_id}","starred_url":"https://api.github.com/users/KohliDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KohliDev/subscriptions","organizations_url":"https://api.github.com/users/KohliDev/orgs","repos_url":"https://api.github.com/users/KohliDev/repos","events_url":"https://api.github.com/users/KohliDev/events{/privacy}","received_events_url":"https://api.github.com/users/KohliDev/received_events","type":"User","site_admin":false},{"login":"pmasrani","id":17191813,"avatar_url":"https://avatars.githubusercontent.com/u/17191813?v=3","gravatar_id":"","url":"https://api.github.com/users/pmasrani","html_url":"https://github.com/pmasrani","followers_url":"https://api.github.com/users/pmasrani/followers","following_url":"https://api.github.com/users/pmasrani/following{/other_user}","gists_url":"https://api.github.com/users/pmasrani/gists{/gist_id}","starred_url":"https://api.github.com/users/pmasrani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmasrani/subscriptions","organizations_url":"https://api.github.com/users/pmasrani/orgs","repos_url":"https://api.github.com/users/pmasrani/repos","events_url":"https://api.github.com/users/pmasrani/events{/privacy}","received_events_url":"https://api.github.com/users/pmasrani/received_events","type":"User","site_admin":false},{"login":"winniex1","id":17712390,"avatar_url":"https://avatars.githubusercontent.com/u/17712390?v=3","gravatar_id":"","url":"https://api.github.com/users/winniex1","html_url":"https://github.com/winniex1","followers_url":"https://api.github.com/users/winniex1/followers","following_url":"https://api.github.com/users/winniex1/following{/other_user}","gists_url":"https://api.github.com/users/winniex1/gists{/gist_id}","starred_url":"https://api.github.com/users/winniex1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winniex1/subscriptions","organizations_url":"https://api.github.com/users/winniex1/orgs","repos_url":"https://api.github.com/users/winniex1/repos","events_url":"https://api.github.com/users/winniex1/events{/privacy}","received_events_url":"https://api.github.com/users/winniex1/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/liota/pulls/14/commits","review_comments_url":"https://api.github.com/repos/vmware/liota/pulls/14/comments","review_comment_url":"https://api.github.com/repos/vmware/liota/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/liota/issues/14/comments","statuses_url":"https://api.github.com/repos/vmware/liota/statuses/38c4291175964f106465413a78d59b06ae3fe993","head":{"label":"bfrggit:si","ref":"si","sha":"38c4291175964f106465413a78d59b06ae3fe993","user":{"login":"bfrggit","id":2565735,"avatar_url":"https://avatars.githubusercontent.com/u/2565735?v=3","gravatar_id":"","url":"https://api.github.com/users/bfrggit","html_url":"https://github.com/bfrggit","followers_url":"https://api.github.com/users/bfrggit/followers","following_url":"https://api.github.com/users/bfrggit/following{/other_user}","gists_url":"https://api.github.com/users/bfrggit/gists{/gist_id}","starred_url":"https://api.github.com/users/bfrggit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfrggit/subscriptions","organizations_url":"https://api.github.com/users/bfrggit/orgs","repos_url":"https://api.github.com/users/bfrggit/repos","events_url":"https://api.github.com/users/bfrggit/events{/privacy}","received_events_url":"https://api.github.com/users/bfrggit/received_events","type":"User","site_admin":false},"repo":{"id":62160182,"name":"liota","full_name":"bfrggit/liota","owner":{"login":"bfrggit","id":2565735,"avatar_url":"https://avatars.githubusercontent.com/u/2565735?v=3","gravatar_id":"","url":"https://api.github.com/users/bfrggit","html_url":"https://github.com/bfrggit","followers_url":"https://api.github.com/users/bfrggit/followers","following_url":"https://api.github.com/users/bfrggit/following{/other_user}","gists_url":"https://api.github.com/users/bfrggit/gists{/gist_id}","starred_url":"https://api.github.com/users/bfrggit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfrggit/subscriptions","organizations_url":"https://api.github.com/users/bfrggit/orgs","repos_url":"https://api.github.com/users/bfrggit/repos","events_url":"https://api.github.com/users/bfrggit/events{/privacy}","received_events_url":"https://api.github.com/users/bfrggit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bfrggit/liota","description":null,"fork":true,"url":"https://api.github.com/repos/bfrggit/liota","forks_url":"https://api.github.com/repos/bfrggit/liota/forks","keys_url":"https://api.github.com/repos/bfrggit/liota/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bfrggit/liota/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bfrggit/liota/teams","hooks_url":"https://api.github.com/repos/bfrggit/liota/hooks","issue_events_url":"https://api.github.com/repos/bfrggit/liota/issues/events{/number}","events_url":"https://api.github.com/repos/bfrggit/liota/events","assignees_url":"https://api.github.com/repos/bfrggit/liota/assignees{/user}","branches_url":"https://api.github.com/repos/bfrggit/liota/branches{/branch}","tags_url":"https://api.github.com/repos/bfrggit/liota/tags","blobs_url":"https://api.github.com/repos/bfrggit/liota/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bfrggit/liota/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bfrggit/liota/git/refs{/sha}","trees_url":"https://api.github.com/repos/bfrggit/liota/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bfrggit/liota/statuses/{sha}","languages_url":"https://api.github.com/repos/bfrggit/liota/languages","stargazers_url":"https://api.github.com/repos/bfrggit/liota/stargazers","contributors_url":"https://api.github.com/repos/bfrggit/liota/contributors","subscribers_url":"https://api.github.com/repos/bfrggit/liota/subscribers","subscription_url":"https://api.github.com/repos/bfrggit/liota/subscription","commits_url":"https://api.github.com/repos/bfrggit/liota/commits{/sha}","git_commits_url":"https://api.github.com/repos/bfrggit/liota/git/commits{/sha}","comments_url":"https://api.github.com/repos/bfrggit/liota/comments{/number}","issue_comment_url":"https://api.github.com/repos/bfrggit/liota/issues/comments{/number}","contents_url":"https://api.github.com/repos/bfrggit/liota/contents/{+path}","compare_url":"https://api.github.com/repos/bfrggit/liota/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bfrggit/liota/merges","archive_url":"https://api.github.com/repos/bfrggit/liota/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bfrggit/liota/downloads","issues_url":"https://api.github.com/repos/bfrggit/liota/issues{/number}","pulls_url":"https://api.github.com/repos/bfrggit/liota/pulls{/number}","milestones_url":"https://api.github.com/repos/bfrggit/liota/milestones{/number}","notifications_url":"https://api.github.com/repos/bfrggit/liota/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bfrggit/liota/labels{/name}","releases_url":"https://api.github.com/repos/bfrggit/liota/releases{/id}","deployments_url":"https://api.github.com/repos/bfrggit/liota/deployments","created_at":"2016-06-28T17:14:23Z","updated_at":"2016-06-28T17:14:24Z","pushed_at":"2016-07-21T23:06:09Z","git_url":"git://github.com/bfrggit/liota.git","ssh_url":"git@github.com:bfrggit/liota.git","clone_url":"https://github.com/bfrggit/liota.git","svn_url":"https://github.com/bfrggit/liota","homepage":null,"size":135,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vmware:master","ref":"master","sha":"044051cd84655835a905e4fcbb8d4c38760c6b1e","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":51544954,"name":"liota","full_name":"vmware/liota","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/liota","description":"","fork":false,"url":"https://api.github.com/repos/vmware/liota","forks_url":"https://api.github.com/repos/vmware/liota/forks","keys_url":"https://api.github.com/repos/vmware/liota/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/liota/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/liota/teams","hooks_url":"https://api.github.com/repos/vmware/liota/hooks","issue_events_url":"https://api.github.com/repos/vmware/liota/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/liota/events","assignees_url":"https://api.github.com/repos/vmware/liota/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/liota/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/liota/tags","blobs_url":"https://api.github.com/repos/vmware/liota/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/liota/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/liota/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/liota/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/liota/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/liota/languages","stargazers_url":"https://api.github.com/repos/vmware/liota/stargazers","contributors_url":"https://api.github.com/repos/vmware/liota/contributors","subscribers_url":"https://api.github.com/repos/vmware/liota/subscribers","subscription_url":"https://api.github.com/repos/vmware/liota/subscription","commits_url":"https://api.github.com/repos/vmware/liota/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/liota/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/liota/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/liota/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/liota/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/liota/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/liota/merges","archive_url":"https://api.github.com/repos/vmware/liota/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/liota/downloads","issues_url":"https://api.github.com/repos/vmware/liota/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/liota/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/liota/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/liota/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/liota/labels{/name}","releases_url":"https://api.github.com/repos/vmware/liota/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/liota/deployments","created_at":"2016-02-11T20:31:26Z","updated_at":"2016-07-22T15:05:58Z","pushed_at":"2016-07-22T17:48:13Z","git_url":"git://github.com/vmware/liota.git","ssh_url":"git@github.com:vmware/liota.git","clone_url":"https://github.com/vmware/liota.git","svn_url":"https://github.com/vmware/liota","homepage":null,"size":124,"stargazers_count":175,"watchers_count":175,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":2,"forks":47,"open_issues":2,"watchers":175,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/liota/pulls/14"},"html":{"href":"https://github.com/vmware/liota/pull/14"},"issue":{"href":"https://api.github.com/repos/vmware/liota/issues/14"},"comments":{"href":"https://api.github.com/repos/vmware/liota/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/liota/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/liota/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/liota/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/liota/statuses/38c4291175964f106465413a78d59b06ae3fe993"}}}}
{"actor":{"display_login":"bfrggit"}}