{"action":"created","comment":{"url":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments/45569675","id":45569675,"diff_hunk":"@@ -1,2 +1,166 @@\n-Ethernet Switches\n-=================\n+Overview\n+---------\n+\n+When managing Ethernet switches, the admin often logs into the switches one by one using SSH or Telnet and runs the switch commands. However, it becomes time consuming when there are a lot of switches in a cluster. In a very large cluster, the switches are often identical and the configurations are identical. It helps to configure and monitor them in parallel from a single command.\n+\n+For managing Mellanox IB switches and  Qlogic IB switches, see the following :ref:`Infiniband_Link`\n+\n+Discovering Switches\n+--------------------\n+\n+You can use switchdiscover command to discover the switches that are attaches to the neighboring subnets on a xCAT management node. The syntax of the command is: ::\n+\n+    switchdiscover [noderange|--range ip_ranges][-s scan_methods][-r|-x|-z][-w]\n+\n+where the scan_methods can be **nmap** . The default is **nmap**. (**nmap** comes from most os distribution.)\n+\n+For example: ::\n+\n+    # switchdiscover --range 10.4.25.0/24,192.168.0.0/24\n+    Discovering switches using nmap...\n+    ip              name                    vendor                  mac\n+    ------------    ------------            ------------            ------------\n+    192.168.0.131   switch_192_168_0_131    Mellanox Technologie    00:02:C9:AA:00:53\n+    10.4.25.1       switch_10_4_25_1        Juniper networks        2C:6B:F5:00:11:22\n+\n+If -w flag is specified, the command will write the discovered switches into xCAT databases. It looks like this. ::","path":"docs/source/advanced/switches/ethernet_switches.rst","position":28,"original_position":28,"commit_id":"82bef9ee80d683186016088d37e994a2fab3748e","original_commit_id":"82bef9ee80d683186016088d37e994a2fab3748e","user":{"login":"whowutwut","id":10049070,"avatar_url":"https://avatars.githubusercontent.com/u/10049070?v=3","gravatar_id":"","url":"https://api.github.com/users/whowutwut","html_url":"https://github.com/whowutwut","followers_url":"https://api.github.com/users/whowutwut/followers","following_url":"https://api.github.com/users/whowutwut/following{/other_user}","gists_url":"https://api.github.com/users/whowutwut/gists{/gist_id}","starred_url":"https://api.github.com/users/whowutwut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whowutwut/subscriptions","organizations_url":"https://api.github.com/users/whowutwut/orgs","repos_url":"https://api.github.com/users/whowutwut/repos","events_url":"https://api.github.com/users/whowutwut/events{/privacy}","received_events_url":"https://api.github.com/users/whowutwut/received_events","type":"User","site_admin":false},"body":"Suggest: \r\n\r\nIf -w flag is specified, the command will write the discovered switches into xCAT databases. ~~It looks like this.~~ If the command above was executed with ``-w`` the following switch objects would be created: ::","created_at":"2015-11-23T02:23:40Z","updated_at":"2015-11-23T02:23:40Z","html_url":"https://github.com/xcat2/xcat-core/pull/432#discussion_r45569675","pull_request_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/432","_links":{"self":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments/45569675"},"html":{"href":"https://github.com/xcat2/xcat-core/pull/432#discussion_r45569675"},"pull_request":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/432"}}},"pull_request":{"url":"https://api.github.com/repos/xcat2/xcat-core/pulls/432","id":51173308,"html_url":"https://github.com/xcat2/xcat-core/pull/432","diff_url":"https://github.com/xcat2/xcat-core/pull/432.diff","patch_url":"https://github.com/xcat2/xcat-core/pull/432.patch","issue_url":"https://api.github.com/repos/xcat2/xcat-core/issues/432","number":432,"state":"open","locked":false,"title":"add switch document","user":{"login":"junxiawang","id":12441136,"avatar_url":"https://avatars.githubusercontent.com/u/12441136?v=3","gravatar_id":"","url":"https://api.github.com/users/junxiawang","html_url":"https://github.com/junxiawang","followers_url":"https://api.github.com/users/junxiawang/followers","following_url":"https://api.github.com/users/junxiawang/following{/other_user}","gists_url":"https://api.github.com/users/junxiawang/gists{/gist_id}","starred_url":"https://api.github.com/users/junxiawang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junxiawang/subscriptions","organizations_url":"https://api.github.com/users/junxiawang/orgs","repos_url":"https://api.github.com/users/junxiawang/repos","events_url":"https://api.github.com/users/junxiawang/events{/privacy}","received_events_url":"https://api.github.com/users/junxiawang/received_events","type":"User","site_admin":false},"body":"add switch document  , @tingtli please  help review\r\nlink:\r\nhttp://10.4.30.1/install/html/advanced/switches/ethernet_switches.html","created_at":"2015-11-19T02:43:03Z","updated_at":"2015-11-23T02:23:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4063d135152a149f5b37f021dcd11f2bc55a636","assignee":{"login":"tingtli","id":12440603,"avatar_url":"https://avatars.githubusercontent.com/u/12440603?v=3","gravatar_id":"","url":"https://api.github.com/users/tingtli","html_url":"https://github.com/tingtli","followers_url":"https://api.github.com/users/tingtli/followers","following_url":"https://api.github.com/users/tingtli/following{/other_user}","gists_url":"https://api.github.com/users/tingtli/gists{/gist_id}","starred_url":"https://api.github.com/users/tingtli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tingtli/subscriptions","organizations_url":"https://api.github.com/users/tingtli/orgs","repos_url":"https://api.github.com/users/tingtli/repos","events_url":"https://api.github.com/users/tingtli/events{/privacy}","received_events_url":"https://api.github.com/users/tingtli/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/xcat2/xcat-core/milestones/3","html_url":"https://github.com/xcat2/xcat-core/milestones/2.11","labels_url":"https://api.github.com/repos/xcat2/xcat-core/milestones/3/labels","id":1237674,"number":3,"title":"2.11","description":"xCAT 2.11","creator":{"login":"ligc","id":4415329,"avatar_url":"https://avatars.githubusercontent.com/u/4415329?v=3","gravatar_id":"","url":"https://api.github.com/users/ligc","html_url":"https://github.com/ligc","followers_url":"https://api.github.com/users/ligc/followers","following_url":"https://api.github.com/users/ligc/following{/other_user}","gists_url":"https://api.github.com/users/ligc/gists{/gist_id}","starred_url":"https://api.github.com/users/ligc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ligc/subscriptions","organizations_url":"https://api.github.com/users/ligc/orgs","repos_url":"https://api.github.com/users/ligc/repos","events_url":"https://api.github.com/users/ligc/events{/privacy}","received_events_url":"https://api.github.com/users/ligc/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":167,"state":"open","created_at":"2015-08-03T06:33:22Z","updated_at":"2015-11-23T01:57:15Z","due_on":"2015-12-14T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/432/commits","review_comments_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/432/comments","review_comment_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xcat2/xcat-core/issues/432/comments","statuses_url":"https://api.github.com/repos/xcat2/xcat-core/statuses/82bef9ee80d683186016088d37e994a2fab3748e","head":{"label":"junxiawang:docswitch","ref":"docswitch","sha":"82bef9ee80d683186016088d37e994a2fab3748e","user":{"login":"junxiawang","id":12441136,"avatar_url":"https://avatars.githubusercontent.com/u/12441136?v=3","gravatar_id":"","url":"https://api.github.com/users/junxiawang","html_url":"https://github.com/junxiawang","followers_url":"https://api.github.com/users/junxiawang/followers","following_url":"https://api.github.com/users/junxiawang/following{/other_user}","gists_url":"https://api.github.com/users/junxiawang/gists{/gist_id}","starred_url":"https://api.github.com/users/junxiawang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junxiawang/subscriptions","organizations_url":"https://api.github.com/users/junxiawang/orgs","repos_url":"https://api.github.com/users/junxiawang/repos","events_url":"https://api.github.com/users/junxiawang/events{/privacy}","received_events_url":"https://api.github.com/users/junxiawang/received_events","type":"User","site_admin":false},"repo":{"id":41812196,"name":"xcat-core","full_name":"junxiawang/xcat-core","owner":{"login":"junxiawang","id":12441136,"avatar_url":"https://avatars.githubusercontent.com/u/12441136?v=3","gravatar_id":"","url":"https://api.github.com/users/junxiawang","html_url":"https://github.com/junxiawang","followers_url":"https://api.github.com/users/junxiawang/followers","following_url":"https://api.github.com/users/junxiawang/following{/other_user}","gists_url":"https://api.github.com/users/junxiawang/gists{/gist_id}","starred_url":"https://api.github.com/users/junxiawang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junxiawang/subscriptions","organizations_url":"https://api.github.com/users/junxiawang/orgs","repos_url":"https://api.github.com/users/junxiawang/repos","events_url":"https://api.github.com/users/junxiawang/events{/privacy}","received_events_url":"https://api.github.com/users/junxiawang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/junxiawang/xcat-core","description":"Code repo for xCAT core packages","fork":true,"url":"https://api.github.com/repos/junxiawang/xcat-core","forks_url":"https://api.github.com/repos/junxiawang/xcat-core/forks","keys_url":"https://api.github.com/repos/junxiawang/xcat-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/junxiawang/xcat-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/junxiawang/xcat-core/teams","hooks_url":"https://api.github.com/repos/junxiawang/xcat-core/hooks","issue_events_url":"https://api.github.com/repos/junxiawang/xcat-core/issues/events{/number}","events_url":"https://api.github.com/repos/junxiawang/xcat-core/events","assignees_url":"https://api.github.com/repos/junxiawang/xcat-core/assignees{/user}","branches_url":"https://api.github.com/repos/junxiawang/xcat-core/branches{/branch}","tags_url":"https://api.github.com/repos/junxiawang/xcat-core/tags","blobs_url":"https://api.github.com/repos/junxiawang/xcat-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/junxiawang/xcat-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/junxiawang/xcat-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/junxiawang/xcat-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/junxiawang/xcat-core/statuses/{sha}","languages_url":"https://api.github.com/repos/junxiawang/xcat-core/languages","stargazers_url":"https://api.github.com/repos/junxiawang/xcat-core/stargazers","contributors_url":"https://api.github.com/repos/junxiawang/xcat-core/contributors","subscribers_url":"https://api.github.com/repos/junxiawang/xcat-core/subscribers","subscription_url":"https://api.github.com/repos/junxiawang/xcat-core/subscription","commits_url":"https://api.github.com/repos/junxiawang/xcat-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/junxiawang/xcat-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/junxiawang/xcat-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/junxiawang/xcat-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/junxiawang/xcat-core/contents/{+path}","compare_url":"https://api.github.com/repos/junxiawang/xcat-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/junxiawang/xcat-core/merges","archive_url":"https://api.github.com/repos/junxiawang/xcat-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/junxiawang/xcat-core/downloads","issues_url":"https://api.github.com/repos/junxiawang/xcat-core/issues{/number}","pulls_url":"https://api.github.com/repos/junxiawang/xcat-core/pulls{/number}","milestones_url":"https://api.github.com/repos/junxiawang/xcat-core/milestones{/number}","notifications_url":"https://api.github.com/repos/junxiawang/xcat-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/junxiawang/xcat-core/labels{/name}","releases_url":"https://api.github.com/repos/junxiawang/xcat-core/releases{/id}","created_at":"2015-09-02T16:17:30Z","updated_at":"2015-09-02T16:17:37Z","pushed_at":"2015-11-19T09:02:20Z","git_url":"git://github.com/junxiawang/xcat-core.git","ssh_url":"git@github.com:junxiawang/xcat-core.git","clone_url":"https://github.com/junxiawang/xcat-core.git","svn_url":"https://github.com/junxiawang/xcat-core","homepage":null,"size":181129,"stargazers_count":0,"watchers_count":0,"language":"Perl","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":"xcat2:master","ref":"master","sha":"ef9ab5fb7db3c539ea62a630c9bfedb10b3f9ce4","user":{"login":"xcat2","id":10124414,"avatar_url":"https://avatars.githubusercontent.com/u/10124414?v=3","gravatar_id":"","url":"https://api.github.com/users/xcat2","html_url":"https://github.com/xcat2","followers_url":"https://api.github.com/users/xcat2/followers","following_url":"https://api.github.com/users/xcat2/following{/other_user}","gists_url":"https://api.github.com/users/xcat2/gists{/gist_id}","starred_url":"https://api.github.com/users/xcat2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcat2/subscriptions","organizations_url":"https://api.github.com/users/xcat2/orgs","repos_url":"https://api.github.com/users/xcat2/repos","events_url":"https://api.github.com/users/xcat2/events{/privacy}","received_events_url":"https://api.github.com/users/xcat2/received_events","type":"Organization","site_admin":false},"repo":{"id":27747508,"name":"xcat-core","full_name":"xcat2/xcat-core","owner":{"login":"xcat2","id":10124414,"avatar_url":"https://avatars.githubusercontent.com/u/10124414?v=3","gravatar_id":"","url":"https://api.github.com/users/xcat2","html_url":"https://github.com/xcat2","followers_url":"https://api.github.com/users/xcat2/followers","following_url":"https://api.github.com/users/xcat2/following{/other_user}","gists_url":"https://api.github.com/users/xcat2/gists{/gist_id}","starred_url":"https://api.github.com/users/xcat2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcat2/subscriptions","organizations_url":"https://api.github.com/users/xcat2/orgs","repos_url":"https://api.github.com/users/xcat2/repos","events_url":"https://api.github.com/users/xcat2/events{/privacy}","received_events_url":"https://api.github.com/users/xcat2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xcat2/xcat-core","description":"Code repo for xCAT core packages","fork":false,"url":"https://api.github.com/repos/xcat2/xcat-core","forks_url":"https://api.github.com/repos/xcat2/xcat-core/forks","keys_url":"https://api.github.com/repos/xcat2/xcat-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xcat2/xcat-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xcat2/xcat-core/teams","hooks_url":"https://api.github.com/repos/xcat2/xcat-core/hooks","issue_events_url":"https://api.github.com/repos/xcat2/xcat-core/issues/events{/number}","events_url":"https://api.github.com/repos/xcat2/xcat-core/events","assignees_url":"https://api.github.com/repos/xcat2/xcat-core/assignees{/user}","branches_url":"https://api.github.com/repos/xcat2/xcat-core/branches{/branch}","tags_url":"https://api.github.com/repos/xcat2/xcat-core/tags","blobs_url":"https://api.github.com/repos/xcat2/xcat-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xcat2/xcat-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xcat2/xcat-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/xcat2/xcat-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xcat2/xcat-core/statuses/{sha}","languages_url":"https://api.github.com/repos/xcat2/xcat-core/languages","stargazers_url":"https://api.github.com/repos/xcat2/xcat-core/stargazers","contributors_url":"https://api.github.com/repos/xcat2/xcat-core/contributors","subscribers_url":"https://api.github.com/repos/xcat2/xcat-core/subscribers","subscription_url":"https://api.github.com/repos/xcat2/xcat-core/subscription","commits_url":"https://api.github.com/repos/xcat2/xcat-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/xcat2/xcat-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/xcat2/xcat-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/xcat2/xcat-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/xcat2/xcat-core/contents/{+path}","compare_url":"https://api.github.com/repos/xcat2/xcat-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xcat2/xcat-core/merges","archive_url":"https://api.github.com/repos/xcat2/xcat-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xcat2/xcat-core/downloads","issues_url":"https://api.github.com/repos/xcat2/xcat-core/issues{/number}","pulls_url":"https://api.github.com/repos/xcat2/xcat-core/pulls{/number}","milestones_url":"https://api.github.com/repos/xcat2/xcat-core/milestones{/number}","notifications_url":"https://api.github.com/repos/xcat2/xcat-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xcat2/xcat-core/labels{/name}","releases_url":"https://api.github.com/repos/xcat2/xcat-core/releases{/id}","created_at":"2014-12-09T03:21:50Z","updated_at":"2015-11-10T07:14:38Z","pushed_at":"2015-11-22T09:04:24Z","git_url":"git://github.com/xcat2/xcat-core.git","ssh_url":"git@github.com:xcat2/xcat-core.git","clone_url":"https://github.com/xcat2/xcat-core.git","svn_url":"https://github.com/xcat2/xcat-core","homepage":null,"size":181335,"stargazers_count":20,"watchers_count":20,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":54,"forks":36,"open_issues":54,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/432"},"html":{"href":"https://github.com/xcat2/xcat-core/pull/432"},"issue":{"href":"https://api.github.com/repos/xcat2/xcat-core/issues/432"},"comments":{"href":"https://api.github.com/repos/xcat2/xcat-core/issues/432/comments"},"review_comments":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/432/comments"},"review_comment":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/432/commits"},"statuses":{"href":"https://api.github.com/repos/xcat2/xcat-core/statuses/82bef9ee80d683186016088d37e994a2fab3748e"}}}}