Documentation Models

class motey.models.image.Image(name, engine, id=”, parameters={}, capabilities={}, node=None)[source]

Model object. Represent an image. An image can have execution parameters, required capabilities and the node where it is executed. All of them are optional.

static transform(data)[source]

Static method to translate an image dict into a image model.

Parameters:data (dict) – a dict with image data
Returns:the translated image model, None if something goes wrong
motey.models.schemas

alias of motey.models.schemas

class motey.models.service.Service(service_name, images, id=’b224f78c82b040c79e41e4569b74db47’, state=0, state_message=”)[source]

Model object. Represent a service. A service can have multiple states, action types and service types.

static transform(data)[source]

Static method to translate the service dict data into a service model.

Parameters:data (dict) – service dict to be transformed
Returns:the translated service model, None if something went wrong
class motey.models.systemstatus.SystemStatus[source]

Model which represents the status of the whole system. Possible status values are:

  • used_memory
  • used_cpu
  • network_tx_bytes
  • network_rx_bytes
class motey.models.valinstancestatus.VALInstanceStatus[source]

Model which represents the status of an VAL instance. Possible status values are:

  • name
  • image_name
  • created_at
  • status
  • ip
  • used_memory
  • used_cpu
  • network_tx_bytes
  • network_rx_bytes