---

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

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

type: object
additionalProperties: false

properties:

  how:
    type: string
    enum:
      - virtual

  name:
    type: string

  image:
    type: string

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

  user:
    type: string

  become:
    type: boolean

  key:
    $ref: "/schemas/common#/definitions/one_or_more_strings"

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

  memory:
    type: integer

  disk:
    type: integer

  connection:
    type: string
    enum:
      - session
      - system

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

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

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

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

  stop-retries:
    type: number

  stop-retry-delay:
    type: number

required:
  - how
