The User object

The User object is the base object which owns all other objects in a running subuser instance.

class subuserlib.classes.user.User(name=None, homeDir=None)[source]

This class provides a “base” User object used by subuser. This is the stem of a tree like data structure which holds all of the various objects owned by a given user.

You create a new User object by passing the username and home dir of the user.

>>> import subuserlib.classes.user
>>> u = subuserlib.classes.user.User(name="root",homeDir="/root/")
>>> u.homeDir
'/root/'
getConfig()[source]

Get the user’s Config object.

Note: the user’s config will be loaded the first time this is called.

getDockerDaemon()[source]

Get the DockerDaemon object. You will use this to communicate with the Docker daemon.

getEndUser()[source]
getInstalledImages()[source]

Get the user’s InstalledImages list.

Note: the installed images list will be loaded the first time this is called.

getRegistry()[source]

Get the user’s subuser Registry.

Note: the registry will be loaded the first time this is called.

reloadRegistry()[source]

Reload registry from disk.

setRegistry(registry)[source]