Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/source/api/remoteappmanager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ remoteappmanager.paths module
:undoc-members:
:show-inheritance:

remoteappmanager.spawner module
-------------------------------
remoteappmanager.spawners module
--------------------------------

.. automodule:: remoteappmanager.spawner
.. automodule:: remoteappmanager.spawners
:members:
:undoc-members:
:show-inheritance:
Expand Down
8 changes: 4 additions & 4 deletions doc/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ The jupyterhub configuration is documented in the `jupyterhub documentation
<https://jupyterhub.readthedocs.io/en/latest/getting-started.html>`_. The
important difference is the spawner to use, which is configured as::

c.JupyterHub.spawner_class = 'remoteappmanager.spawner.Spawner'
c.JupyterHub.spawner_class = 'remoteappmanager.spawners.SystemUserSpawner'
# or
# c.JupyterHub.spawner_class = 'remoteappmanager.spawner.VirtualUserSpawner'
# c.JupyterHub.spawner_class = 'remoteappmanager.spawners.VirtualUserSpawner'

in the `jupyterhub_config.py` file.

Please refer to :py:mod:`remoteappmanager.spawner` for the available spawners
Please refer to :py:mod:`remoteappmanager.spawners` for the available spawners
in this project.


Expand Down Expand Up @@ -51,7 +51,7 @@ docker setup.
config file. The path of the config file should be specified in the
spawner in `jupyterhub_config.py`::

c.Spawner.config_file_path = "/path/to/config.py"
c.SystemUserSpawner.config_file_path = "/path/to/config.py"

Please refer to :py:class:`remoteappmanager.file_config.FileConfig` for
the configurable parameters. Note that this config file will be used
Expand Down
4 changes: 2 additions & 2 deletions jupyterhub/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
setting_mode = ('system_user', 'virtual_user')[1]

if setting_mode == 'virtual_user':
c.JupyterHub.spawner_class = 'remoteappmanager.spawner.VirtualUserSpawner'
c.JupyterHub.spawner_class = 'remoteappmanager.spawners.VirtualUserSpawner'

# Parent directory in which temporary directory is created for
# each virtual user
Expand All @@ -25,4 +25,4 @@
'remoteappmanager.auth.WorldAuthenticator')

elif setting_mode == 'system_user':
c.JupyterHub.spawner_class = 'remoteappmanager.spawner.Spawner'
c.JupyterHub.spawner_class = 'remoteappmanager.spawners.SystemUserSpawner'
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# of not updating one of them.


class Spawner(LocalProcessSpawner):
class SystemUserSpawner(LocalProcessSpawner):
''' Start remoteappmanager as a local process for a system user.

The user identifier of the process is set to be the system user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tornado import testing
from jupyterhub import orm

from remoteappmanager.spawner import Spawner, VirtualUserSpawner
from remoteappmanager.spawners import SystemUserSpawner, VirtualUserSpawner
from remoteappmanager.tests import fixtures
from remoteappmanager.tests.temp_mixin import TempMixin

Expand Down Expand Up @@ -72,10 +72,10 @@ def new_spawner(spawner_class):
return spawner_class(db=db, user=user, hub=hub)


class TestSpawner(TempMixin, testing.AsyncTestCase):
class TestSystemUserSpawner(TempMixin, testing.AsyncTestCase):
def setUp(self):
super().setUp()
self.spawner = new_spawner(Spawner)
self.spawner = new_spawner(SystemUserSpawner)

def test_args(self):
path = fixtures.get("remoteappmanager_config.py")
Expand Down Expand Up @@ -149,7 +149,7 @@ def test_spawner_start_and_stop_without_config_file(self):
self.assertEqual(status, 1)


class TestVirtualUserSpawner(TestSpawner):
class TestVirtualUserSpawner(TestSystemUserSpawner):
def setUp(self):
super().setUp()
self.spawner = new_spawner(VirtualUserSpawner)
Expand Down