schema.yaml 1.76 KB
schema;schema_UNIT:
  type: map
  required: True
  mapping:
    _name:
      type: str
      required: True
    MOUNT:
      include: schema_MOUNT
    CHANNELS:
      include: schema_CHANNELS
    COMPUTERS:
      include: schema_COMPUTERS

schema;schema_MOUNT:
  type: map
  mapping:
    _name:
      type: str
      required: True
    _components:
      type: seq
      required: True
      sequence:
        - type: str

schema;schema_CHANNEL:
  type: map
  mapping: 
    _name:
      type: str
      required: True
    _components:
      type: seq
      required: False
      sequence:
        - type: str

schema;schema_COMPUTER:
  type: map
  mapping:
    _name:
      type: str
      required: True
    _file:
      type: str
      required: True
    _hostname:
      type: str
      required: False
    _role:
      type: str
      required: False
    database:
      type: map
      required: False
      mapping:
        name:
          type: str
        port:
          type: int
    _main:
      type: str
      required: False
    agents:
      type: any
      required: False

schema;schema_COMPUTERS:
# TODO: can be improved if we switch to sequence -> we can have any number of computers
  type: seq
  sequence:
    - type: map
      mapping:
        COMPUTER:
          include: schema_COMPUTER
    
schema;schema_UNITS:
  type: seq
  required: True
  sequence:
    - type: map
      mapping : 
        UNIT:
          include: schema_UNIT
    
    

schema;schema_CHANNELS:
  type: seq
  required: True
  sequence:
    - type : map
      mapping:
        CHANNEL:
          include: schema_CHANNEL


type: map
mapping:
    OBSERVATORY:
        type:    map
        required: True
        mapping:
          _name: 
            type: str
          UNITS: 
            include: schema_UNITS