{"action":"created","comment":{"url":"https://api.github.com/repos/simphony/simphony-remote/pulls/comments/69899662","id":69899662,"diff_hunk":"@@ -32,12 +32,22 @@ class Container(HasTraits):\n     #: the id that will go in the URL of the container\n     url_id = Unicode()\n \n+    #: The absolute base prefix path for the container.\n+    base_urlpath = Unicode(None, allow_none=True)\n+\n     @property\n-    def url(self):\n+    def urlpath(self):\n         \"\"\"Returns the relative url of the Container.\"\"\"\n         return \"containers/{}\".format(self.url_id)\n \n     @property\n+    def absurlpath(self):","path":"remoteappmanager/docker/container.py","position":14,"original_position":14,"commit_id":"0dc52bd8206c6eedd198507a026a734e3bd47604","original_commit_id":"009830092a3ecb4470aba3b14cb518777afa0a67","user":{"login":"stefanoborini","id":132967,"avatar_url":"https://avatars.githubusercontent.com/u/132967?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanoborini","html_url":"https://github.com/stefanoborini","followers_url":"https://api.github.com/users/stefanoborini/followers","following_url":"https://api.github.com/users/stefanoborini/following{/other_user}","gists_url":"https://api.github.com/users/stefanoborini/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanoborini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanoborini/subscriptions","organizations_url":"https://api.github.com/users/stefanoborini/orgs","repos_url":"https://api.github.com/users/stefanoborini/repos","events_url":"https://api.github.com/users/stefanoborini/events{/privacy}","received_events_url":"https://api.github.com/users/stefanoborini/received_events","type":"User","site_admin":false},"body":">  I would think a get_container_url as a BaseHandler method maybe good place for it.\r\n\r\nYou can't. The ReverseProxy class has an add_container() method. you pass the container, so the container must know its full absolute path. Unless we make the ReverseProxy aware of the application, which also sounds weird, or we pass the base path to the add_container method, or, as I said, pass a base path to the ReverseProxy class so that it gets appended to every request (and the container only knows its relative path).\r\n\r\nI don' t have a strong opinion on any of these options. They are all weird in some way or another.\r\n","created_at":"2016-07-07T12:48:24Z","updated_at":"2016-07-07T12:48:24Z","html_url":"https://github.com/simphony/simphony-remote/pull/52#discussion_r69899662","pull_request_url":"https://api.github.com/repos/simphony/simphony-remote/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/simphony/simphony-remote/pulls/comments/69899662"},"html":{"href":"https://github.com/simphony/simphony-remote/pull/52#discussion_r69899662"},"pull_request":{"href":"https://api.github.com/repos/simphony/simphony-remote/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/simphony/simphony-remote/pulls/52","id":76412578,"html_url":"https://github.com/simphony/simphony-remote/pull/52","diff_url":"https://github.com/simphony/simphony-remote/pull/52.diff","patch_url":"https://github.com/simphony/simphony-remote/pull/52.patch","issue_url":"https://api.github.com/repos/simphony/simphony-remote/issues/52","number":52,"state":"open","locked":false,"title":"Refactor remote access","user":{"login":"stefanoborini","id":132967,"avatar_url":"https://avatars.githubusercontent.com/u/132967?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanoborini","html_url":"https://github.com/stefanoborini","followers_url":"https://api.github.com/users/stefanoborini/followers","following_url":"https://api.github.com/users/stefanoborini/following{/other_user}","gists_url":"https://api.github.com/users/stefanoborini/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanoborini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanoborini/subscriptions","organizations_url":"https://api.github.com/users/stefanoborini/orgs","repos_url":"https://api.github.com/users/stefanoborini/repos","events_url":"https://api.github.com/users/stefanoborini/events{/privacy}","received_events_url":"https://api.github.com/users/stefanoborini/received_events","type":"User","site_admin":false},"body":"Part of release 0.4.0 but I suspended work on #48 until the database is settled to prevent conflicts.\r\nOpening for comments.\r\n\r\nWhat I am doing is extract the reverse proxy and the hub as independent classes, configured appropriately. We then use methods to perform remote requests.\r\n\r\nNote that this required the container to know its own absolute url path. The container manager cannot know this (it does not know anything about the application) so this information must be set from the outside.\r\n","created_at":"2016-07-06T10:47:27Z","updated_at":"2016-07-07T12:48:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2760544d9b20c1c132a3665d5ea5b9209d9f6745","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/simphony/simphony-remote/pulls/52/commits","review_comments_url":"https://api.github.com/repos/simphony/simphony-remote/pulls/52/comments","review_comment_url":"https://api.github.com/repos/simphony/simphony-remote/pulls/comments{/number}","comments_url":"https://api.github.com/repos/simphony/simphony-remote/issues/52/comments","statuses_url":"https://api.github.com/repos/simphony/simphony-remote/statuses/0dc52bd8206c6eedd198507a026a734e3bd47604","head":{"label":"simphony:refactor-remote-access","ref":"refactor-remote-access","sha":"0dc52bd8206c6eedd198507a026a734e3bd47604","user":{"login":"simphony","id":8048249,"avatar_url":"https://avatars.githubusercontent.com/u/8048249?v=3","gravatar_id":"","url":"https://api.github.com/users/simphony","html_url":"https://github.com/simphony","followers_url":"https://api.github.com/users/simphony/followers","following_url":"https://api.github.com/users/simphony/following{/other_user}","gists_url":"https://api.github.com/users/simphony/gists{/gist_id}","starred_url":"https://api.github.com/users/simphony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simphony/subscriptions","organizations_url":"https://api.github.com/users/simphony/orgs","repos_url":"https://api.github.com/users/simphony/repos","events_url":"https://api.github.com/users/simphony/events{/privacy}","received_events_url":"https://api.github.com/users/simphony/received_events","type":"Organization","site_admin":false},"repo":{"id":61792971,"name":"simphony-remote","full_name":"simphony/simphony-remote","owner":{"login":"simphony","id":8048249,"avatar_url":"https://avatars.githubusercontent.com/u/8048249?v=3","gravatar_id":"","url":"https://api.github.com/users/simphony","html_url":"https://github.com/simphony","followers_url":"https://api.github.com/users/simphony/followers","following_url":"https://api.github.com/users/simphony/following{/other_user}","gists_url":"https://api.github.com/users/simphony/gists{/gist_id}","starred_url":"https://api.github.com/users/simphony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simphony/subscriptions","organizations_url":"https://api.github.com/users/simphony/orgs","repos_url":"https://api.github.com/users/simphony/repos","events_url":"https://api.github.com/users/simphony/events{/privacy}","received_events_url":"https://api.github.com/users/simphony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simphony/simphony-remote","description":"A web service based on Jupyter Hub to spawn simphony aware docker containers that provide browser access (novnc)","fork":false,"url":"https://api.github.com/repos/simphony/simphony-remote","forks_url":"https://api.github.com/repos/simphony/simphony-remote/forks","keys_url":"https://api.github.com/repos/simphony/simphony-remote/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simphony/simphony-remote/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simphony/simphony-remote/teams","hooks_url":"https://api.github.com/repos/simphony/simphony-remote/hooks","issue_events_url":"https://api.github.com/repos/simphony/simphony-remote/issues/events{/number}","events_url":"https://api.github.com/repos/simphony/simphony-remote/events","assignees_url":"https://api.github.com/repos/simphony/simphony-remote/assignees{/user}","branches_url":"https://api.github.com/repos/simphony/simphony-remote/branches{/branch}","tags_url":"https://api.github.com/repos/simphony/simphony-remote/tags","blobs_url":"https://api.github.com/repos/simphony/simphony-remote/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simphony/simphony-remote/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simphony/simphony-remote/git/refs{/sha}","trees_url":"https://api.github.com/repos/simphony/simphony-remote/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simphony/simphony-remote/statuses/{sha}","languages_url":"https://api.github.com/repos/simphony/simphony-remote/languages","stargazers_url":"https://api.github.com/repos/simphony/simphony-remote/stargazers","contributors_url":"https://api.github.com/repos/simphony/simphony-remote/contributors","subscribers_url":"https://api.github.com/repos/simphony/simphony-remote/subscribers","subscription_url":"https://api.github.com/repos/simphony/simphony-remote/subscription","commits_url":"https://api.github.com/repos/simphony/simphony-remote/commits{/sha}","git_commits_url":"https://api.github.com/repos/simphony/simphony-remote/git/commits{/sha}","comments_url":"https://api.github.com/repos/simphony/simphony-remote/comments{/number}","issue_comment_url":"https://api.github.com/repos/simphony/simphony-remote/issues/comments{/number}","contents_url":"https://api.github.com/repos/simphony/simphony-remote/contents/{+path}","compare_url":"https://api.github.com/repos/simphony/simphony-remote/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simphony/simphony-remote/merges","archive_url":"https://api.github.com/repos/simphony/simphony-remote/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simphony/simphony-remote/downloads","issues_url":"https://api.github.com/repos/simphony/simphony-remote/issues{/number}","pulls_url":"https://api.github.com/repos/simphony/simphony-remote/pulls{/number}","milestones_url":"https://api.github.com/repos/simphony/simphony-remote/milestones{/number}","notifications_url":"https://api.github.com/repos/simphony/simphony-remote/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simphony/simphony-remote/labels{/name}","releases_url":"https://api.github.com/repos/simphony/simphony-remote/releases{/id}","deployments_url":"https://api.github.com/repos/simphony/simphony-remote/deployments","created_at":"2016-06-23T09:30:59Z","updated_at":"2016-06-23T09:54:13Z","pushed_at":"2016-07-07T12:43:27Z","git_url":"git://github.com/simphony/simphony-remote.git","ssh_url":"git@github.com:simphony/simphony-remote.git","clone_url":"https://github.com/simphony/simphony-remote.git","svn_url":"https://github.com/simphony/simphony-remote","homepage":null,"size":1598,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":0,"default_branch":"master"}},"base":{"label":"simphony:master","ref":"master","sha":"dcea97e872b6bc132c8e302b483a1fd8f2331689","user":{"login":"simphony","id":8048249,"avatar_url":"https://avatars.githubusercontent.com/u/8048249?v=3","gravatar_id":"","url":"https://api.github.com/users/simphony","html_url":"https://github.com/simphony","followers_url":"https://api.github.com/users/simphony/followers","following_url":"https://api.github.com/users/simphony/following{/other_user}","gists_url":"https://api.github.com/users/simphony/gists{/gist_id}","starred_url":"https://api.github.com/users/simphony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simphony/subscriptions","organizations_url":"https://api.github.com/users/simphony/orgs","repos_url":"https://api.github.com/users/simphony/repos","events_url":"https://api.github.com/users/simphony/events{/privacy}","received_events_url":"https://api.github.com/users/simphony/received_events","type":"Organization","site_admin":false},"repo":{"id":61792971,"name":"simphony-remote","full_name":"simphony/simphony-remote","owner":{"login":"simphony","id":8048249,"avatar_url":"https://avatars.githubusercontent.com/u/8048249?v=3","gravatar_id":"","url":"https://api.github.com/users/simphony","html_url":"https://github.com/simphony","followers_url":"https://api.github.com/users/simphony/followers","following_url":"https://api.github.com/users/simphony/following{/other_user}","gists_url":"https://api.github.com/users/simphony/gists{/gist_id}","starred_url":"https://api.github.com/users/simphony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simphony/subscriptions","organizations_url":"https://api.github.com/users/simphony/orgs","repos_url":"https://api.github.com/users/simphony/repos","events_url":"https://api.github.com/users/simphony/events{/privacy}","received_events_url":"https://api.github.com/users/simphony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simphony/simphony-remote","description":"A web service based on Jupyter Hub to spawn simphony aware docker containers that provide browser access (novnc)","fork":false,"url":"https://api.github.com/repos/simphony/simphony-remote","forks_url":"https://api.github.com/repos/simphony/simphony-remote/forks","keys_url":"https://api.github.com/repos/simphony/simphony-remote/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simphony/simphony-remote/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simphony/simphony-remote/teams","hooks_url":"https://api.github.com/repos/simphony/simphony-remote/hooks","issue_events_url":"https://api.github.com/repos/simphony/simphony-remote/issues/events{/number}","events_url":"https://api.github.com/repos/simphony/simphony-remote/events","assignees_url":"https://api.github.com/repos/simphony/simphony-remote/assignees{/user}","branches_url":"https://api.github.com/repos/simphony/simphony-remote/branches{/branch}","tags_url":"https://api.github.com/repos/simphony/simphony-remote/tags","blobs_url":"https://api.github.com/repos/simphony/simphony-remote/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simphony/simphony-remote/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simphony/simphony-remote/git/refs{/sha}","trees_url":"https://api.github.com/repos/simphony/simphony-remote/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simphony/simphony-remote/statuses/{sha}","languages_url":"https://api.github.com/repos/simphony/simphony-remote/languages","stargazers_url":"https://api.github.com/repos/simphony/simphony-remote/stargazers","contributors_url":"https://api.github.com/repos/simphony/simphony-remote/contributors","subscribers_url":"https://api.github.com/repos/simphony/simphony-remote/subscribers","subscription_url":"https://api.github.com/repos/simphony/simphony-remote/subscription","commits_url":"https://api.github.com/repos/simphony/simphony-remote/commits{/sha}","git_commits_url":"https://api.github.com/repos/simphony/simphony-remote/git/commits{/sha}","comments_url":"https://api.github.com/repos/simphony/simphony-remote/comments{/number}","issue_comment_url":"https://api.github.com/repos/simphony/simphony-remote/issues/comments{/number}","contents_url":"https://api.github.com/repos/simphony/simphony-remote/contents/{+path}","compare_url":"https://api.github.com/repos/simphony/simphony-remote/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simphony/simphony-remote/merges","archive_url":"https://api.github.com/repos/simphony/simphony-remote/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simphony/simphony-remote/downloads","issues_url":"https://api.github.com/repos/simphony/simphony-remote/issues{/number}","pulls_url":"https://api.github.com/repos/simphony/simphony-remote/pulls{/number}","milestones_url":"https://api.github.com/repos/simphony/simphony-remote/milestones{/number}","notifications_url":"https://api.github.com/repos/simphony/simphony-remote/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simphony/simphony-remote/labels{/name}","releases_url":"https://api.github.com/repos/simphony/simphony-remote/releases{/id}","deployments_url":"https://api.github.com/repos/simphony/simphony-remote/deployments","created_at":"2016-06-23T09:30:59Z","updated_at":"2016-06-23T09:54:13Z","pushed_at":"2016-07-07T12:43:27Z","git_url":"git://github.com/simphony/simphony-remote.git","ssh_url":"git@github.com:simphony/simphony-remote.git","clone_url":"https://github.com/simphony/simphony-remote.git","svn_url":"https://github.com/simphony/simphony-remote","homepage":null,"size":1598,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/simphony/simphony-remote/pulls/52"},"html":{"href":"https://github.com/simphony/simphony-remote/pull/52"},"issue":{"href":"https://api.github.com/repos/simphony/simphony-remote/issues/52"},"comments":{"href":"https://api.github.com/repos/simphony/simphony-remote/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/simphony/simphony-remote/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/simphony/simphony-remote/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/simphony/simphony-remote/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/simphony/simphony-remote/statuses/0dc52bd8206c6eedd198507a026a734e3bd47604"}}}}
{"actor":{"display_login":"stefanoborini"}}