---

#
# JSON Schema definition for `artemis` provision plugin
#
# https://tmt.readthedocs.io/en/stable/spec/plans.html#artemis
#

$id: /schemas/provision/artemis
$schema: https://json-schema.org/draft-07/schema

type: object
additionalProperties: false

properties:

  how:
    type: string
    enum:
      - artemis

  name:
    type: string

  api-retries:
    type: integer
    minimum: 1

  api-retry-backoff-factor:
    type: integer
    minimum: 1

  api-timeout:
    type: integer
    minimum: 1

  api-url:
    $ref: "/schemas/common#/definitions/url"

  api-version:
    type: string
    pattern: ^[0-9]+\.[0-9]+\.[0-9]+$

  arch:
    $ref: "/schemas/common#/definitions/arch"

  image:
    type: string

  hardware:
    $ref: "/schemas/provision/hardware#/definitions/hardware"

  kickstart:
    $ref: "/schemas/provision/kickstart#/definitions/kickstart"

  pool:
    type: string

  priority-group:
    type: string

  provision-timeout:
    type: integer
    minimum: 1

  provision-tick:
    type: integer
    minimum: 1

  role:
    $ref: "/schemas/common#/definitions/role"

  environment:
    $ref: "/schemas/common#/definitions/environment"

  keyname:
    type: string

  user-data:
    $ref: "/schemas/common#/definitions/object_with_string_properties"

  user:
    type: string

  ssh-option:
    $ref: "/schemas/common#/definitions/one_or_more_strings"

  become:
    type: boolean

  ansible:
    $ref: "/schemas/common#/definitions/provision_ansible"

  watchdog-dispatch-delay:
    type: integer
    minimum: 1

  watchdog-period-delay:
    type: integer
    minimum: 1

  log-type:
    anyOf:
      - type: string
        enum:
          - "console:dump/blob"
          - "console:dump/url"
          - "console:interactive/url"
          - "sys.log:dump/url"
          - "flasher-debug:dump/url"
          - "flasher-debug:dump/blob"
          - "flasher-event:dump/url"
          - "flasher-event:dump/blob"
          - "anaconda.log:dump/blob"
          - "storage.log:dump/blob"
          - "program.log:dump/blob"
          - "packaging.log:dump/blob"
          - "ks.cfg:dump/blob"
      - type: array
        items:
          type: string
          enum:
            - "console:dump/blob"
            - "console:dump/url"
            - "console:interactive/url"
            - "sys.log:dump/url"
            - "flasher-debug:dump/url"
            - "flasher-debug:dump/blob"
            - "flasher-event:dump/url"
            - "flasher-event:dump/blob"
            - "anaconda.log:dump/blob"
            - "storage.log:dump/blob"
            - "program.log:dump/blob"
            - "packaging.log:dump/blob"
            - "ks.cfg:dump/blob"

required:
  - how
