{"action":"created","issue":{"url":"https://api.github.com/repos/xapi-project/xen-api/issues/3017","repository_url":"https://api.github.com/repos/xapi-project/xen-api","labels_url":"https://api.github.com/repos/xapi-project/xen-api/issues/3017/labels{/name}","comments_url":"https://api.github.com/repos/xapi-project/xen-api/issues/3017/comments","events_url":"https://api.github.com/repos/xapi-project/xen-api/issues/3017/events","html_url":"https://github.com/xapi-project/xen-api/pull/3017","id":224984865,"number":3017,"title":"CA-223802  Determine network ID by vif ID rather than NIC name","user":{"login":"minglumlu","id":27800561,"avatar_url":"https://avatars1.githubusercontent.com/u/27800561?v=3","gravatar_id":"","url":"https://api.github.com/users/minglumlu","html_url":"https://github.com/minglumlu","followers_url":"https://api.github.com/users/minglumlu/followers","following_url":"https://api.github.com/users/minglumlu/following{/other_user}","gists_url":"https://api.github.com/users/minglumlu/gists{/gist_id}","starred_url":"https://api.github.com/users/minglumlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minglumlu/subscriptions","organizations_url":"https://api.github.com/users/minglumlu/orgs","repos_url":"https://api.github.com/users/minglumlu/repos","events_url":"https://api.github.com/users/minglumlu/events{/privacy}","received_events_url":"https://api.github.com/users/minglumlu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"robhoes","id":413005,"avatar_url":"https://avatars2.githubusercontent.com/u/413005?v=3","gravatar_id":"","url":"https://api.github.com/users/robhoes","html_url":"https://github.com/robhoes","followers_url":"https://api.github.com/users/robhoes/followers","following_url":"https://api.github.com/users/robhoes/following{/other_user}","gists_url":"https://api.github.com/users/robhoes/gists{/gist_id}","starred_url":"https://api.github.com/users/robhoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robhoes/subscriptions","organizations_url":"https://api.github.com/users/robhoes/orgs","repos_url":"https://api.github.com/users/robhoes/repos","events_url":"https://api.github.com/users/robhoes/events{/privacy}","received_events_url":"https://api.github.com/users/robhoes/received_events","type":"User","site_admin":false},"assignees":[{"login":"robhoes","id":413005,"avatar_url":"https://avatars2.githubusercontent.com/u/413005?v=3","gravatar_id":"","url":"https://api.github.com/users/robhoes","html_url":"https://github.com/robhoes","followers_url":"https://api.github.com/users/robhoes/followers","following_url":"https://api.github.com/users/robhoes/following{/other_user}","gists_url":"https://api.github.com/users/robhoes/gists{/gist_id}","starred_url":"https://api.github.com/users/robhoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robhoes/subscriptions","organizations_url":"https://api.github.com/users/robhoes/orgs","repos_url":"https://api.github.com/users/robhoes/repos","events_url":"https://api.github.com/users/robhoes/events{/privacy}","received_events_url":"https://api.github.com/users/robhoes/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-04-28T05:40:06Z","updated_at":"2017-05-02T04:02:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xapi-project/xen-api/pulls/3017","html_url":"https://github.com/xapi-project/xen-api/pull/3017","diff_url":"https://github.com/xapi-project/xen-api/pull/3017.diff","patch_url":"https://github.com/xapi-project/xen-api/pull/3017.patch"},"body":"This change should be merged with another change xapi-project/xenopsd together.\r\nhttps://github.com/xapi-project/xenopsd/pull/334\r\n\r\nBefore this change, function \"networks\" will determine the network ID like these:\r\n  _attr/eth0/ip -> 0/ip_\r\n  _attr/eth0/ipv6/0/addr -> 0/ipv6/0_\r\n  _attr/eth0/ipv6/1/addr -> 0/ipv6/1_\r\n\r\nThe logic above is to determine the ID by the name of NIC. E.g. the ID of eth0 is 0, ID of eth3 is 3, etc.\r\n\r\nIn this change, the logic is to determine the network ID by the vif ID. Vif and NIC are associated by mac address. E.g.\r\n  _attr/eth3/ip -> 7/ip_\r\n\r\nIn example above, the vif ID of eth3 is 7.\r\n\r\n_#xenstore-ls /local/domain/11/device/vif/7 | grep mac\r\nmac = \"5e:5a:31:e9:5a:9b\"\r\n#xenstore-ls /local/domain/11/attr/eth3/mac\r\n0 = \"5e:5a:31:e9:5a:9b\"     <== matched here\r\n1 = \"33:33:00:00:00:01\"\r\n2 = \"33:33:ff:e9:5a:9b\"_\r\n"},"comment":{"url":"https://api.github.com/repos/xapi-project/xen-api/issues/comments/298492206","html_url":"https://github.com/xapi-project/xen-api/pull/3017#issuecomment-298492206","issue_url":"https://api.github.com/repos/xapi-project/xen-api/issues/3017","id":298492206,"user":{"login":"minglumlu","id":27800561,"avatar_url":"https://avatars1.githubusercontent.com/u/27800561?v=3","gravatar_id":"","url":"https://api.github.com/users/minglumlu","html_url":"https://github.com/minglumlu","followers_url":"https://api.github.com/users/minglumlu/followers","following_url":"https://api.github.com/users/minglumlu/following{/other_user}","gists_url":"https://api.github.com/users/minglumlu/gists{/gist_id}","starred_url":"https://api.github.com/users/minglumlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minglumlu/subscriptions","organizations_url":"https://api.github.com/users/minglumlu/orgs","repos_url":"https://api.github.com/users/minglumlu/repos","events_url":"https://api.github.com/users/minglumlu/events{/privacy}","received_events_url":"https://api.github.com/users/minglumlu/received_events","type":"User","site_admin":false},"created_at":"2017-05-02T04:02:04Z","updated_at":"2017-05-02T04:02:04Z","body":"Hi @robhoes  \r\nThanks for your comments. Following have been done:\r\n1. Multiple commits were squashed into one. Sorry for that. I should consult other guys in Nanjing before I promoted the PR.\r\n2. Fallback logic was added. "}}
{"actor":{"display_login":"minglumlu"}}