{"action":"created","comment":{"url":"https://api.github.com/repos/6fusion/vmware-collector/pulls/comments/62860025","id":62860025,"diff_hunk":"@@ -0,0 +1,113 @@\n+require 'uri'\n+require 'securerandom'\n+\n+require 'global_configuration'\n+require 'logging'\n+require 'vsphere_session'\n+require 'metrics_collector'\n+require 'infrastructure_collector'\n+require 'inventory_collector'\n+require 'uc6_connector'\n+require 'interval_time'\n+\n+class CollectorSyncronization\n+  using IntervalTime\n+  include GlobalConfiguration\n+  include Logging\n+  include VSphere\n+\n+  def initialize\n+    @environment = ENV['METER_ENV'] || 'development'\n+    @configuration = GlobalConfiguration::GlobalConfig.instance\n+  end\n+\n+  def sync_data\n+    start_sync if access_granted?\n+  end\n+\n+  private\n+\n+  def access_granted?\n+    @configuration[:verified_api_connection] && @configuration[:verified_vsphere_connection]\n+  end\n+\n+  def start_sync\n+    begin\n+      logger.debug \"On Start Sync\"","path":"lib/collector_syncronization.rb","position":36,"original_position":36,"commit_id":"d90c2eb47f50740d8e744b1a288107301c041f41","original_commit_id":"d90c2eb47f50740d8e744b1a288107301c041f41","user":{"login":"rvindas-igd","id":8330613,"avatar_url":"https://avatars.githubusercontent.com/u/8330613?v=3","gravatar_id":"","url":"https://api.github.com/users/rvindas-igd","html_url":"https://github.com/rvindas-igd","followers_url":"https://api.github.com/users/rvindas-igd/followers","following_url":"https://api.github.com/users/rvindas-igd/following{/other_user}","gists_url":"https://api.github.com/users/rvindas-igd/gists{/gist_id}","starred_url":"https://api.github.com/users/rvindas-igd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvindas-igd/subscriptions","organizations_url":"https://api.github.com/users/rvindas-igd/orgs","repos_url":"https://api.github.com/users/rvindas-igd/repos","events_url":"https://api.github.com/users/rvindas-igd/events{/privacy}","received_events_url":"https://api.github.com/users/rvindas-igd/received_events","type":"User","site_admin":false},"body":"Also, I would use a more informative message like `Synchronization started...` or `Syncing items...` or a similar message.","created_at":"2016-05-11T14:38:08Z","updated_at":"2016-05-11T14:38:08Z","html_url":"https://github.com/6fusion/vmware-collector/pull/6#discussion_r62860025","pull_request_url":"https://api.github.com/repos/6fusion/vmware-collector/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/6fusion/vmware-collector/pulls/comments/62860025"},"html":{"href":"https://github.com/6fusion/vmware-collector/pull/6#discussion_r62860025"},"pull_request":{"href":"https://api.github.com/repos/6fusion/vmware-collector/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/6fusion/vmware-collector/pulls/6","id":69673128,"html_url":"https://github.com/6fusion/vmware-collector/pull/6","diff_url":"https://github.com/6fusion/vmware-collector/pull/6.diff","patch_url":"https://github.com/6fusion/vmware-collector/pull/6.patch","issue_url":"https://api.github.com/repos/6fusion/vmware-collector/issues/6","number":6,"state":"open","locked":false,"title":"Use custom_id field as there is not a virtual_name field","user":{"login":"fernandacoto","id":4039322,"avatar_url":"https://avatars.githubusercontent.com/u/4039322?v=3","gravatar_id":"","url":"https://api.github.com/users/fernandacoto","html_url":"https://github.com/fernandacoto","followers_url":"https://api.github.com/users/fernandacoto/followers","following_url":"https://api.github.com/users/fernandacoto/following{/other_user}","gists_url":"https://api.github.com/users/fernandacoto/gists{/gist_id}","starred_url":"https://api.github.com/users/fernandacoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fernandacoto/subscriptions","organizations_url":"https://api.github.com/users/fernandacoto/orgs","repos_url":"https://api.github.com/users/fernandacoto/repos","events_url":"https://api.github.com/users/fernandacoto/events{/privacy}","received_events_url":"https://api.github.com/users/fernandacoto/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-11T13:37:16Z","updated_at":"2016-05-11T14:38:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"742e77be92e4d513eaa6150e77f5634d0bb31664","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/6fusion/vmware-collector/pulls/6/commits","review_comments_url":"https://api.github.com/repos/6fusion/vmware-collector/pulls/6/comments","review_comment_url":"https://api.github.com/repos/6fusion/vmware-collector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/6fusion/vmware-collector/issues/6/comments","statuses_url":"https://api.github.com/repos/6fusion/vmware-collector/statuses/d90c2eb47f50740d8e744b1a288107301c041f41","head":{"label":"6fusion:US522","ref":"US522","sha":"d90c2eb47f50740d8e744b1a288107301c041f41","user":{"login":"6fusion","id":1864001,"avatar_url":"https://avatars.githubusercontent.com/u/1864001?v=3","gravatar_id":"","url":"https://api.github.com/users/6fusion","html_url":"https://github.com/6fusion","followers_url":"https://api.github.com/users/6fusion/followers","following_url":"https://api.github.com/users/6fusion/following{/other_user}","gists_url":"https://api.github.com/users/6fusion/gists{/gist_id}","starred_url":"https://api.github.com/users/6fusion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6fusion/subscriptions","organizations_url":"https://api.github.com/users/6fusion/orgs","repos_url":"https://api.github.com/users/6fusion/repos","events_url":"https://api.github.com/users/6fusion/events{/privacy}","received_events_url":"https://api.github.com/users/6fusion/received_events","type":"Organization","site_admin":false},"repo":{"id":55718118,"name":"vmware-collector","full_name":"6fusion/vmware-collector","owner":{"login":"6fusion","id":1864001,"avatar_url":"https://avatars.githubusercontent.com/u/1864001?v=3","gravatar_id":"","url":"https://api.github.com/users/6fusion","html_url":"https://github.com/6fusion","followers_url":"https://api.github.com/users/6fusion/followers","following_url":"https://api.github.com/users/6fusion/following{/other_user}","gists_url":"https://api.github.com/users/6fusion/gists{/gist_id}","starred_url":"https://api.github.com/users/6fusion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6fusion/subscriptions","organizations_url":"https://api.github.com/users/6fusion/orgs","repos_url":"https://api.github.com/users/6fusion/repos","events_url":"https://api.github.com/users/6fusion/events{/privacy}","received_events_url":"https://api.github.com/users/6fusion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/6fusion/vmware-collector","description":"","fork":false,"url":"https://api.github.com/repos/6fusion/vmware-collector","forks_url":"https://api.github.com/repos/6fusion/vmware-collector/forks","keys_url":"https://api.github.com/repos/6fusion/vmware-collector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/6fusion/vmware-collector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/6fusion/vmware-collector/teams","hooks_url":"https://api.github.com/repos/6fusion/vmware-collector/hooks","issue_events_url":"https://api.github.com/repos/6fusion/vmware-collector/issues/events{/number}","events_url":"https://api.github.com/repos/6fusion/vmware-collector/events","assignees_url":"https://api.github.com/repos/6fusion/vmware-collector/assignees{/user}","branches_url":"https://api.github.com/repos/6fusion/vmware-collector/branches{/branch}","tags_url":"https://api.github.com/repos/6fusion/vmware-collector/tags","blobs_url":"https://api.github.com/repos/6fusion/vmware-collector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/6fusion/vmware-collector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/6fusion/vmware-collector/git/refs{/sha}","trees_url":"https://api.github.com/repos/6fusion/vmware-collector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/6fusion/vmware-collector/statuses/{sha}","languages_url":"https://api.github.com/repos/6fusion/vmware-collector/languages","stargazers_url":"https://api.github.com/repos/6fusion/vmware-collector/stargazers","contributors_url":"https://api.github.com/repos/6fusion/vmware-collector/contributors","subscribers_url":"https://api.github.com/repos/6fusion/vmware-collector/subscribers","subscription_url":"https://api.github.com/repos/6fusion/vmware-collector/subscription","commits_url":"https://api.github.com/repos/6fusion/vmware-collector/commits{/sha}","git_commits_url":"https://api.github.com/repos/6fusion/vmware-collector/git/commits{/sha}","comments_url":"https://api.github.com/repos/6fusion/vmware-collector/comments{/number}","issue_comment_url":"https://api.github.com/repos/6fusion/vmware-collector/issues/comments{/number}","contents_url":"https://api.github.com/repos/6fusion/vmware-collector/contents/{+path}","compare_url":"https://api.github.com/repos/6fusion/vmware-collector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/6fusion/vmware-collector/merges","archive_url":"https://api.github.com/repos/6fusion/vmware-collector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/6fusion/vmware-collector/downloads","issues_url":"https://api.github.com/repos/6fusion/vmware-collector/issues{/number}","pulls_url":"https://api.github.com/repos/6fusion/vmware-collector/pulls{/number}","milestones_url":"https://api.github.com/repos/6fusion/vmware-collector/milestones{/number}","notifications_url":"https://api.github.com/repos/6fusion/vmware-collector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/6fusion/vmware-collector/labels{/name}","releases_url":"https://api.github.com/repos/6fusion/vmware-collector/releases{/id}","deployments_url":"https://api.github.com/repos/6fusion/vmware-collector/deployments","created_at":"2016-04-07T18:26:48Z","updated_at":"2016-04-18T14:28:49Z","pushed_at":"2016-05-11T14:04:43Z","git_url":"git://github.com/6fusion/vmware-collector.git","ssh_url":"git@github.com:6fusion/vmware-collector.git","clone_url":"https://github.com/6fusion/vmware-collector.git","svn_url":"https://github.com/6fusion/vmware-collector","homepage":null,"size":391,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"6fusion:develop","ref":"develop","sha":"3e9c83f649b614c670317bfe9991339e73353cb8","user":{"login":"6fusion","id":1864001,"avatar_url":"https://avatars.githubusercontent.com/u/1864001?v=3","gravatar_id":"","url":"https://api.github.com/users/6fusion","html_url":"https://github.com/6fusion","followers_url":"https://api.github.com/users/6fusion/followers","following_url":"https://api.github.com/users/6fusion/following{/other_user}","gists_url":"https://api.github.com/users/6fusion/gists{/gist_id}","starred_url":"https://api.github.com/users/6fusion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6fusion/subscriptions","organizations_url":"https://api.github.com/users/6fusion/orgs","repos_url":"https://api.github.com/users/6fusion/repos","events_url":"https://api.github.com/users/6fusion/events{/privacy}","received_events_url":"https://api.github.com/users/6fusion/received_events","type":"Organization","site_admin":false},"repo":{"id":55718118,"name":"vmware-collector","full_name":"6fusion/vmware-collector","owner":{"login":"6fusion","id":1864001,"avatar_url":"https://avatars.githubusercontent.com/u/1864001?v=3","gravatar_id":"","url":"https://api.github.com/users/6fusion","html_url":"https://github.com/6fusion","followers_url":"https://api.github.com/users/6fusion/followers","following_url":"https://api.github.com/users/6fusion/following{/other_user}","gists_url":"https://api.github.com/users/6fusion/gists{/gist_id}","starred_url":"https://api.github.com/users/6fusion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6fusion/subscriptions","organizations_url":"https://api.github.com/users/6fusion/orgs","repos_url":"https://api.github.com/users/6fusion/repos","events_url":"https://api.github.com/users/6fusion/events{/privacy}","received_events_url":"https://api.github.com/users/6fusion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/6fusion/vmware-collector","description":"","fork":false,"url":"https://api.github.com/repos/6fusion/vmware-collector","forks_url":"https://api.github.com/repos/6fusion/vmware-collector/forks","keys_url":"https://api.github.com/repos/6fusion/vmware-collector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/6fusion/vmware-collector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/6fusion/vmware-collector/teams","hooks_url":"https://api.github.com/repos/6fusion/vmware-collector/hooks","issue_events_url":"https://api.github.com/repos/6fusion/vmware-collector/issues/events{/number}","events_url":"https://api.github.com/repos/6fusion/vmware-collector/events","assignees_url":"https://api.github.com/repos/6fusion/vmware-collector/assignees{/user}","branches_url":"https://api.github.com/repos/6fusion/vmware-collector/branches{/branch}","tags_url":"https://api.github.com/repos/6fusion/vmware-collector/tags","blobs_url":"https://api.github.com/repos/6fusion/vmware-collector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/6fusion/vmware-collector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/6fusion/vmware-collector/git/refs{/sha}","trees_url":"https://api.github.com/repos/6fusion/vmware-collector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/6fusion/vmware-collector/statuses/{sha}","languages_url":"https://api.github.com/repos/6fusion/vmware-collector/languages","stargazers_url":"https://api.github.com/repos/6fusion/vmware-collector/stargazers","contributors_url":"https://api.github.com/repos/6fusion/vmware-collector/contributors","subscribers_url":"https://api.github.com/repos/6fusion/vmware-collector/subscribers","subscription_url":"https://api.github.com/repos/6fusion/vmware-collector/subscription","commits_url":"https://api.github.com/repos/6fusion/vmware-collector/commits{/sha}","git_commits_url":"https://api.github.com/repos/6fusion/vmware-collector/git/commits{/sha}","comments_url":"https://api.github.com/repos/6fusion/vmware-collector/comments{/number}","issue_comment_url":"https://api.github.com/repos/6fusion/vmware-collector/issues/comments{/number}","contents_url":"https://api.github.com/repos/6fusion/vmware-collector/contents/{+path}","compare_url":"https://api.github.com/repos/6fusion/vmware-collector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/6fusion/vmware-collector/merges","archive_url":"https://api.github.com/repos/6fusion/vmware-collector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/6fusion/vmware-collector/downloads","issues_url":"https://api.github.com/repos/6fusion/vmware-collector/issues{/number}","pulls_url":"https://api.github.com/repos/6fusion/vmware-collector/pulls{/number}","milestones_url":"https://api.github.com/repos/6fusion/vmware-collector/milestones{/number}","notifications_url":"https://api.github.com/repos/6fusion/vmware-collector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/6fusion/vmware-collector/labels{/name}","releases_url":"https://api.github.com/repos/6fusion/vmware-collector/releases{/id}","deployments_url":"https://api.github.com/repos/6fusion/vmware-collector/deployments","created_at":"2016-04-07T18:26:48Z","updated_at":"2016-04-18T14:28:49Z","pushed_at":"2016-05-11T14:04:43Z","git_url":"git://github.com/6fusion/vmware-collector.git","ssh_url":"git@github.com:6fusion/vmware-collector.git","clone_url":"https://github.com/6fusion/vmware-collector.git","svn_url":"https://github.com/6fusion/vmware-collector","homepage":null,"size":391,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/6fusion/vmware-collector/pulls/6"},"html":{"href":"https://github.com/6fusion/vmware-collector/pull/6"},"issue":{"href":"https://api.github.com/repos/6fusion/vmware-collector/issues/6"},"comments":{"href":"https://api.github.com/repos/6fusion/vmware-collector/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/6fusion/vmware-collector/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/6fusion/vmware-collector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/6fusion/vmware-collector/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/6fusion/vmware-collector/statuses/d90c2eb47f50740d8e744b1a288107301c041f41"}}}}