Repository: simphony/simphony-remote

Issue:
remoteapprest app start error due to unfound `base_url`
```
(simremote)kit@kit-virtual-machine:jupyterhub$ remoteapprest app start 629b1d86d69bfb4b400dfee204f5e3a0
[W 160718 10:37:39 container:154] HOME (None) is not available for kit
[I 160718 10:37:39 container_manager:218] Got container image: simphonyproject/simphonic-mayavi
[I 2016-07-18 10:37:39.576 JupyterHub log:100] 200 GET /hub/api/authorizations/cookie/jupyter-hub-token-kit/[secret] (kit@172.16.253.129) 8.24ms
[E 160718 10:37:39 container_manager:417] Container 'remoteexec-kit-629b1d86d69bfb4b400dfee204f5e3a0' is gone
[I 160718 10:37:39 container_manager:260] Mounting these volumes: 
    /appdata/image_name/common -> /appdata
[I 160718 10:37:39 container_manager:293] Created container 'remoteexec-kit-629b1d86d69bfb4b400dfee204f5e3a0' (id: 2dcdd6621f8f736322969b25449d5c75566cf617632cb9481f865aeaf919b863) from image simphonyproject/simphonic-mayavi
[I 160718 10:37:39 container_manager:330] Started container 'remoteexec-kit-629b1d86d69bfb4b400dfee204f5e3a0' (id: 2dcdd6621f8f736322969b25449d5c75566cf617632cb9481f865aeaf919b863). Exported port reachable at 127.0.0.1:32769
[E 160718 10:37:39 rest_handler:71] Internal error during POST operation on containers
    Traceback (most recent call last):
      File "/mnt/hgfs/VM_shared/SimPhoNy/simphony-remote/remoteappmanager/rest/rest_handler.py", line 60, in post
        resource_id = yield res_handler.create(data)
      File "/home/kit/.virtualenv/simremote/lib/python3.4/site-packages/tornado/gen.py", line 1015, in run
        value = future.result()
      File "/home/kit/.virtualenv/simremote/lib/python3.4/site-packages/tornado/concurrent.py", line 237, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
      File "/home/kit/.virtualenv/simremote/lib/python3.4/site-packages/tornado/gen.py", line 1021, in run
        yielded = self.gen.throw(*exc_info)
      File "/mnt/hgfs/VM_shared/SimPhoNy/simphony-remote/remoteappmanager/restresources/container.py", line 38, in create
        yield self._wait_for_container_ready(container)
      File "/home/kit/.virtualenv/simremote/lib/python3.4/site-packages/tornado/gen.py", line 1015, in run
        value = future.result()
      File "/home/kit/.virtualenv/simremote/lib/python3.4/site-packages/tornado/concurrent.py", line 237, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
      File "/home/kit/.virtualenv/simremote/lib/python3.4/site-packages/tornado/gen.py", line 285, in wrapper
        yielded = next(result)
      File "/mnt/hgfs/VM_shared/SimPhoNy/simphony-remote/remoteappmanager/restresources/container.py", line 205, in _wait_for_container_ready
        url_path_join(self.application.command_line_config.base_url,
    AttributeError: 'CommandLineConfig' object has no attribute 'base_url'
```

Discussion:

Patch:
diff --git a/remoteappmanager/restresources/container.py b/remoteappmanager/restresources/container.py
index 864e1fd..3191c6b 100644
--- a/remoteappmanager/restresources/container.py
+++ b/remoteappmanager/restresources/container.py
@@ -202,7 +202,7 @@ class Container(Resource):
         server_url = "http://{}:{}{}/".format(
             container.ip,
             container.port,
-            url_path_join(self.application.command_line_config.base_url,
+            url_path_join(self.application.command_line_config.base_urlpath,
                           container.urlpath))
 
         yield _wait_for_http_server_2xx(


Test patch:
diff --git a/tests/restmodel/test_container.py b/tests/restmodel/test_container.py
index f9862e9..ba87141 100644
--- a/tests/restmodel/test_container.py
+++ b/tests/restmodel/test_container.py
@@ -29,7 +29,7 @@ class TestContainer(AsyncHTTPTestCase):
         app.file_config = Mock()
         app.file_config.network_timeout = 5
         app.command_line_config = Mock()
-        app.command_line_config.base_url = "http://127.0.0.1:8000/"
+        app.command_line_config.base_urlpath = "/"
         app.reverse_proxy = Mock()
         app.reverse_proxy.add_container = mock_coro_factory()
         app.reverse_proxy.remove_container = mock_coro_factory()