{"action":"created","comment":{"url":"https://api.github.com/repos/nmadhok/salt/pulls/comments/28627089","id":28627089,"diff_hunk":"@@ -1872,3 +1872,62 @@ def upgrade_tools(name, reboot=False, call=None):\n         return 'VMware tools upgraded'\n \n     return 'VMware tools is not installed'\n+\n+def rescan_all_hbas_on_host(kwargs=None, call=None):\n+    '''\n+    To rescan all HBA's on a Host using the Hostname\n+        \n+    CLI Example:\n+        \n+    .. code-block:: bash\n+        \n+    salt-cloud -f rescan_all_hbas_on_host my-vmware-config host\n+    '''\n+    \n+    if call != 'function':\n+        raise SaltCloudSystemExit(\n+            'The rescan_all_hbas_on_host action must be called with -f or --function.'\n+        )\n+\n+    host_name = kwargs.get('host')\n+\n+    host_ref = _get_mor_with_property(vim.HostSystem, host_name)\n+            \n+    try:\n+        log.info('Rescanning HBA\\'s on host {0}'.format(host_name))\n+        host_ref.configManager.storageSystem.RescanAllHba()\n+    except Exception as exc:\n+        log.error('Could not rescan HBA\\'s on host {0}: {1}'.format(host_name, exc))\n+        return 'failed to rescan HBA\\'s'\n+\n+    return 'rescanned HBA\\'s'\n+\n+def rescan_hba_on_host(kwargs=None, call=None):\n+    '''\n+    To rescan a specific HBA on a Host using the HBA device name and Hostname\n+        \n+    CLI Example:\n+        \n+    .. code-block:: bash\n+        \n+    salt-cloud -f rescan_hba_on_host my-vmware-config hba host\n+    '''\n+    ","path":"salt/cloud/clouds/vmware.py","position":44,"original_position":44,"commit_id":"0fdd5f884c0a8143f1da7a4aa1b3c9458737a370","original_commit_id":"0fdd5f884c0a8143f1da7a4aa1b3c9458737a370","user":{"login":"nmadhok","id":3374962,"avatar_url":"https://avatars.githubusercontent.com/u/3374962?v=3","gravatar_id":"","url":"https://api.github.com/users/nmadhok","html_url":"https://github.com/nmadhok","followers_url":"https://api.github.com/users/nmadhok/followers","following_url":"https://api.github.com/users/nmadhok/following{/other_user}","gists_url":"https://api.github.com/users/nmadhok/gists{/gist_id}","starred_url":"https://api.github.com/users/nmadhok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmadhok/subscriptions","organizations_url":"https://api.github.com/users/nmadhok/orgs","repos_url":"https://api.github.com/users/nmadhok/repos","events_url":"https://api.github.com/users/nmadhok/events{/privacy}","received_events_url":"https://api.github.com/users/nmadhok/received_events","type":"User","site_admin":false},"body":"New Line not needed. Remove it.","created_at":"2015-04-17T20:22:47Z","updated_at":"2015-04-17T20:22:47Z","html_url":"https://github.com/nmadhok/salt/pull/4#discussion_r28627089","pull_request_url":"https://api.github.com/repos/nmadhok/salt/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/nmadhok/salt/pulls/comments/28627089"},"html":{"href":"https://github.com/nmadhok/salt/pull/4#discussion_r28627089"},"pull_request":{"href":"https://api.github.com/repos/nmadhok/salt/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/nmadhok/salt/pulls/4","id":33578402,"html_url":"https://github.com/nmadhok/salt/pull/4","diff_url":"https://github.com/nmadhok/salt/pull/4.diff","patch_url":"https://github.com/nmadhok/salt/pull/4.patch","issue_url":"https://api.github.com/repos/nmadhok/salt/issues/4","number":4,"state":"open","locked":false,"title":"Added functions rescan_all_hbas_on_host & rescan_hba_on_host","user":{"login":"mpmoers","id":9890467,"avatar_url":"https://avatars.githubusercontent.com/u/9890467?v=3","gravatar_id":"","url":"https://api.github.com/users/mpmoers","html_url":"https://github.com/mpmoers","followers_url":"https://api.github.com/users/mpmoers/followers","following_url":"https://api.github.com/users/mpmoers/following{/other_user}","gists_url":"https://api.github.com/users/mpmoers/gists{/gist_id}","starred_url":"https://api.github.com/users/mpmoers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpmoers/subscriptions","organizations_url":"https://api.github.com/users/mpmoers/orgs","repos_url":"https://api.github.com/users/mpmoers/repos","events_url":"https://api.github.com/users/mpmoers/events{/privacy}","received_events_url":"https://api.github.com/users/mpmoers/received_events","type":"User","site_admin":false},"body":"Gets a vim.HostSystem object with the same name as entered.\r\nScans all hba's or the specified hba on the host.\r\n\r\nRenamed functions to be more specific.\r\nAlso, fixed spacing and other formatting issues in the functions.\r\n","created_at":"2015-04-17T20:16:13Z","updated_at":"2015-04-17T20:22:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7616355d2c6a148866bb378cd3bf2e82d67c37ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nmadhok/salt/pulls/4/commits","review_comments_url":"https://api.github.com/repos/nmadhok/salt/pulls/4/comments","review_comment_url":"https://api.github.com/repos/nmadhok/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nmadhok/salt/issues/4/comments","statuses_url":"https://api.github.com/repos/nmadhok/salt/statuses/0fdd5f884c0a8143f1da7a4aa1b3c9458737a370","head":{"label":"mpmoers:vmware-cloud-driver","ref":"vmware-cloud-driver","sha":"0fdd5f884c0a8143f1da7a4aa1b3c9458737a370","user":{"login":"mpmoers","id":9890467,"avatar_url":"https://avatars.githubusercontent.com/u/9890467?v=3","gravatar_id":"","url":"https://api.github.com/users/mpmoers","html_url":"https://github.com/mpmoers","followers_url":"https://api.github.com/users/mpmoers/followers","following_url":"https://api.github.com/users/mpmoers/following{/other_user}","gists_url":"https://api.github.com/users/mpmoers/gists{/gist_id}","starred_url":"https://api.github.com/users/mpmoers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpmoers/subscriptions","organizations_url":"https://api.github.com/users/mpmoers/orgs","repos_url":"https://api.github.com/users/mpmoers/repos","events_url":"https://api.github.com/users/mpmoers/events{/privacy}","received_events_url":"https://api.github.com/users/mpmoers/received_events","type":"User","site_admin":false},"repo":{"id":34122045,"name":"salt","full_name":"mpmoers/salt","owner":{"login":"mpmoers","id":9890467,"avatar_url":"https://avatars.githubusercontent.com/u/9890467?v=3","gravatar_id":"","url":"https://api.github.com/users/mpmoers","html_url":"https://github.com/mpmoers","followers_url":"https://api.github.com/users/mpmoers/followers","following_url":"https://api.github.com/users/mpmoers/following{/other_user}","gists_url":"https://api.github.com/users/mpmoers/gists{/gist_id}","starred_url":"https://api.github.com/users/mpmoers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpmoers/subscriptions","organizations_url":"https://api.github.com/users/mpmoers/orgs","repos_url":"https://api.github.com/users/mpmoers/repos","events_url":"https://api.github.com/users/mpmoers/events{/privacy}","received_events_url":"https://api.github.com/users/mpmoers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mpmoers/salt","description":"Infrastructure automation and management system","fork":true,"url":"https://api.github.com/repos/mpmoers/salt","forks_url":"https://api.github.com/repos/mpmoers/salt/forks","keys_url":"https://api.github.com/repos/mpmoers/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpmoers/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpmoers/salt/teams","hooks_url":"https://api.github.com/repos/mpmoers/salt/hooks","issue_events_url":"https://api.github.com/repos/mpmoers/salt/issues/events{/number}","events_url":"https://api.github.com/repos/mpmoers/salt/events","assignees_url":"https://api.github.com/repos/mpmoers/salt/assignees{/user}","branches_url":"https://api.github.com/repos/mpmoers/salt/branches{/branch}","tags_url":"https://api.github.com/repos/mpmoers/salt/tags","blobs_url":"https://api.github.com/repos/mpmoers/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpmoers/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpmoers/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpmoers/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpmoers/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/mpmoers/salt/languages","stargazers_url":"https://api.github.com/repos/mpmoers/salt/stargazers","contributors_url":"https://api.github.com/repos/mpmoers/salt/contributors","subscribers_url":"https://api.github.com/repos/mpmoers/salt/subscribers","subscription_url":"https://api.github.com/repos/mpmoers/salt/subscription","commits_url":"https://api.github.com/repos/mpmoers/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpmoers/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpmoers/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpmoers/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpmoers/salt/contents/{+path}","compare_url":"https://api.github.com/repos/mpmoers/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpmoers/salt/merges","archive_url":"https://api.github.com/repos/mpmoers/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpmoers/salt/downloads","issues_url":"https://api.github.com/repos/mpmoers/salt/issues{/number}","pulls_url":"https://api.github.com/repos/mpmoers/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/mpmoers/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/mpmoers/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpmoers/salt/labels{/name}","releases_url":"https://api.github.com/repos/mpmoers/salt/releases{/id}","created_at":"2015-04-17T14:45:47Z","updated_at":"2015-04-17T14:45:56Z","pushed_at":"2015-04-17T20:06:05Z","git_url":"git://github.com/mpmoers/salt.git","ssh_url":"git@github.com:mpmoers/salt.git","clone_url":"https://github.com/mpmoers/salt.git","svn_url":"https://github.com/mpmoers/salt","homepage":"saltstack.com","size":94928,"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":"develop"}},"base":{"label":"nmadhok:vmware-cloud-driver","ref":"vmware-cloud-driver","sha":"dbbd6bf1f7837f3f4218903a79600df0dbca30d9","user":{"login":"nmadhok","id":3374962,"avatar_url":"https://avatars.githubusercontent.com/u/3374962?v=3","gravatar_id":"","url":"https://api.github.com/users/nmadhok","html_url":"https://github.com/nmadhok","followers_url":"https://api.github.com/users/nmadhok/followers","following_url":"https://api.github.com/users/nmadhok/following{/other_user}","gists_url":"https://api.github.com/users/nmadhok/gists{/gist_id}","starred_url":"https://api.github.com/users/nmadhok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmadhok/subscriptions","organizations_url":"https://api.github.com/users/nmadhok/orgs","repos_url":"https://api.github.com/users/nmadhok/repos","events_url":"https://api.github.com/users/nmadhok/events{/privacy}","received_events_url":"https://api.github.com/users/nmadhok/received_events","type":"User","site_admin":false},"repo":{"id":20664887,"name":"salt","full_name":"nmadhok/salt","owner":{"login":"nmadhok","id":3374962,"avatar_url":"https://avatars.githubusercontent.com/u/3374962?v=3","gravatar_id":"","url":"https://api.github.com/users/nmadhok","html_url":"https://github.com/nmadhok","followers_url":"https://api.github.com/users/nmadhok/followers","following_url":"https://api.github.com/users/nmadhok/following{/other_user}","gists_url":"https://api.github.com/users/nmadhok/gists{/gist_id}","starred_url":"https://api.github.com/users/nmadhok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmadhok/subscriptions","organizations_url":"https://api.github.com/users/nmadhok/orgs","repos_url":"https://api.github.com/users/nmadhok/repos","events_url":"https://api.github.com/users/nmadhok/events{/privacy}","received_events_url":"https://api.github.com/users/nmadhok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nmadhok/salt","description":"Infrastructure automation and management system","fork":true,"url":"https://api.github.com/repos/nmadhok/salt","forks_url":"https://api.github.com/repos/nmadhok/salt/forks","keys_url":"https://api.github.com/repos/nmadhok/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nmadhok/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nmadhok/salt/teams","hooks_url":"https://api.github.com/repos/nmadhok/salt/hooks","issue_events_url":"https://api.github.com/repos/nmadhok/salt/issues/events{/number}","events_url":"https://api.github.com/repos/nmadhok/salt/events","assignees_url":"https://api.github.com/repos/nmadhok/salt/assignees{/user}","branches_url":"https://api.github.com/repos/nmadhok/salt/branches{/branch}","tags_url":"https://api.github.com/repos/nmadhok/salt/tags","blobs_url":"https://api.github.com/repos/nmadhok/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nmadhok/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nmadhok/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/nmadhok/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nmadhok/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/nmadhok/salt/languages","stargazers_url":"https://api.github.com/repos/nmadhok/salt/stargazers","contributors_url":"https://api.github.com/repos/nmadhok/salt/contributors","subscribers_url":"https://api.github.com/repos/nmadhok/salt/subscribers","subscription_url":"https://api.github.com/repos/nmadhok/salt/subscription","commits_url":"https://api.github.com/repos/nmadhok/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/nmadhok/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/nmadhok/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/nmadhok/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/nmadhok/salt/contents/{+path}","compare_url":"https://api.github.com/repos/nmadhok/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nmadhok/salt/merges","archive_url":"https://api.github.com/repos/nmadhok/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nmadhok/salt/downloads","issues_url":"https://api.github.com/repos/nmadhok/salt/issues{/number}","pulls_url":"https://api.github.com/repos/nmadhok/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/nmadhok/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/nmadhok/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nmadhok/salt/labels{/name}","releases_url":"https://api.github.com/repos/nmadhok/salt/releases{/id}","created_at":"2014-06-09T22:47:53Z","updated_at":"2015-04-17T17:57:50Z","pushed_at":"2015-04-17T20:16:13Z","git_url":"git://github.com/nmadhok/salt.git","ssh_url":"git@github.com:nmadhok/salt.git","clone_url":"https://github.com/nmadhok/salt.git","svn_url":"https://github.com/nmadhok/salt","homepage":"saltstack.com","size":99583,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/nmadhok/salt/pulls/4"},"html":{"href":"https://github.com/nmadhok/salt/pull/4"},"issue":{"href":"https://api.github.com/repos/nmadhok/salt/issues/4"},"comments":{"href":"https://api.github.com/repos/nmadhok/salt/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/nmadhok/salt/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/nmadhok/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nmadhok/salt/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/nmadhok/salt/statuses/0fdd5f884c0a8143f1da7a4aa1b3c9458737a370"}}}}