API¶
WIP: this documentation is auto-generated from the source code, but still needs some tweaks.
nua.orchestrator¶
nua.orchestrator.provider.Provider ¶
nua.orchestrator.provider.Provider(provider_config)
Bases: dict
nua.orchestrator.provider.Provider.providers
property
writable
¶
nua.orchestrator.provider.Provider.providers: list
List of sub providers of the object.
Warning: only AppInstance upper class has an actual use of ‘providers’.
This subclass Provider will always provide an empty list.
nua.orchestrator.provider.Provider.label_id
property
writable
¶
nua.orchestrator.provider.Provider.label_id: str
Sanitized version of the app label.
For providers, label_id is the label_id of the main app.
nua.orchestrator.provider.Provider.volume_declaration
property
writable
¶
nua.orchestrator.provider.Provider.volume_declaration: list
Docker volume declared on a non-container provider.
Thus, this volume needs to be started by the upper site.
nua.orchestrator.provider.Provider.rebased_volumes_upon_package_conf ¶
nua.orchestrator.provider.Provider.rebased_volumes_upon_package_conf(
config_dict,
)
nua.orchestrator.provider.Provider.requires_network ¶
nua.orchestrator.provider.Provider.requires_network()
Heuristic to evaluate the need of docker private network.
Basic: using a docker container as provider probably implies need of network.
nua.orchestrator.provider.Provider.is_docker_type ¶
nua.orchestrator.provider.Provider.is_docker_type()
Test if provider has a docker-like type.
nua.orchestrator.provider.Provider.environment_ports ¶
nua.orchestrator.provider.Provider.environment_ports()
Return exposed ports and provider host (container name) as env
variables.
To be used by remote container from same bridge network to
connect to the provider container port.
nua.orchestrator.provider.Volume ¶
nua.orchestrator.provider.Volume()
Representation of a volume attached to a container, either the main app
container or a Provider container.
nua.orchestrator.volume.Volume.parse
classmethod
¶
nua.orchestrator.volume.Volume.parse(data)
Parse a python dict to obtain a Volume instance.
Apply sanity checks if checked is not present.
nua.orchestrator.volume.Volume.normalize_list
classmethod
¶
nua.orchestrator.volume.Volume.normalize_list(volume_list)
Parse each dict of the list to ensure it is valid volume.
Return a list of valid volumes exported as dicts.
nua.orchestrator.provider.force_list ¶
nua.orchestrator.provider.force_list(content)
Return always a list, if a single string is provided, wrap it into
list.
force_list(“foo”)
[‘foo’]
force_list([“foo”, “bar”])
[‘foo’, ‘bar’]
force_list([])
[]
force_list(“”)
[]