{"action":"created","comment":{"url":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments/70443268","id":70443268,"diff_hunk":"@@ -1328,5 +1349,171 @@ sub format_xml {\n     return ($xml);    \n }\n \n+#--------------------------------------------------------------------------------\n+=head3  switchsetup\n+      find discovered switches with predefine switches\n+    Arguments:\n+      outhash: a hash containing the switches discovered\n+    Returns:\n+      result:\n+=cut\n+#--------------------------------------------------------------------------------\n+\n+sub switchsetup {","path":"xCAT-server/lib/xcat/plugins/switchdiscover.pm","position":77,"original_position":77,"commit_id":"91d803ec389c3b42f9928a5d00ecf021dbab0424","original_commit_id":"91d803ec389c3b42f9928a5d00ecf021dbab0424","user":{"login":"cxhong","id":12398836,"avatar_url":"https://avatars.githubusercontent.com/u/12398836?v=3","gravatar_id":"","url":"https://api.github.com/users/cxhong","html_url":"https://github.com/cxhong","followers_url":"https://api.github.com/users/cxhong/followers","following_url":"https://api.github.com/users/cxhong/following{/other_user}","gists_url":"https://api.github.com/users/cxhong/gists{/gist_id}","starred_url":"https://api.github.com/users/cxhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cxhong/subscriptions","organizations_url":"https://api.github.com/users/cxhong/orgs","repos_url":"https://api.github.com/users/cxhong/repos","events_url":"https://api.github.com/users/cxhong/events{/privacy}","received_events_url":"https://api.github.com/users/cxhong/received_events","type":"User","site_admin":false},"body":"Yeh, need to cover error case.  will add code for that","created_at":"2016-07-12T13:58:57Z","updated_at":"2016-07-12T13:58:57Z","html_url":"https://github.com/xcat2/xcat-core/pull/1519#discussion_r70443268","pull_request_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/1519","_links":{"self":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments/70443268"},"html":{"href":"https://github.com/xcat2/xcat-core/pull/1519#discussion_r70443268"},"pull_request":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/1519"}}},"pull_request":{"url":"https://api.github.com/repos/xcat2/xcat-core/pulls/1519","id":77025434,"html_url":"https://github.com/xcat2/xcat-core/pull/1519","diff_url":"https://github.com/xcat2/xcat-core/pull/1519.diff","patch_url":"https://github.com/xcat2/xcat-core/pull/1519.patch","issue_url":"https://api.github.com/repos/xcat2/xcat-core/issues/1519","number":1519,"state":"open","locked":false,"title":"Switch-based switch discovery for BNT and Mellanox","user":{"login":"cxhong","id":12398836,"avatar_url":"https://avatars.githubusercontent.com/u/12398836?v=3","gravatar_id":"","url":"https://api.github.com/users/cxhong","html_url":"https://github.com/cxhong","followers_url":"https://api.github.com/users/cxhong/followers","following_url":"https://api.github.com/users/cxhong/following{/other_user}","gists_url":"https://api.github.com/users/cxhong/gists{/gist_id}","starred_url":"https://api.github.com/users/cxhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cxhong/subscriptions","organizations_url":"https://api.github.com/users/cxhong/orgs","repos_url":"https://api.github.com/users/cxhong/repos","events_url":"https://api.github.com/users/cxhong/events{/privacy}","received_events_url":"https://api.github.com/users/cxhong/received_events","type":"User","site_admin":false},"body":"Add Switch-based switch discovery for hardware discovery\r\n1) need to manually define and configure core-switch on xCAT MN \r\n2) need to predefine switch with core-switch ,port number and static ip address\r\n`````\r\n# cat switch-192-168-5-22.stanza\r\nswitch-192-168-5-22:\r\n    objtype=node\r\n    groups=switch\r\n    ip=192.168.5.22\r\n    mgt=switch\r\n    nodetype=switch\r\n    switch=switch-10-5-23-1\r\n    switchport=45\r\n    switchtype=BNT\r\n``````\r\n3) To discovery switch via dynamic dhcp ip address:\r\n``````\r\nswitchdiscovery --range dynamic_ip -s snmp --setup\r\n``````\r\nthis command \r\n---will discover switch with dynamic ip address, \r\n---use mac address to match pre-defined switch \r\n---set static ip address to discovered switch\r\n---set host name via predefine switch \r\n---remove discovered switch definition from xCAT DB\r\n--- set mac address to predefine switch\r\n4) config switch\r\nBNT:\r\n````\r\n# ./configBNT\r\nUsage:\r\n    configBNT [-?│-h│--help]\r\n    configBNT [--range switchnames] [-p|--port port] [-v|--vlan vlan]\r\n    configBNT [--range switchnames] [--snmp] [-u|--user snmp_user] [-w|--password snmp_password] [-g|--group snmp_group]\r\n``````\r\nMellanox:\r\n````\r\n# ./configMellanox\r\nUsage:\r\n    configMellonax [-?│-h│--help]\r\n    configMellonax [--range switchnames] [-u|--user sshusername] [-i|--ip xcatMN_ip_address]\r\n``````\r\n\r\n","created_at":"2016-07-11T21:21:24Z","updated_at":"2016-07-12T13:58:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8140adea6c20d5f7d1a0c35ce57bf64d6df8adf4","assignee":{"login":"zet809","id":8222144,"avatar_url":"https://avatars.githubusercontent.com/u/8222144?v=3","gravatar_id":"","url":"https://api.github.com/users/zet809","html_url":"https://github.com/zet809","followers_url":"https://api.github.com/users/zet809/followers","following_url":"https://api.github.com/users/zet809/following{/other_user}","gists_url":"https://api.github.com/users/zet809/gists{/gist_id}","starred_url":"https://api.github.com/users/zet809/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zet809/subscriptions","organizations_url":"https://api.github.com/users/zet809/orgs","repos_url":"https://api.github.com/users/zet809/repos","events_url":"https://api.github.com/users/zet809/events{/privacy}","received_events_url":"https://api.github.com/users/zet809/received_events","type":"User","site_admin":false},"assignees":[{"login":"zet809","id":8222144,"avatar_url":"https://avatars.githubusercontent.com/u/8222144?v=3","gravatar_id":"","url":"https://api.github.com/users/zet809","html_url":"https://github.com/zet809","followers_url":"https://api.github.com/users/zet809/followers","following_url":"https://api.github.com/users/zet809/following{/other_user}","gists_url":"https://api.github.com/users/zet809/gists{/gist_id}","starred_url":"https://api.github.com/users/zet809/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zet809/subscriptions","organizations_url":"https://api.github.com/users/zet809/orgs","repos_url":"https://api.github.com/users/zet809/repos","events_url":"https://api.github.com/users/zet809/events{/privacy}","received_events_url":"https://api.github.com/users/zet809/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/xcat2/xcat-core/milestones/17","html_url":"https://github.com/xcat2/xcat-core/milestones/2.12.2","labels_url":"https://api.github.com/repos/xcat2/xcat-core/milestones/17/labels","id":1854029,"number":17,"title":"2.12.2","description":"","creator":{"login":"daniceexi","id":10385985,"avatar_url":"https://avatars.githubusercontent.com/u/10385985?v=3","gravatar_id":"","url":"https://api.github.com/users/daniceexi","html_url":"https://github.com/daniceexi","followers_url":"https://api.github.com/users/daniceexi/followers","following_url":"https://api.github.com/users/daniceexi/following{/other_user}","gists_url":"https://api.github.com/users/daniceexi/gists{/gist_id}","starred_url":"https://api.github.com/users/daniceexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniceexi/subscriptions","organizations_url":"https://api.github.com/users/daniceexi/orgs","repos_url":"https://api.github.com/users/daniceexi/repos","events_url":"https://api.github.com/users/daniceexi/events{/privacy}","received_events_url":"https://api.github.com/users/daniceexi/received_events","type":"User","site_admin":false},"open_issues":75,"closed_issues":3,"state":"open","created_at":"2016-06-29T01:21:43Z","updated_at":"2016-07-12T09:56:09Z","due_on":"2016-08-26T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/1519/commits","review_comments_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/1519/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/1519/comments","statuses_url":"https://api.github.com/repos/xcat2/xcat-core/statuses/91d803ec389c3b42f9928a5d00ecf021dbab0424","head":{"label":"cxhong:switch","ref":"switch","sha":"91d803ec389c3b42f9928a5d00ecf021dbab0424","user":{"login":"cxhong","id":12398836,"avatar_url":"https://avatars.githubusercontent.com/u/12398836?v=3","gravatar_id":"","url":"https://api.github.com/users/cxhong","html_url":"https://github.com/cxhong","followers_url":"https://api.github.com/users/cxhong/followers","following_url":"https://api.github.com/users/cxhong/following{/other_user}","gists_url":"https://api.github.com/users/cxhong/gists{/gist_id}","starred_url":"https://api.github.com/users/cxhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cxhong/subscriptions","organizations_url":"https://api.github.com/users/cxhong/orgs","repos_url":"https://api.github.com/users/cxhong/repos","events_url":"https://api.github.com/users/cxhong/events{/privacy}","received_events_url":"https://api.github.com/users/cxhong/received_events","type":"User","site_admin":false},"repo":{"id":41100712,"name":"xcat-core","full_name":"cxhong/xcat-core","owner":{"login":"cxhong","id":12398836,"avatar_url":"https://avatars.githubusercontent.com/u/12398836?v=3","gravatar_id":"","url":"https://api.github.com/users/cxhong","html_url":"https://github.com/cxhong","followers_url":"https://api.github.com/users/cxhong/followers","following_url":"https://api.github.com/users/cxhong/following{/other_user}","gists_url":"https://api.github.com/users/cxhong/gists{/gist_id}","starred_url":"https://api.github.com/users/cxhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cxhong/subscriptions","organizations_url":"https://api.github.com/users/cxhong/orgs","repos_url":"https://api.github.com/users/cxhong/repos","events_url":"https://api.github.com/users/cxhong/events{/privacy}","received_events_url":"https://api.github.com/users/cxhong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cxhong/xcat-core","description":"Code repo for xCAT core packages","fork":true,"url":"https://api.github.com/repos/cxhong/xcat-core","forks_url":"https://api.github.com/repos/cxhong/xcat-core/forks","keys_url":"https://api.github.com/repos/cxhong/xcat-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cxhong/xcat-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cxhong/xcat-core/teams","hooks_url":"https://api.github.com/repos/cxhong/xcat-core/hooks","issue_events_url":"https://api.github.com/repos/cxhong/xcat-core/issues/events{/number}","events_url":"https://api.github.com/repos/cxhong/xcat-core/events","assignees_url":"https://api.github.com/repos/cxhong/xcat-core/assignees{/user}","branches_url":"https://api.github.com/repos/cxhong/xcat-core/branches{/branch}","tags_url":"https://api.github.com/repos/cxhong/xcat-core/tags","blobs_url":"https://api.github.com/repos/cxhong/xcat-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cxhong/xcat-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cxhong/xcat-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/cxhong/xcat-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cxhong/xcat-core/statuses/{sha}","languages_url":"https://api.github.com/repos/cxhong/xcat-core/languages","stargazers_url":"https://api.github.com/repos/cxhong/xcat-core/stargazers","contributors_url":"https://api.github.com/repos/cxhong/xcat-core/contributors","subscribers_url":"https://api.github.com/repos/cxhong/xcat-core/subscribers","subscription_url":"https://api.github.com/repos/cxhong/xcat-core/subscription","commits_url":"https://api.github.com/repos/cxhong/xcat-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/cxhong/xcat-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/cxhong/xcat-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/cxhong/xcat-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/cxhong/xcat-core/contents/{+path}","compare_url":"https://api.github.com/repos/cxhong/xcat-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cxhong/xcat-core/merges","archive_url":"https://api.github.com/repos/cxhong/xcat-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cxhong/xcat-core/downloads","issues_url":"https://api.github.com/repos/cxhong/xcat-core/issues{/number}","pulls_url":"https://api.github.com/repos/cxhong/xcat-core/pulls{/number}","milestones_url":"https://api.github.com/repos/cxhong/xcat-core/milestones{/number}","notifications_url":"https://api.github.com/repos/cxhong/xcat-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cxhong/xcat-core/labels{/name}","releases_url":"https://api.github.com/repos/cxhong/xcat-core/releases{/id}","deployments_url":"https://api.github.com/repos/cxhong/xcat-core/deployments","created_at":"2015-08-20T14:36:07Z","updated_at":"2016-01-15T23:03:44Z","pushed_at":"2016-07-11T21:04:19Z","git_url":"git://github.com/cxhong/xcat-core.git","ssh_url":"git@github.com:cxhong/xcat-core.git","clone_url":"https://github.com/cxhong/xcat-core.git","svn_url":"https://github.com/cxhong/xcat-core","homepage":null,"size":185532,"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":"72571f4444c67c1049b714685f49b0c0a224e77e","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}","deployments_url":"https://api.github.com/repos/xcat2/xcat-core/deployments","created_at":"2014-12-09T03:21:50Z","updated_at":"2016-07-06T10:00:10Z","pushed_at":"2016-07-12T13:51:52Z","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":186154,"stargazers_count":46,"watchers_count":46,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":146,"forks":57,"open_issues":146,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/1519"},"html":{"href":"https://github.com/xcat2/xcat-core/pull/1519"},"issue":{"href":"https://api.github.com/repos/xcat2/xcat-core/issues/1519"},"comments":{"href":"https://api.github.com/repos/xcat2/xcat-core/issues/1519/comments"},"review_comments":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/1519/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/1519/commits"},"statuses":{"href":"https://api.github.com/repos/xcat2/xcat-core/statuses/91d803ec389c3b42f9928a5d00ecf021dbab0424"}}}}
{"actor":{"display_login":"cxhong"}}