{"action":"created","comment":{"url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/comments/45182480","id":45182480,"diff_hunk":"@@ -0,0 +1,249 @@\n+\"\"\"\r\n+Usage:\r\n+    python2 test_case_gen.py\r\n+\r\n+Generates Topologies for Test Cases 0, 1, 2 each using three different\r\n+congestion control algorithms (Dummy (always window size 1), Reno, FAST) and\r\n+saves them to json.\r\n+\r\n+json's are stored in data/test_case_<number>_<flow type>.json\r\n+\"\"\"\r\n+from network_simulator.network_topology import *\r\n+from network_simulator.host import *\r\n+from network_simulator.common import *\r\n+from network_simulator.router import *\r\n+from network_simulator.flow import *\r\n+from network_simulator.link import *\r\n+\r\n+if __name__ == \"__main__\":\r\n+    # test case 0\r\n+    links = list()\r\n+    l1 = Link(end_1_addr = \"H1\", end_2_addr = \"H2\", link_buffer =\r\n+            LinkBuffer(max_buffer_size_bits = 64 * KILOBYTE),\r\n+            static_delay_sec = 0.01, capacity_bps = 10 * MEGABIT)\r\n+    links.append(l1)\r\n+\r\n+    hosts = list()\r\n+    h1 = Host(\"H1\")\r\n+    h2 = Host(\"H2\")\r\n+    hosts.append(h1)\r\n+    hosts.append(h2)\r\n+\r\n+    # generate for FlowDummy\r\n+    flows = list()\r\n+    f1 = FlowDummy(flow_id = \"F1\", source_addr = \"H1\", dest_addr = \"H2\",\r\n+                                  data_size_bits = 20 * MEGABYTE,\r","path":"test_case_gen.py","position":35,"original_position":35,"commit_id":"a64def22d90004898b3c8461a8c898af3d9a329e","original_commit_id":"a64def22d90004898b3c8461a8c898af3d9a329e","user":{"login":"yubo56","id":5651687,"avatar_url":"https://avatars.githubusercontent.com/u/5651687?v=3","gravatar_id":"","url":"https://api.github.com/users/yubo56","html_url":"https://github.com/yubo56","followers_url":"https://api.github.com/users/yubo56/followers","following_url":"https://api.github.com/users/yubo56/following{/other_user}","gists_url":"https://api.github.com/users/yubo56/gists{/gist_id}","starred_url":"https://api.github.com/users/yubo56/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yubo56/subscriptions","organizations_url":"https://api.github.com/users/yubo56/orgs","repos_url":"https://api.github.com/users/yubo56/repos","events_url":"https://api.github.com/users/yubo56/events{/privacy}","received_events_url":"https://api.github.com/users/yubo56/received_events","type":"User","site_admin":false},"body":"PyCharm auto-fix imba","created_at":"2015-11-18T10:24:28Z","updated_at":"2015-11-18T10:24:28Z","html_url":"https://github.com/lakshbhasin/network_simulator/pull/15#discussion_r45182480","pull_request_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/comments/45182480"},"html":{"href":"https://github.com/lakshbhasin/network_simulator/pull/15#discussion_r45182480"},"pull_request":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/15","id":50786787,"html_url":"https://github.com/lakshbhasin/network_simulator/pull/15","diff_url":"https://github.com/lakshbhasin/network_simulator/pull/15.diff","patch_url":"https://github.com/lakshbhasin/network_simulator/pull/15.patch","issue_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/15","number":15,"state":"open","locked":false,"title":"Yubo test case gen","user":{"login":"yubo56","id":5651687,"avatar_url":"https://avatars.githubusercontent.com/u/5651687?v=3","gravatar_id":"","url":"https://api.github.com/users/yubo56","html_url":"https://github.com/yubo56","followers_url":"https://api.github.com/users/yubo56/followers","following_url":"https://api.github.com/users/yubo56/following{/other_user}","gists_url":"https://api.github.com/users/yubo56/gists{/gist_id}","starred_url":"https://api.github.com/users/yubo56/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yubo56/subscriptions","organizations_url":"https://api.github.com/users/yubo56/orgs","repos_url":"https://api.github.com/users/yubo56/repos","events_url":"https://api.github.com/users/yubo56/events{/privacy}","received_events_url":"https://api.github.com/users/yubo56/received_events","type":"User","site_admin":false},"body":"Wrote up a test_case_gen.py script for test cases 0, 1 using three flows Dummy, Reno, Fast","created_at":"2015-11-16T09:23:59Z","updated_at":"2015-11-18T10:24:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26d9df4aa92e62626f47a6259f7939bed0c73d22","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/15/commits","review_comments_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/15/comments","review_comment_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/15/comments","statuses_url":"https://api.github.com/repos/lakshbhasin/network_simulator/statuses/a64def22d90004898b3c8461a8c898af3d9a329e","head":{"label":"lakshbhasin:yubo-test-case-gen","ref":"yubo-test-case-gen","sha":"a64def22d90004898b3c8461a8c898af3d9a329e","user":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"repo":{"id":44171299,"name":"network_simulator","full_name":"lakshbhasin/network_simulator","owner":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lakshbhasin/network_simulator","description":"A network simulator for the project portion of CS 143","fork":false,"url":"https://api.github.com/repos/lakshbhasin/network_simulator","forks_url":"https://api.github.com/repos/lakshbhasin/network_simulator/forks","keys_url":"https://api.github.com/repos/lakshbhasin/network_simulator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lakshbhasin/network_simulator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lakshbhasin/network_simulator/teams","hooks_url":"https://api.github.com/repos/lakshbhasin/network_simulator/hooks","issue_events_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/events{/number}","events_url":"https://api.github.com/repos/lakshbhasin/network_simulator/events","assignees_url":"https://api.github.com/repos/lakshbhasin/network_simulator/assignees{/user}","branches_url":"https://api.github.com/repos/lakshbhasin/network_simulator/branches{/branch}","tags_url":"https://api.github.com/repos/lakshbhasin/network_simulator/tags","blobs_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/refs{/sha}","trees_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lakshbhasin/network_simulator/statuses/{sha}","languages_url":"https://api.github.com/repos/lakshbhasin/network_simulator/languages","stargazers_url":"https://api.github.com/repos/lakshbhasin/network_simulator/stargazers","contributors_url":"https://api.github.com/repos/lakshbhasin/network_simulator/contributors","subscribers_url":"https://api.github.com/repos/lakshbhasin/network_simulator/subscribers","subscription_url":"https://api.github.com/repos/lakshbhasin/network_simulator/subscription","commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/commits{/sha}","git_commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/commits{/sha}","comments_url":"https://api.github.com/repos/lakshbhasin/network_simulator/comments{/number}","issue_comment_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/comments{/number}","contents_url":"https://api.github.com/repos/lakshbhasin/network_simulator/contents/{+path}","compare_url":"https://api.github.com/repos/lakshbhasin/network_simulator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lakshbhasin/network_simulator/merges","archive_url":"https://api.github.com/repos/lakshbhasin/network_simulator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lakshbhasin/network_simulator/downloads","issues_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues{/number}","pulls_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls{/number}","milestones_url":"https://api.github.com/repos/lakshbhasin/network_simulator/milestones{/number}","notifications_url":"https://api.github.com/repos/lakshbhasin/network_simulator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lakshbhasin/network_simulator/labels{/name}","releases_url":"https://api.github.com/repos/lakshbhasin/network_simulator/releases{/id}","created_at":"2015-10-13T11:21:24Z","updated_at":"2015-10-25T21:16:11Z","pushed_at":"2015-11-18T04:38:50Z","git_url":"git://github.com/lakshbhasin/network_simulator.git","ssh_url":"git@github.com:lakshbhasin/network_simulator.git","clone_url":"https://github.com/lakshbhasin/network_simulator.git","svn_url":"https://github.com/lakshbhasin/network_simulator","homepage":null,"size":123,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"lakshbhasin:master","ref":"master","sha":"8eb69d25eba7aa30b8ae564f65139ee97944fe14","user":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"repo":{"id":44171299,"name":"network_simulator","full_name":"lakshbhasin/network_simulator","owner":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lakshbhasin/network_simulator","description":"A network simulator for the project portion of CS 143","fork":false,"url":"https://api.github.com/repos/lakshbhasin/network_simulator","forks_url":"https://api.github.com/repos/lakshbhasin/network_simulator/forks","keys_url":"https://api.github.com/repos/lakshbhasin/network_simulator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lakshbhasin/network_simulator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lakshbhasin/network_simulator/teams","hooks_url":"https://api.github.com/repos/lakshbhasin/network_simulator/hooks","issue_events_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/events{/number}","events_url":"https://api.github.com/repos/lakshbhasin/network_simulator/events","assignees_url":"https://api.github.com/repos/lakshbhasin/network_simulator/assignees{/user}","branches_url":"https://api.github.com/repos/lakshbhasin/network_simulator/branches{/branch}","tags_url":"https://api.github.com/repos/lakshbhasin/network_simulator/tags","blobs_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/refs{/sha}","trees_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lakshbhasin/network_simulator/statuses/{sha}","languages_url":"https://api.github.com/repos/lakshbhasin/network_simulator/languages","stargazers_url":"https://api.github.com/repos/lakshbhasin/network_simulator/stargazers","contributors_url":"https://api.github.com/repos/lakshbhasin/network_simulator/contributors","subscribers_url":"https://api.github.com/repos/lakshbhasin/network_simulator/subscribers","subscription_url":"https://api.github.com/repos/lakshbhasin/network_simulator/subscription","commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/commits{/sha}","git_commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/commits{/sha}","comments_url":"https://api.github.com/repos/lakshbhasin/network_simulator/comments{/number}","issue_comment_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/comments{/number}","contents_url":"https://api.github.com/repos/lakshbhasin/network_simulator/contents/{+path}","compare_url":"https://api.github.com/repos/lakshbhasin/network_simulator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lakshbhasin/network_simulator/merges","archive_url":"https://api.github.com/repos/lakshbhasin/network_simulator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lakshbhasin/network_simulator/downloads","issues_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues{/number}","pulls_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls{/number}","milestones_url":"https://api.github.com/repos/lakshbhasin/network_simulator/milestones{/number}","notifications_url":"https://api.github.com/repos/lakshbhasin/network_simulator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lakshbhasin/network_simulator/labels{/name}","releases_url":"https://api.github.com/repos/lakshbhasin/network_simulator/releases{/id}","created_at":"2015-10-13T11:21:24Z","updated_at":"2015-10-25T21:16:11Z","pushed_at":"2015-11-18T04:38:50Z","git_url":"git://github.com/lakshbhasin/network_simulator.git","ssh_url":"git@github.com:lakshbhasin/network_simulator.git","clone_url":"https://github.com/lakshbhasin/network_simulator.git","svn_url":"https://github.com/lakshbhasin/network_simulator","homepage":null,"size":123,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/15"},"html":{"href":"https://github.com/lakshbhasin/network_simulator/pull/15"},"issue":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/15"},"comments":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/statuses/a64def22d90004898b3c8461a8c898af3d9a329e"}}}}