{"action":"closed","number":134,"pull_request":{"url":"https://api.github.com/repos/datacenter/acitoolkit/pulls/134","id":47770390,"html_url":"https://github.com/datacenter/acitoolkit/pull/134","diff_url":"https://github.com/datacenter/acitoolkit/pull/134.diff","patch_url":"https://github.com/datacenter/acitoolkit/pull/134.patch","issue_url":"https://api.github.com/repos/datacenter/acitoolkit/issues/134","number":134,"state":"closed","locked":false,"title":"Add the ability to bind static leaves to an EPG.","user":{"login":"luismartingarcia","id":7959204,"avatar_url":"https://avatars.githubusercontent.com/u/7959204?v=3","gravatar_id":"","url":"https://api.github.com/users/luismartingarcia","html_url":"https://github.com/luismartingarcia","followers_url":"https://api.github.com/users/luismartingarcia/followers","following_url":"https://api.github.com/users/luismartingarcia/following{/other_user}","gists_url":"https://api.github.com/users/luismartingarcia/gists{/gist_id}","starred_url":"https://api.github.com/users/luismartingarcia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luismartingarcia/subscriptions","organizations_url":"https://api.github.com/users/luismartingarcia/orgs","repos_url":"https://api.github.com/users/luismartingarcia/repos","events_url":"https://api.github.com/users/luismartingarcia/events{/privacy}","received_events_url":"https://api.github.com/users/luismartingarcia/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nThis patch adds the ability to bind an static leaf to an EPG. I tried to imitate the model that the toolkit follows for the interfaces but unfortunately it wasn't possible, since one can add encapsulation information to an L2Interface but it doesn't make sense to do that for a Node object, so even if we could do epg.attach(node) where node is of type Node, we'd be missing the necessary encap information for the EPG binding.\r\n\r\nI am up to code this in a different way, but I studied the problem for a while and this implementation was the easiest and cleanest way I could find.\r\n\r\nPlease let me know. Best regards,\r\n\r\nLuis.\r\n\r\nPS: Here's code that consumes the new method.\r\n\r\n```\r\n        epg = EPG(\"db-01\", ap)\r\n        epg.add_static_leaf_binding(101, \"vlan\", 405)\r\n        epg.add_static_leaf_binding(102, \"vlan\", 406, encap_mode=\"native\")\r\n        epg.add_static_leaf_binding(103, \"vxlan\", 50)\r\n        epg.add_static_leaf_binding(104, \"nvgre\", 406, pod=2)\r\n```","created_at":"2015-10-15T10:45:50Z","updated_at":"2015-10-15T23:39:30Z","closed_at":"2015-10-15T23:39:30Z","merged_at":"2015-10-15T23:39:30Z","merge_commit_sha":"224b853a1df4504db4076bd4581a6cf54449f634","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/datacenter/acitoolkit/pulls/134/commits","review_comments_url":"https://api.github.com/repos/datacenter/acitoolkit/pulls/134/comments","review_comment_url":"https://api.github.com/repos/datacenter/acitoolkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datacenter/acitoolkit/issues/134/comments","statuses_url":"https://api.github.com/repos/datacenter/acitoolkit/statuses/19f72f0342d7b19fdaa000ff16d115cc37ce292c","head":{"label":"luismartingarcia:epg-static-leaves","ref":"epg-static-leaves","sha":"19f72f0342d7b19fdaa000ff16d115cc37ce292c","user":{"login":"luismartingarcia","id":7959204,"avatar_url":"https://avatars.githubusercontent.com/u/7959204?v=3","gravatar_id":"","url":"https://api.github.com/users/luismartingarcia","html_url":"https://github.com/luismartingarcia","followers_url":"https://api.github.com/users/luismartingarcia/followers","following_url":"https://api.github.com/users/luismartingarcia/following{/other_user}","gists_url":"https://api.github.com/users/luismartingarcia/gists{/gist_id}","starred_url":"https://api.github.com/users/luismartingarcia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luismartingarcia/subscriptions","organizations_url":"https://api.github.com/users/luismartingarcia/orgs","repos_url":"https://api.github.com/users/luismartingarcia/repos","events_url":"https://api.github.com/users/luismartingarcia/events{/privacy}","received_events_url":"https://api.github.com/users/luismartingarcia/received_events","type":"User","site_admin":false},"repo":{"id":32977849,"name":"acitoolkit","full_name":"luismartingarcia/acitoolkit","owner":{"login":"luismartingarcia","id":7959204,"avatar_url":"https://avatars.githubusercontent.com/u/7959204?v=3","gravatar_id":"","url":"https://api.github.com/users/luismartingarcia","html_url":"https://github.com/luismartingarcia","followers_url":"https://api.github.com/users/luismartingarcia/followers","following_url":"https://api.github.com/users/luismartingarcia/following{/other_user}","gists_url":"https://api.github.com/users/luismartingarcia/gists{/gist_id}","starred_url":"https://api.github.com/users/luismartingarcia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luismartingarcia/subscriptions","organizations_url":"https://api.github.com/users/luismartingarcia/orgs","repos_url":"https://api.github.com/users/luismartingarcia/repos","events_url":"https://api.github.com/users/luismartingarcia/events{/privacy}","received_events_url":"https://api.github.com/users/luismartingarcia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/luismartingarcia/acitoolkit","description":"A basic toolkit for accessing the Cisco APIC","fork":true,"url":"https://api.github.com/repos/luismartingarcia/acitoolkit","forks_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/forks","keys_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/teams","hooks_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/hooks","issue_events_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/issues/events{/number}","events_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/events","assignees_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/assignees{/user}","branches_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/branches{/branch}","tags_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/tags","blobs_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/languages","stargazers_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/stargazers","contributors_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/contributors","subscribers_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/subscribers","subscription_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/subscription","commits_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/contents/{+path}","compare_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/merges","archive_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/downloads","issues_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/issues{/number}","pulls_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/labels{/name}","releases_url":"https://api.github.com/repos/luismartingarcia/acitoolkit/releases{/id}","created_at":"2015-03-27T09:28:18Z","updated_at":"2015-10-15T14:50:22Z","pushed_at":"2015-10-15T17:06:08Z","git_url":"git://github.com/luismartingarcia/acitoolkit.git","ssh_url":"git@github.com:luismartingarcia/acitoolkit.git","clone_url":"https://github.com/luismartingarcia/acitoolkit.git","svn_url":"https://github.com/luismartingarcia/acitoolkit","homepage":"","size":9764,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"datacenter:master","ref":"master","sha":"700c3862118d9066eb34df485a57c551da6bac78","user":{"login":"datacenter","id":1562619,"avatar_url":"https://avatars.githubusercontent.com/u/1562619?v=3","gravatar_id":"","url":"https://api.github.com/users/datacenter","html_url":"https://github.com/datacenter","followers_url":"https://api.github.com/users/datacenter/followers","following_url":"https://api.github.com/users/datacenter/following{/other_user}","gists_url":"https://api.github.com/users/datacenter/gists{/gist_id}","starred_url":"https://api.github.com/users/datacenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datacenter/subscriptions","organizations_url":"https://api.github.com/users/datacenter/orgs","repos_url":"https://api.github.com/users/datacenter/repos","events_url":"https://api.github.com/users/datacenter/events{/privacy}","received_events_url":"https://api.github.com/users/datacenter/received_events","type":"Organization","site_admin":false},"repo":{"id":22358528,"name":"acitoolkit","full_name":"datacenter/acitoolkit","owner":{"login":"datacenter","id":1562619,"avatar_url":"https://avatars.githubusercontent.com/u/1562619?v=3","gravatar_id":"","url":"https://api.github.com/users/datacenter","html_url":"https://github.com/datacenter","followers_url":"https://api.github.com/users/datacenter/followers","following_url":"https://api.github.com/users/datacenter/following{/other_user}","gists_url":"https://api.github.com/users/datacenter/gists{/gist_id}","starred_url":"https://api.github.com/users/datacenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datacenter/subscriptions","organizations_url":"https://api.github.com/users/datacenter/orgs","repos_url":"https://api.github.com/users/datacenter/repos","events_url":"https://api.github.com/users/datacenter/events{/privacy}","received_events_url":"https://api.github.com/users/datacenter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datacenter/acitoolkit","description":"A basic toolkit for accessing the Cisco APIC","fork":false,"url":"https://api.github.com/repos/datacenter/acitoolkit","forks_url":"https://api.github.com/repos/datacenter/acitoolkit/forks","keys_url":"https://api.github.com/repos/datacenter/acitoolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datacenter/acitoolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datacenter/acitoolkit/teams","hooks_url":"https://api.github.com/repos/datacenter/acitoolkit/hooks","issue_events_url":"https://api.github.com/repos/datacenter/acitoolkit/issues/events{/number}","events_url":"https://api.github.com/repos/datacenter/acitoolkit/events","assignees_url":"https://api.github.com/repos/datacenter/acitoolkit/assignees{/user}","branches_url":"https://api.github.com/repos/datacenter/acitoolkit/branches{/branch}","tags_url":"https://api.github.com/repos/datacenter/acitoolkit/tags","blobs_url":"https://api.github.com/repos/datacenter/acitoolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datacenter/acitoolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datacenter/acitoolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/datacenter/acitoolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datacenter/acitoolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/datacenter/acitoolkit/languages","stargazers_url":"https://api.github.com/repos/datacenter/acitoolkit/stargazers","contributors_url":"https://api.github.com/repos/datacenter/acitoolkit/contributors","subscribers_url":"https://api.github.com/repos/datacenter/acitoolkit/subscribers","subscription_url":"https://api.github.com/repos/datacenter/acitoolkit/subscription","commits_url":"https://api.github.com/repos/datacenter/acitoolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/datacenter/acitoolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/datacenter/acitoolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/datacenter/acitoolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/datacenter/acitoolkit/contents/{+path}","compare_url":"https://api.github.com/repos/datacenter/acitoolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datacenter/acitoolkit/merges","archive_url":"https://api.github.com/repos/datacenter/acitoolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datacenter/acitoolkit/downloads","issues_url":"https://api.github.com/repos/datacenter/acitoolkit/issues{/number}","pulls_url":"https://api.github.com/repos/datacenter/acitoolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/datacenter/acitoolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/datacenter/acitoolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datacenter/acitoolkit/labels{/name}","releases_url":"https://api.github.com/repos/datacenter/acitoolkit/releases{/id}","created_at":"2014-07-28T21:27:49Z","updated_at":"2015-10-15T17:43:37Z","pushed_at":"2015-10-15T23:39:30Z","git_url":"git://github.com/datacenter/acitoolkit.git","ssh_url":"git@github.com:datacenter/acitoolkit.git","clone_url":"https://github.com/datacenter/acitoolkit.git","svn_url":"https://github.com/datacenter/acitoolkit","homepage":"","size":13801,"stargazers_count":89,"watchers_count":89,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":79,"mirror_url":null,"open_issues_count":34,"forks":79,"open_issues":34,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datacenter/acitoolkit/pulls/134"},"html":{"href":"https://github.com/datacenter/acitoolkit/pull/134"},"issue":{"href":"https://api.github.com/repos/datacenter/acitoolkit/issues/134"},"comments":{"href":"https://api.github.com/repos/datacenter/acitoolkit/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/datacenter/acitoolkit/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/datacenter/acitoolkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datacenter/acitoolkit/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/datacenter/acitoolkit/statuses/19f72f0342d7b19fdaa000ff16d115cc37ce292c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"michsmit99","id":4249509,"avatar_url":"https://avatars.githubusercontent.com/u/4249509?v=3","gravatar_id":"","url":"https://api.github.com/users/michsmit99","html_url":"https://github.com/michsmit99","followers_url":"https://api.github.com/users/michsmit99/followers","following_url":"https://api.github.com/users/michsmit99/following{/other_user}","gists_url":"https://api.github.com/users/michsmit99/gists{/gist_id}","starred_url":"https://api.github.com/users/michsmit99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michsmit99/subscriptions","organizations_url":"https://api.github.com/users/michsmit99/orgs","repos_url":"https://api.github.com/users/michsmit99/repos","events_url":"https://api.github.com/users/michsmit99/events{/privacy}","received_events_url":"https://api.github.com/users/michsmit99/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":2,"additions":40,"deletions":0,"changed_files":1}}