{"action":"created","comment":{"url":"https://api.github.com/repos/akrzos/cfme-performance/pulls/comments/71454316","id":71454316,"diff_hunk":"@@ -286,6 +287,20 @@ def add_provider(provider):\n \n     logger.debug('Added Provider: {}, Response: {}'.format(provider['name'], response))\n \n+    # Workaround for Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1351253\n+    if provider['type'] == \"ManageIQ::Providers::Microsoft::InfraManager\":\n+        time.sleep(10)\n+        logger.debug('Running rails command for Microsoft InfraManager Workaround')\n+        ssh_client = SSHClient()\n+        command = ('m = ExtManagementSystem.find_by_name \"{}\"; attributes = {{:security_protocol =>'\n+        ' \"{}\"}}; m.update_authentication(:default => {{:userid => \"{}\", :password => \"{}\"}}); '\n+        'm.update_attributes(attributes); m.save; m.authentication_check;'\n+        .format(provider['name'], provider['security_protocol'],\n+            provider['credentials']['username'].replace('\\\\', '\\\\\\\\'),\n+            provider['credentials']['password']))\n+        ssh_client.run_command(\"cd /var/www/miq/vmdb; echo '\" + command + \"'\"\n+            \"| bundle exec bin/rails c 2> /dev/null\")","path":"cfme-performance/utils/providers.py","position":24,"original_position":24,"commit_id":"cbe8b6f6c7fb37fd3c2113d5d66378e3ff3131e7","original_commit_id":"cbe8b6f6c7fb37fd3c2113d5d66378e3ff3131e7","user":{"login":"akrzos","id":6154223,"avatar_url":"https://avatars.githubusercontent.com/u/6154223?v=3","gravatar_id":"","url":"https://api.github.com/users/akrzos","html_url":"https://github.com/akrzos","followers_url":"https://api.github.com/users/akrzos/followers","following_url":"https://api.github.com/users/akrzos/following{/other_user}","gists_url":"https://api.github.com/users/akrzos/gists{/gist_id}","starred_url":"https://api.github.com/users/akrzos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akrzos/subscriptions","organizations_url":"https://api.github.com/users/akrzos/orgs","repos_url":"https://api.github.com/users/akrzos/repos","events_url":"https://api.github.com/users/akrzos/events{/privacy}","received_events_url":"https://api.github.com/users/akrzos/received_events","type":"User","site_admin":false},"body":"Matt I modified it for readability and found I could add the provider without the sleep statement through I am still concerned of a race condition in \"slower\" environments, but I'm not entire sure that is an issue yet.\r\n```python\r\n    # Workaround for Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1351253\r\n    if provider['type'] == \"ManageIQ::Providers::Microsoft::InfraManager\":\r\n        logger.debug('Running rails command for Microsoft InfraManager Workaround')\r\n        ssh_client = SSHClient()\r\n        command = (\r\n            'm = ExtManagementSystem.find_by_name \\'{}\\';'\r\n            'attributes = {{:security_protocol => \\'{}\\'}};'\r\n            'm.update_authentication(:default => {{:userid => \\'{}\\', :password => \\'{}\\'}});'\r\n            'm.update_attributes(attributes);'\r\n            'm.save;'\r\n            'm.authentication_check;'.format(provider['name'], provider['security_protocol'],\r\n                provider['credentials']['username'].replace('\\\\', '\\\\\\\\'),\r\n                provider['credentials']['password']))\r\n        ssh_client.run_rails_console(command, timeout=None, log_less=True)\r\n```\r\n","created_at":"2016-07-20T01:49:20Z","updated_at":"2016-07-20T01:49:20Z","html_url":"https://github.com/akrzos/cfme-performance/pull/32#discussion_r71454316","pull_request_url":"https://api.github.com/repos/akrzos/cfme-performance/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/akrzos/cfme-performance/pulls/comments/71454316"},"html":{"href":"https://github.com/akrzos/cfme-performance/pull/32#discussion_r71454316"},"pull_request":{"href":"https://api.github.com/repos/akrzos/cfme-performance/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/akrzos/cfme-performance/pulls/32","id":78047523,"html_url":"https://github.com/akrzos/cfme-performance/pull/32","diff_url":"https://github.com/akrzos/cfme-performance/pull/32.diff","patch_url":"https://github.com/akrzos/cfme-performance/pull/32.patch","issue_url":"https://api.github.com/repos/akrzos/cfme-performance/issues/32","number":32,"state":"open","locked":false,"title":"Add workaround for Microsoft::InfraManagers","user":{"login":"MattLombana","id":15613422,"avatar_url":"https://avatars.githubusercontent.com/u/15613422?v=3","gravatar_id":"","url":"https://api.github.com/users/MattLombana","html_url":"https://github.com/MattLombana","followers_url":"https://api.github.com/users/MattLombana/followers","following_url":"https://api.github.com/users/MattLombana/following{/other_user}","gists_url":"https://api.github.com/users/MattLombana/gists{/gist_id}","starred_url":"https://api.github.com/users/MattLombana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattLombana/subscriptions","organizations_url":"https://api.github.com/users/MattLombana/orgs","repos_url":"https://api.github.com/users/MattLombana/repos","events_url":"https://api.github.com/users/MattLombana/events{/privacy}","received_events_url":"https://api.github.com/users/MattLombana/received_events","type":"User","site_admin":false},"body":"Workaround for bug: https://bugzilla.redhat.com/show_bug.cgi?id=1351253\r\n    run rails console command\r\n\r\nChange run_rails_console so that 'command' is interpreted literally","created_at":"2016-07-19T20:56:21Z","updated_at":"2016-07-20T01:49:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9653585399af87cd7f2e45dc2dc6b7a389008aee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/akrzos/cfme-performance/pulls/32/commits","review_comments_url":"https://api.github.com/repos/akrzos/cfme-performance/pulls/32/comments","review_comment_url":"https://api.github.com/repos/akrzos/cfme-performance/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akrzos/cfme-performance/issues/32/comments","statuses_url":"https://api.github.com/repos/akrzos/cfme-performance/statuses/cbe8b6f6c7fb37fd3c2113d5d66378e3ff3131e7","head":{"label":"MattLombana:microsoftInfraManager","ref":"microsoftInfraManager","sha":"cbe8b6f6c7fb37fd3c2113d5d66378e3ff3131e7","user":{"login":"MattLombana","id":15613422,"avatar_url":"https://avatars.githubusercontent.com/u/15613422?v=3","gravatar_id":"","url":"https://api.github.com/users/MattLombana","html_url":"https://github.com/MattLombana","followers_url":"https://api.github.com/users/MattLombana/followers","following_url":"https://api.github.com/users/MattLombana/following{/other_user}","gists_url":"https://api.github.com/users/MattLombana/gists{/gist_id}","starred_url":"https://api.github.com/users/MattLombana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattLombana/subscriptions","organizations_url":"https://api.github.com/users/MattLombana/orgs","repos_url":"https://api.github.com/users/MattLombana/repos","events_url":"https://api.github.com/users/MattLombana/events{/privacy}","received_events_url":"https://api.github.com/users/MattLombana/received_events","type":"User","site_admin":false},"repo":{"id":59844632,"name":"cfme-performance","full_name":"MattLombana/cfme-performance","owner":{"login":"MattLombana","id":15613422,"avatar_url":"https://avatars.githubusercontent.com/u/15613422?v=3","gravatar_id":"","url":"https://api.github.com/users/MattLombana","html_url":"https://github.com/MattLombana","followers_url":"https://api.github.com/users/MattLombana/followers","following_url":"https://api.github.com/users/MattLombana/following{/other_user}","gists_url":"https://api.github.com/users/MattLombana/gists{/gist_id}","starred_url":"https://api.github.com/users/MattLombana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattLombana/subscriptions","organizations_url":"https://api.github.com/users/MattLombana/orgs","repos_url":"https://api.github.com/users/MattLombana/repos","events_url":"https://api.github.com/users/MattLombana/events{/privacy}","received_events_url":"https://api.github.com/users/MattLombana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MattLombana/cfme-performance","description":"Collection of Automation/Tools for Performance Analysis/Testing of Cloud Forms/ManageIQ","fork":true,"url":"https://api.github.com/repos/MattLombana/cfme-performance","forks_url":"https://api.github.com/repos/MattLombana/cfme-performance/forks","keys_url":"https://api.github.com/repos/MattLombana/cfme-performance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MattLombana/cfme-performance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MattLombana/cfme-performance/teams","hooks_url":"https://api.github.com/repos/MattLombana/cfme-performance/hooks","issue_events_url":"https://api.github.com/repos/MattLombana/cfme-performance/issues/events{/number}","events_url":"https://api.github.com/repos/MattLombana/cfme-performance/events","assignees_url":"https://api.github.com/repos/MattLombana/cfme-performance/assignees{/user}","branches_url":"https://api.github.com/repos/MattLombana/cfme-performance/branches{/branch}","tags_url":"https://api.github.com/repos/MattLombana/cfme-performance/tags","blobs_url":"https://api.github.com/repos/MattLombana/cfme-performance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MattLombana/cfme-performance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MattLombana/cfme-performance/git/refs{/sha}","trees_url":"https://api.github.com/repos/MattLombana/cfme-performance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MattLombana/cfme-performance/statuses/{sha}","languages_url":"https://api.github.com/repos/MattLombana/cfme-performance/languages","stargazers_url":"https://api.github.com/repos/MattLombana/cfme-performance/stargazers","contributors_url":"https://api.github.com/repos/MattLombana/cfme-performance/contributors","subscribers_url":"https://api.github.com/repos/MattLombana/cfme-performance/subscribers","subscription_url":"https://api.github.com/repos/MattLombana/cfme-performance/subscription","commits_url":"https://api.github.com/repos/MattLombana/cfme-performance/commits{/sha}","git_commits_url":"https://api.github.com/repos/MattLombana/cfme-performance/git/commits{/sha}","comments_url":"https://api.github.com/repos/MattLombana/cfme-performance/comments{/number}","issue_comment_url":"https://api.github.com/repos/MattLombana/cfme-performance/issues/comments{/number}","contents_url":"https://api.github.com/repos/MattLombana/cfme-performance/contents/{+path}","compare_url":"https://api.github.com/repos/MattLombana/cfme-performance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MattLombana/cfme-performance/merges","archive_url":"https://api.github.com/repos/MattLombana/cfme-performance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MattLombana/cfme-performance/downloads","issues_url":"https://api.github.com/repos/MattLombana/cfme-performance/issues{/number}","pulls_url":"https://api.github.com/repos/MattLombana/cfme-performance/pulls{/number}","milestones_url":"https://api.github.com/repos/MattLombana/cfme-performance/milestones{/number}","notifications_url":"https://api.github.com/repos/MattLombana/cfme-performance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MattLombana/cfme-performance/labels{/name}","releases_url":"https://api.github.com/repos/MattLombana/cfme-performance/releases{/id}","deployments_url":"https://api.github.com/repos/MattLombana/cfme-performance/deployments","created_at":"2016-05-27T15:29:12Z","updated_at":"2016-05-27T20:17:12Z","pushed_at":"2016-07-20T01:35:37Z","git_url":"git://github.com/MattLombana/cfme-performance.git","ssh_url":"git@github.com:MattLombana/cfme-performance.git","clone_url":"https://github.com/MattLombana/cfme-performance.git","svn_url":"https://github.com/MattLombana/cfme-performance","homepage":"","size":289,"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":"akrzos:master","ref":"master","sha":"388e957f205eac84e82a48f627901abd716036b0","user":{"login":"akrzos","id":6154223,"avatar_url":"https://avatars.githubusercontent.com/u/6154223?v=3","gravatar_id":"","url":"https://api.github.com/users/akrzos","html_url":"https://github.com/akrzos","followers_url":"https://api.github.com/users/akrzos/followers","following_url":"https://api.github.com/users/akrzos/following{/other_user}","gists_url":"https://api.github.com/users/akrzos/gists{/gist_id}","starred_url":"https://api.github.com/users/akrzos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akrzos/subscriptions","organizations_url":"https://api.github.com/users/akrzos/orgs","repos_url":"https://api.github.com/users/akrzos/repos","events_url":"https://api.github.com/users/akrzos/events{/privacy}","received_events_url":"https://api.github.com/users/akrzos/received_events","type":"User","site_admin":false},"repo":{"id":56854777,"name":"cfme-performance","full_name":"akrzos/cfme-performance","owner":{"login":"akrzos","id":6154223,"avatar_url":"https://avatars.githubusercontent.com/u/6154223?v=3","gravatar_id":"","url":"https://api.github.com/users/akrzos","html_url":"https://github.com/akrzos","followers_url":"https://api.github.com/users/akrzos/followers","following_url":"https://api.github.com/users/akrzos/following{/other_user}","gists_url":"https://api.github.com/users/akrzos/gists{/gist_id}","starred_url":"https://api.github.com/users/akrzos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akrzos/subscriptions","organizations_url":"https://api.github.com/users/akrzos/orgs","repos_url":"https://api.github.com/users/akrzos/repos","events_url":"https://api.github.com/users/akrzos/events{/privacy}","received_events_url":"https://api.github.com/users/akrzos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akrzos/cfme-performance","description":"Collection of Automation/Tools for Performance Analysis/Testing of Cloud Forms/ManageIQ","fork":false,"url":"https://api.github.com/repos/akrzos/cfme-performance","forks_url":"https://api.github.com/repos/akrzos/cfme-performance/forks","keys_url":"https://api.github.com/repos/akrzos/cfme-performance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akrzos/cfme-performance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akrzos/cfme-performance/teams","hooks_url":"https://api.github.com/repos/akrzos/cfme-performance/hooks","issue_events_url":"https://api.github.com/repos/akrzos/cfme-performance/issues/events{/number}","events_url":"https://api.github.com/repos/akrzos/cfme-performance/events","assignees_url":"https://api.github.com/repos/akrzos/cfme-performance/assignees{/user}","branches_url":"https://api.github.com/repos/akrzos/cfme-performance/branches{/branch}","tags_url":"https://api.github.com/repos/akrzos/cfme-performance/tags","blobs_url":"https://api.github.com/repos/akrzos/cfme-performance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akrzos/cfme-performance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akrzos/cfme-performance/git/refs{/sha}","trees_url":"https://api.github.com/repos/akrzos/cfme-performance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akrzos/cfme-performance/statuses/{sha}","languages_url":"https://api.github.com/repos/akrzos/cfme-performance/languages","stargazers_url":"https://api.github.com/repos/akrzos/cfme-performance/stargazers","contributors_url":"https://api.github.com/repos/akrzos/cfme-performance/contributors","subscribers_url":"https://api.github.com/repos/akrzos/cfme-performance/subscribers","subscription_url":"https://api.github.com/repos/akrzos/cfme-performance/subscription","commits_url":"https://api.github.com/repos/akrzos/cfme-performance/commits{/sha}","git_commits_url":"https://api.github.com/repos/akrzos/cfme-performance/git/commits{/sha}","comments_url":"https://api.github.com/repos/akrzos/cfme-performance/comments{/number}","issue_comment_url":"https://api.github.com/repos/akrzos/cfme-performance/issues/comments{/number}","contents_url":"https://api.github.com/repos/akrzos/cfme-performance/contents/{+path}","compare_url":"https://api.github.com/repos/akrzos/cfme-performance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akrzos/cfme-performance/merges","archive_url":"https://api.github.com/repos/akrzos/cfme-performance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akrzos/cfme-performance/downloads","issues_url":"https://api.github.com/repos/akrzos/cfme-performance/issues{/number}","pulls_url":"https://api.github.com/repos/akrzos/cfme-performance/pulls{/number}","milestones_url":"https://api.github.com/repos/akrzos/cfme-performance/milestones{/number}","notifications_url":"https://api.github.com/repos/akrzos/cfme-performance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akrzos/cfme-performance/labels{/name}","releases_url":"https://api.github.com/repos/akrzos/cfme-performance/releases{/id}","deployments_url":"https://api.github.com/repos/akrzos/cfme-performance/deployments","created_at":"2016-04-22T12:45:50Z","updated_at":"2016-05-27T17:16:40Z","pushed_at":"2016-07-20T01:35:38Z","git_url":"git://github.com/akrzos/cfme-performance.git","ssh_url":"git@github.com:akrzos/cfme-performance.git","clone_url":"https://github.com/akrzos/cfme-performance.git","svn_url":"https://github.com/akrzos/cfme-performance","homepage":"","size":270,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":6,"forks":4,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akrzos/cfme-performance/pulls/32"},"html":{"href":"https://github.com/akrzos/cfme-performance/pull/32"},"issue":{"href":"https://api.github.com/repos/akrzos/cfme-performance/issues/32"},"comments":{"href":"https://api.github.com/repos/akrzos/cfme-performance/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/akrzos/cfme-performance/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/akrzos/cfme-performance/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akrzos/cfme-performance/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/akrzos/cfme-performance/statuses/cbe8b6f6c7fb37fd3c2113d5d66378e3ff3131e7"}}}}
{"actor":{"display_login":"akrzos"}}