Metadata

Metadata represents common metadata of containers and images.

class conu.apidefs.metadata.Metadata(name=None, identifier=None, labels=None, command=None, creation_timestamp=None, env_variables=None)

Common metadata for container and image

__init__(name=None, identifier=None, labels=None, command=None, creation_timestamp=None, env_variables=None)
Parameters:
  • name – str, name of object
  • identifier – str, id of object
  • labels – dict, {key: value}
  • command – list of str, command to run in the container, example: - [“psql”, “–version”] - [“python3”, “-m”, “http.server”, “–bind”, “0.0.0.0”, “8080”]
  • creation_timestamp – str, creation time of object instance
  • env_variables – dict, {name: value}

Container specific metadata.

class conu.apidefs.metadata.ContainerMetadata(name=None, identifier=None, labels=None, command=None, creation_timestamp=None, env_variables=None, image=None, exposed_ports=None, port_mappings=None, hostname=None, ipv4_addresses=None, ipv6_addresses=None, status=None)

Specific metadata for container

__init__(name=None, identifier=None, labels=None, command=None, creation_timestamp=None, env_variables=None, image=None, exposed_ports=None, port_mappings=None, hostname=None, ipv4_addresses=None, ipv6_addresses=None, status=None)
Parameters:
  • name – str, name of container
  • identifier – str, id of container
  • labels – dict, {key: value}
  • command – list of str, command to run in the container, example: - [“psql”, “–version”] - [“python3”, “-m”, “http.server”, “–bind”, “0.0.0.0”, “8080”]
  • creation_timestamp – str, creation time of container
  • env_variables – dict, {name: value}
  • image – Image, reference to Image instance
  • exposed_ports – list, list of exposed ports
  • port_mappings

    dict, dictionary of port mappings {“container_port”: [host_port1]}, example:

    • {“1111/tcp”:[1234, 4567]} bind host ports 1234 and 4567
    to a single container port 1111/tcp
  • hostname – str, hostname
  • ipv4_addresses – dict, {address: port}
  • ipv6_addresses – dict, {address: port}
  • status – ContainerStatus, container status value, example: - [ContainerStatus.RUNNING] - [ContainerStatus.EXITED]

Image specific metadata.

class conu.apidefs.metadata.ImageMetadata(name=None, identifier=None, labels=None, command=None, creation_timestamp=None, env_variables=None, exposed_ports=None, image_names=None, digest=None, repo_digests=None)

Specific metadata for image

__init__(name=None, identifier=None, labels=None, command=None, creation_timestamp=None, env_variables=None, exposed_ports=None, image_names=None, digest=None, repo_digests=None)
Parameters:
  • name – str, name of image
  • identifier – str, id of image
  • labels – dict, {key: value} example: - {“io.k8s.display-name”: “nginx”}
  • command – list of str, command to run in the container, example: - [“psql”, “–version”] - [“python3”, “-m”, “http.server”, “–bind”, “0.0.0.0”, “8080”]
  • creation_timestamp – str, creation time of image
  • env_variables – dict, {name: value}, example: - {“MYSQL_PASSWORD”: “password”}
  • exposed_ports – list, list of exposed ports
  • image_names – list of str, image names, examples: - [fedora, docker.io/library/fedora:latest]
  • digest – str, hash of the image
  • repo_digests – str, unique pull specification based on digest