model module

class model.Container(name, image, command=None, env=None, identity=None, limits=None, requests=None, ports=[], volumes=None)

Bases: object

Invocation of an image in a specific infastructural context.

class model.Limits(cpus='0.1', gpus='0', memory='128M')

Bases: object

Abstraction of resource limits on a container in a system.

class model.Service(port=None, clients=[])

Bases: object

Model network connectivity rules to the system.

class model.System(name, containers, services={})

Bases: object

Distributed system of interacting containerized software.

containers = None

Construct a map of services.

static parse(name, system, env={}, services={})

Construct a system model based on the input request.

Parses a docker-compose spec into a system specification.

Parameters
  • name – Name of the system.

  • system – Parsed docker-compose specification.

  • env – Dictionary of settings.

  • services – Service specifications - networking configuration.

render(template, context={})

Supply this system as a context to a template.

Parameters

template – Template

requires_network_policy()