class documentation

class PluginCollection(Collection): (source)

View In Hierarchy

Undocumented

Method create Create a new plugin.
Method get Gets a plugin.
Method install Pull and install a plugin.
Method list List plugins installed on the server.

Inherited from Collection:

Method __call__ Undocumented
Method __init__ Undocumented
Method prepare_model Create a model from a set of attributes.
Class Variable model Undocumented
Instance Variable client Undocumented
def create(self, name, plugin_data_dir, gzip=False): (source)

Create a new plugin. Args: name (string): The name of the plugin. The ``:latest`` tag is optional, and is the default if omitted. plugin_data_dir (string): Path to the plugin data directory. Plugin data directory must contain the ``config.json`` manifest file and the ``rootfs`` directory. gzip (bool): Compress the context using gzip. Default: False Returns: (:py:class:`Plugin`): The newly created plugin.

def get(self, name): (source)

Gets a plugin. Args: name (str): The name of the plugin. Returns: (:py:class:`Plugin`): The plugin. Raises: :py:class:`docker.errors.NotFound` If the plugin does not exist. :py:class:`docker.errors.APIError` If the server returns an error.

def install(self, remote_name, local_name=None): (source)

Pull and install a plugin. Args: remote_name (string): Remote reference for the plugin to install. The ``:latest`` tag is optional, and is the default if omitted. local_name (string): Local name for the pulled plugin. The ``:latest`` tag is optional, and is the default if omitted. Optional. Returns: (:py:class:`Plugin`): The installed plugin Raises: :py:class:`docker.errors.APIError` If the server returns an error.

def list(self): (source)

List plugins installed on the server. Returns: (list of :py:class:`Plugin`): The plugins. Raises: :py:class:`docker.errors.APIError` If the server returns an error.