swagger: '2.0'
info:
  description: 'Assisted installation'
  version: 1.0.0
  title: AssistedInstall
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
host: api.openshift.com
basePath: /api/assisted-install
tags:
  - name: Assisted installation
    description: Agent-driven installation
  - name: events
    description: Events related to a cluster installation.
  - name: installer
    description: General OpenShift cluster installation APIs.
  - name: managed_domains
    description: Managed dns domains for a cluster installation.
  - name: manifests
    description: Manifests for customizing a cluster installation.
  - name: operators
    description: Information regarding supported operators.
  - name: versions
    description: Information regarding versions.

schemes:
  - http
  - https
consumes:
  - application/json
produces:
  - application/json

securityDefinitions:
  agentAuth:
    type: apiKey
    in: header
    name: X-Secret-Key
  userAuth:
    type: apiKey
    in: header
    name: Authorization
  urlAuth:
    type: apiKey
    in: query
    name: api_key
  imageAuth:
    type: apiKey
    in: header
    name: Image-Token
  imageURLAuth:
    type: apiKey
    in: query
    name: image_token
  watcherAuth:
    type: apiKey
    in: header
    name: Watcher-Authorization

security:
  - userAuth: [admin, user]

paths:
  /v2/clusters:
    post:
      tags:
        - installer
      description: Creates a new OpenShift cluster definition.
      operationId: v2RegisterCluster
      parameters:
        - in: body
          name: new-cluster-params
          description: The properties describing the new cluster.
          required: true
          schema:
            $ref: '#/definitions/cluster-create-params'
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
        - watcherAuth: []
      description: Retrieves the list of OpenShift clusters.
      operationId: v2ListClusters
      parameters:
        - in: header
          name: get_unregistered_clusters
          description: Whether to return clusters that have been unregistered.
          type: boolean
          required: false
          default: false
        - in: query
          name: openshift_cluster_id
          description: A specific cluster to retrieve.
          type: string
          format: uuid
          required: false
        - in: query
          name: ams_subscription_ids
          description: If non-empty, returned Clusters are filtered to those with matching subscription IDs.
          required: false
          type: array
          items:
            type: string
        - in: query
          name: with_hosts
          description: Include hosts in the returned list.
          type: boolean
          allowEmptyValue: true
          default: false
        - in: query
          name: owner
          description: If provided, returns only clusters that are owned by the specified user.
          type: string
          required: false
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/cluster-list'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
        - agentAuth: []
        - watcherAuth: []
      description: Retrieves the details of the OpenShift cluster.
      operationId: v2GetCluster
      parameters:
        - in: path
          name: cluster_id
          description: The cluster to be retrieved.
          type: string
          format: uuid
          required: true
        - in: header
          name: discovery_agent_version
          description: The software version of the discovery agent that is retrieving the cluster details.
          type: string
          required: false
        - in: header
          name: get_unregistered_clusters
          description: Whether to return clusters that have been unregistered.
          type: boolean
          required: false
          default: false
        - in: query
          name: exclude-hosts
          description: If true, do not include hosts.
          type: boolean
          required: false
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

    delete:
      tags:
        - installer
      description: Deletes an OpenShift cluster definition.
      operationId: v2DeregisterCluster
      parameters:
        - in: path
          name: cluster_id
          description: The cluster to be deregistered.
          format: uuid
          type: string
          required: true
      responses:
        "204":
          description: Success.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

    patch:
      tags:
        - installer
      description: Updates an OpenShift cluster definition.
      operationId: V2UpdateCluster
      parameters:
        - in: path
          name: cluster_id
          description: The cluster to be updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: cluster-update-params
          description: The properties to update.
          required: true
          schema:
            $ref: '#/definitions/v2-cluster-update-params'
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/progress:
    put:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Update installation finalizing progress.
      operationId: v2UpdateClusterFinalizingProgress
      parameters:
        - in: path
          name: cluster_id
          description: The cluster being updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: finalizing-progress
          description: New progress value.
          required: true
          schema:
            $ref: '#/definitions/cluster-finalizing-progress'
      responses:
        "200":
          description: Update install progress.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/hosts:
    get:
      tags:
        - installer
      description: Get a list of cluster hosts according to supplied filters.
      operationId: ListClusterHosts
      security:
        - userAuth: [ admin, read-only-admin, user ]
        - agentAuth: []
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose hosts should be retrieved.
          type: string
          format: uuid
          required: true
        - in: query
          name: role
          description: Role to request.
          type: string
          enum: ['master', 'worker', 'auto-assign']
          required: false
        - in: query
          description: Hosts status to request.
          name: status
          type: string
          required: false
        - in: query
          name: with-inventory
          description: If true return the host's inventory.
          type: boolean
          required: false
        - in: query
          description: If true return the host's connectivity.
          name: with-connectivity
          type: boolean
          required: false
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/host-list'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/supported-platforms:
    get:
      tags:
        - installer
      description: A list of platforms that this cluster can support in its current configuration.
      operationId: GetClusterSupportedPlatforms
      security:
        - userAuth: [ admin, read-only-admin, user ]
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose platform types should be retrieved.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            type: array
            items:
              $ref: '#/definitions/platform_type'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs:
    post:
      tags:
        - installer
      description: Creates a new OpenShift Discovery ISO.
      operationId: RegisterInfraEnv
      parameters:
        - in: body
          name: infraenv-create-params
          description: The parameters for the generated ISO.
          required: true
          schema:
            $ref: '#/definitions/infra-env-create-params'
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/infra-env'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'

    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
        - watcherAuth: []
      description: Retrieves the list of infra-envs.
      operationId: ListInfraEnvs
      parameters:
        - in: query
          name: cluster_id
          description: If provided, returns only infra-envs which directly reference this cluster.
          type: string
          format: uuid
          required: false
        - in: query
          name: owner
          description: If provided, returns only infra-envs that are owned by the specified user.
          type: string
          required: false
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/infra-env-list'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
        - agentAuth: []
        - urlAuth: []
        - imageAuth: []
        - imageURLAuth: []
      description: Retrieves the details of the infra-env.
      operationId: GetInfraEnv
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env to be retrieved.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/infra-env'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

    patch:
      tags:
        - installer
      description: Updates an infra-env.
      operationId: UpdateInfraEnv
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env to be updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: infra-env-update-params
          description: The properties to update.
          required: true
          schema:
            $ref: '#/definitions/infra-env-update-params'
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/infra-env'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'

    delete:
      tags:
        - installer
      description: Deletes an infra-env.
      operationId: DeregisterInfraEnv
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env to be deleted.
          format: uuid
          type: string
          required: true
      responses:
        "204":
          description: Success.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/downloads/image-url:
    get:
      tags:
        - installer
      description: Creates a new pre-signed image download URL for the infra-env.
      operationId: GetInfraEnvDownloadURL
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env to be retrieved.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/presigned-url'
        "400":
          description: Bad Request.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts:
    post:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Registers a new OpenShift agent.
      operationId: v2RegisterHost
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env that the agent is associated with.
          type: string
          format: uuid
          required: true
        - in: body
          name: new-host-params
          description: The description of the agent being registered.
          required: true
          schema:
            $ref: '#/definitions/host-create-params'
        - in: header
          name: discovery_agent_version
          description: The software version of the discovery agent that is registering the agent.
          type: string
          required: false
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/host_registration_response'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Cluster cannot accept new agents due to its current state.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
        - agentAuth: []
      description: Retrieves the list of OpenShift hosts that belong the infra-env.
      operationId: v2ListHosts
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env that the hosts are asociated with.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/host-list'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
      description: Retrieves the details of the OpenShift host.
      operationId: v2GetHost
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host that should be retrieved.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that should be retrieved.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/host'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
    patch:
      tags:
        - installer
      description: Update an Openshift host
      operationId: v2UpdateHost
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env ID of the host to be updated.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that should be updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: host-update-params
          description: The properties to update.
          required: true
          schema:
            $ref: '#/definitions/host-update-params'
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/host'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
    delete:
      tags:
        - installer
      description: Deregisters an OpenShift host.
      operationId: v2DeregisterHost
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host that should be deregistered.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that should be deregistered.
          type: string
          format: uuid
          required: true
      responses:
        "204":
          description: Success.
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/instructions:
    get:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Retrieves the next operations that the host agent needs to perform.
      operationId: v2GetNextSteps
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host that is retrieving instructions.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that is retrieving instructions.
          type: string
          format: uuid
          required: true
        - in: query
          name: timestamp
          type: integer
          description: The time on the host as seconds since the Unix epoch.
          required: false
        - in: header
          name: discovery_agent_version
          description: The software version of the discovery agent that is retrieving instructions.
          type: string
          required: false
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/steps'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

    post:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Posts the result of the operations from the host agent.
      operationId: v2PostStepReply
      parameters:
        - in: header
          name: discovery_agent_version
          description: The software version of the discovery agent that is posting results.
          type: string
          required: false
        - in: path
          name: infra_env_id
          description: The infra-env of the host that is posting results.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that is posting results.
          type: string
          format: uuid
          required: true
        - name: reply
          description: The results to be posted.
          in: body
          schema:
            $ref: '#/definitions/step-reply'
      responses:
        "204":
          description: Success.
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/progress:
    put:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Update installation progress.
      operationId: v2UpdateHostInstallProgress
      parameters:
        - in: header
          name: discovery_agent_version
          description: The software version of the discovery agent that is updating progress.
          type: string
          required: false
        - in: path
          name: infra_env_id
          description: The infra-env of the host being updated.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The ID of the host to update.
          type: string
          format: uuid
          required: true
        - in: body
          name: host-progress
          description: New progress value.
          required: true
          schema:
            $ref: '#/definitions/host-progress'
      responses:
        "200":
          description: Update install progress.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/bind:
    post:
      tags:
        - installer
      description: Bind host to a cluster
      operationId: BindHost
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host that is being bound.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that is being bound.
          type: string
          format: uuid
          required: true
        - name: bind-host-params
          description: The parameters for the host binding.
          in: body
          required: true
          schema:
            $ref: '#/definitions/bind-host-params'
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/host'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/unbind:
    post:
      tags:
        - installer
      description: Unbind host to a cluster
      operationId: UnbindHost
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host that is being bound.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that is being bound.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/host'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Conflict.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/reset-validation/{validation_id}:
    patch:
      tags:
        - installer
      summary: Reset failed host validation.
      operationId: v2ResetHostValidation
      description: Reset failed host validation. It may be performed on any host validation with persistent validation result.
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host that its validation is being reset.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that its validation is being reset.
          type: string
          format: uuid
          required: true
        - in: path
          description: The id of the validation being reset.
          type: string
          name: validation_id
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/host'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/reset:
    post:
      tags:
        - installer
      description: reset a failed host for day2 cluster.
      operationId: v2ResetHost
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host that is being reset.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that is being reset.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/host'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/actions/install:
    post:
      tags:
        - installer
      description: install specific host for day2 cluster.
      operationId: v2InstallHost
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host that is being installed.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host that is being installed.
          type: string
          format: uuid
          required: true
      responses:
        "202":
          description: Success.
          schema:
            $ref: '#/definitions/host'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/installer-args:
    patch:
      tags:
        - installer
      description: Updates a host's installer arguments.
      operationId: v2UpdateHostInstallerArgs
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host whose installer arguments should be updated.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host whose installer arguments should be updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: installer-args-params
          description: The updated installer arguments.
          required: true
          schema:
            $ref: '#/definitions/installer-args-params'
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/host'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/ignition:
    get:
      tags:
        - installer
      description: Fetch the ignition file for this host as a string. In case of unbound host produces an error
      operationId: v2GetHostIgnition
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host whose ignition file should be obtained.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host whose ignition file should be obtained.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/host-ignition-params'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'
    patch:
      tags:
        - installer
      description: Patch the ignition file for this host
      operationId: v2UpdateHostIgnition
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host whose ignition file should be updated.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host whose ignition file should be updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: host-ignition-params
          description: Ignition config overrides.
          required: true
          schema:
            $ref: '#/definitions/host-ignition-params'
      responses:
        "201":
          description: Success.
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/downloads/files:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
        - agentAuth: []
        - urlAuth: []
        - imageAuth: []
        - imageURLAuth: []
      description: Downloads the customized ignition file for this host
      operationId: v2DownloadInfraEnvFiles
      produces:
        - application/octet-stream
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env whose file should be downloaded.
          type: string
          format: uuid
          required: true
        - in: query
          name: file_name
          description: The file to be downloaded.
          type: string
          enum: [discovery.ign, ipxe-script, static-network-config]
          required: true
        - in: query
          name: mac
          description: Mac address of the host running ipxe script.
          type: string
          format: mac
          required: false
        - in: query
          name: ipxe_script_type
          description: Specify the script type to be served for iPXE.
          required: false
          type: string
          enum: ['discovery-image-always', 'boot-order-control']
        - in: query
          name: discovery_iso_type
          description: Overrides the ISO type for the disovery ignition, either 'full-iso' or 'minimal-iso'.
          required: false
          type: string
          enum: ['full-iso', 'minimal-iso']
      responses:
        "200":
          description: Success.
          schema:
            type: file
        "400":
          description: Bad Request.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/downloads/files-presigned:
    get:
      tags:
        - installer
      description: Creates a new pre-signed download URL for the infra-env.
      operationId: GetInfraEnvPresignedFileURL
      parameters:
        - in: path
          name: infra_env_id
          description: The file's infra-env.
          type: string
          format: uuid
          required: true
        - in: query
          name: file_name
          description: The file to be downloaded.
          type: string
          enum: [discovery.ign, ipxe-script]
          required: true
        - in: query
          name: ipxe_script_type
          description: Specify the script type to be served for iPXE.
          required: false
          type: string
          enum: ['discovery-image-always', 'boot-order-control']
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/presigned-url'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/hosts/{host_id}/logs-progress:
    put:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Update log collection state and progress.
      operationId: v2UpdateHostLogsProgress
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env whose log progress is being updated.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host whose log progress is being updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: logs-progress-params
          description: Parameters for updating log progress.
          required: true
          schema:
            $ref: '#/definitions/logs-progress-params'
      responses:
        "204":
          description: Update cluster install progress.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/regenerate-signing-key:
    post:
      tags:
        - installer
      description: Regenerate InfraEnv token signing key.
      operationId: RegenerateInfraEnvSigningKey
      parameters:
        - in: path
          name: infra_env_id
          description: The target InfraEnv.
          type: string
          format: uuid
          required: true
      responses:
        "204":
          description: Success.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/default-config:
    get:
      tags:
        - installer
      security:
        - userAuth: [ admin, read-only-admin, user ]
      description: Get the default values for various cluster properties.
      operationId: V2GetClusterDefaultConfig
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/cluster_default_config'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/downloads/credentials-presigned:
    get:
      tags:
        - installer
      security:
        - userAuth: [user]
      description: Get the cluster admin credentials.
      operationId: V2GetPresignedForClusterCredentials
      parameters:
        - in: path
          name: cluster_id
          description: The cluster that owns the file that should be downloaded.
          type: string
          format: uuid
          required: true
        - in: query
          name: file_name
          description: The file to be downloaded.
          type: string
          enum: [kubeadmin-password, kubeconfig, kubeconfig-noingress]
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/presigned-url'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/credentials:
    get:
      tags:
        - installer
      security:
        - userAuth: [ user ]
      description: Get the cluster admin credentials.
      operationId: V2GetCredentials
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose admin credentials should be retrieved.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/credentials'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/downloads/files:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
        - agentAuth: []
        - urlAuth: []
      description: Downloads files relating to the installed/installing cluster.
      operationId: V2DownloadClusterFiles
      produces:
        - application/octet-stream
      parameters:
        - in: path
          name: cluster_id
          description: The cluster that owns the file that should be downloaded.
          type: string
          format: uuid
          required: true
        - in: query
          name: file_name
          description: The file to be downloaded.
          type: string
          enum: [bootstrap.ign, master.ign, metadata.json, worker.ign, install-config.yaml, custom_manifests.json, custom_manifests.yaml]
          required: true
        - in: header
          name: discovery_agent_version
          description: The software version of the discovery agent that is downloading the file.
          type: string
          required: false
      responses:
        "200":
          description: Success.
          schema:
            type: file
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/downloads/credentials:
    get:
      tags:
        - installer
      security:
        - userAuth: [user]
        - urlAuth: []
        - agentAuth: []
      description: Downloads credentials relating to the installed/installing cluster.
      operationId: V2DownloadClusterCredentials
      produces:
        - application/octet-stream
      parameters:
        - in: path
          name: cluster_id
          description: The cluster that owns the credential file that should be downloaded.
          type: string
          format: uuid
          required: true
        - in: query
          name: file_name
          description: The credential file to be downloaded.
          type: string
          enum: [kubeadmin-password, kubeconfig, kubeconfig-noingress]
          required: true
      responses:
        "200":
          description: Success.
          schema:
            type: file
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/downloads/files-presigned:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
      description: Retrieves a pre-signed S3 URL for downloading cluster files.
      operationId: V2GetPresignedForClusterFiles
      parameters:
        - in: path
          name: cluster_id
          description: The cluster that owns the file that should be downloaded.
          type: string
          format: uuid
          required: true
        - in: query
          name: file_name
          description: The file to be downloaded.
          type: string
          enum: [bootstrap.ign, master.ign, metadata.json, worker.ign, install-config.yaml, logs, manifests]
          required: true
        - in: query
          name: logs_type
          description: If downloading logs, the type of logs to download.
          type: string
          enum: ["host", "controller", "all"]
          required: false
        - in: query
          name: host_id
          description: If downloading a file related to a host, the relevant host.
          type: string
          format: uuid
          required: false
        - in: query
          name: additional_name
          description: If downloading a manifest, the file name, prefaced with folder name, for example, openshift/99-openshift-xyz.yaml.
          type: string
          required: false
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/presigned-url'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-envs/{infra_env_id}/downloads/minimal-initrd:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
        - urlAuth: []
        - imageAuth: []
      description: |
        Get the initial ramdisk for minimal ISO based installations.
      operationId: DownloadMinimalInitrd
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host that should be retrieved.
          type: string
          format: uuid
          required: true
      produces:
        - application/octet-stream
      responses:
        "200":
          description: Success.
          schema:
            type: string
            format: binary
        "204":
          description: Empty Success.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Conflict.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/install-config:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
      description: Get the cluster's install config YAML.
      operationId: v2GetClusterInstallConfig
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose install config is being retrieved.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            type: string
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
    patch:
      tags:
        - installer
      description: Override values in the install config.
      operationId: v2UpdateClusterInstallConfig
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose install config is being updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: install-config-params
          description: Install config overrides.
          required: true
          schema:
            type: string
      responses:
        "201":
          description: Success.
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/domains:
    get:
      tags:
        - managed_domains
      security:
        - userAuth: [admin, read-only-admin, user]
      description: List of managed DNS domains.
      operationId: V2ListManagedDomains
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/list-managed-domains'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/actions/install:
    post:
      tags:
        - installer
      description: Installs the OpenShift cluster.
      operationId: v2InstallCluster
      parameters:
        - in: path
          name: cluster_id
          description: The cluster to be installed.
          type: string
          format: uuid
          required: true
      responses:
        "202":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/actions/cancel:
    post:
      tags:
        - installer
      description: Cancels an ongoing installation.
      operationId: V2CancelInstallation
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose installation is to be canceled.
          type: string
          format: uuid
          required: true
      responses:
        "202":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/actions/reset:
    post:
      tags:
        - installer
      description: Resets a failed installation.
      operationId: v2ResetCluster
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose installation is to be reset.
          type: string
          format: uuid
          required: true
      responses:
        "202":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/actions/allow-add-workers:
    post:
      tags:
        - installer
      description: Deprecated, maintained for legacy purposes. Does the same thing as allow-add-hosts. Use allow-add-hosts instead.
      deprecated: true
      operationId: TransformClusterToDay2
      parameters:
        - in: path
          name: cluster_id
          description: The cluster to transform.
          type: string
          format: uuid
          required: true
      responses:
        "202":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/actions/allow-add-hosts:
    post:
      tags:
        - installer
      description: Transforms installed cluster to a state which allows adding hosts.
      operationId: TransformClusterToAddingHosts
      parameters:
        - in: path
          name: cluster_id
          description: The cluster to transform.
          type: string
          format: uuid
          required: true
      responses:
        "202":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/preflight-requirements:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
      description: Get preflight requirements for a cluster.
      operationId: v2GetPreflightRequirements
      parameters:
        - in: path
          name: cluster_id
          description: The cluster to return preflight requirements for.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/preflight-hardware-requirements'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/supported-operators/{operator_name}:
    get:
      tags:
        - operators
      security:
        - userAuth: [admin, read-only-admin, user]
      description: Lists properties for an operator.
      operationId: V2ListOperatorProperties
      parameters:
        - in: path
          name: operator_name
          description: The operator name.
          type: string
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/operator-properties'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/supported-operators:
    get:
      tags:
        - operators
      operationId: V2ListSupportedOperators
      description: Retrieves the list of supported operators.
      responses:
        "200":
          description: Success.
          schema:
            type: array
            items:
              type: string
              enum:
              - 'amd-gpu'
              - 'lso'
              - 'mtv'
              - 'openshift-ai'
              - 'osc'
              - 'servicemesh'
              - 'authorino'
              - 'cnv'
              - 'nvidia-gpu'
              - 'pipelines'
              - 'odf'
              - 'lvm'
              - 'mce'
              - 'node-feature-discovery'
              - 'serverless'
              - 'nmstate'
              - 'kmm'
              - 'node-healthcheck'
              - 'self-node-remediation'
              - 'fence-agents-remediation'
              - 'node-maintenance'
              - 'kube-descheduler'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/operators/bundles:
    get:
      tags:
        - operators
      summary: Get list of avaliable bundles 
      description: Retrieves a list of avaliable bundles.
      operationId: V2ListBundles
      responses:
        "200":
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/bundle'
        "500":
          description: Internal server error
          schema:
            $ref: '#/definitions/error'

  /v2/operators/bundles/{id}:
    get:
      tags:
        - operators
      summary: Get operator properties for a bundle
      description: Retrieves an array of operator properties for the specified bundle.
      operationId: V2GetBundle
      parameters:
        - in: path
          name: id
          description: Identifier of the bundle, for example, `virtualization` or `openshift-ai-nvidia`.
          required: true
          type: string
      responses:
        "200":
          description: Success
          schema:
            $ref: '#/definitions/bundle'
        "404":
          description: Bundle not found
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Internal server error
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/uploads/ingress-cert:
    post:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Transfer the ingress certificate for the cluster.
      operationId: v2UploadClusterIngressCert
      parameters:
        - in: path
          name: cluster_id
          description: The cluster to associate with the ingress certificate.
          type: string
          format: uuid
          required: true
        - in: body
          name: ingress-cert-params
          description: The ingress certificate.
          required: true
          schema:
            $ref: '#/definitions/ingress-cert-params'
        - in: header
          name: discovery_agent_version
          description: The software version of the discovery agent that is uploading the ingress certificate.
          type: string
          required: false
      responses:
        "201":
          description: Success.
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/actions/complete-installation:
    post:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Agent API to mark a finalizing installation as complete and progress to 100%.
      operationId: v2CompleteInstallation
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose installation is being completing.
          type: string
          format: uuid
          required: true
        - in: body
          name: completion-params
          description: The final status of the cluster installation.
          required: true
          schema:
            $ref: '#/definitions/completion-params'
        - in: header
          name: discovery_agent_version
          description: The software version of the discovery agent that is completing the installation.
          type: string
          required: false
      responses:
        "202":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/logs-progress:
    put:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Update log collection state and progress.
      operationId: v2UpdateClusterLogsProgress
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose log progress is being updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: logs-progress-params
          description: Parameters for updating log progress.
          required: true
          schema:
            $ref: '#/definitions/logs-progress-params'
      responses:
        "204":
          description: Update cluster install progress.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/manifests:
    get:
      tags:
        - manifests
      security:
        - userAuth: []
      description: Lists manifests for customizing cluster installation.
      operationId: V2ListClusterManifests
      parameters:
        - in: path
          name: cluster_id
          description: The cluster for which the manifests should be listed.
          type: string
          format: uuid
          required: true
        - in: query
          name: include_system_generated
          description: Include system generated manifests in results? Default is false.
          type: boolean
          required: false
          default: false
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/list-manifests'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

    post:
      tags:
        - manifests
      security:
        - userAuth: []
      description: Creates a manifest for customizing cluster installation.
      operationId: V2CreateClusterManifest
      parameters:
        - in: path
          name: cluster_id
          description: The cluster for which a new manifest should be created.
          type: string
          format: uuid
          required: true
        - in: body
          name: CreateManifestParams
          description: The new manifest to create.
          required: true
          schema:
            $ref: '#/definitions/create-manifest-params'
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/manifest'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

    patch:
      tags:
        - manifests
      security:
        - userAuth: []
      description: Updates a manifest for customizing cluster installation.
      operationId: V2UpdateClusterManifest
      parameters:
        - in: path
          name: cluster_id
          description: The cluster for which a new manifest should be updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: UpdateManifestParams
          description: The manifest to be updated.
          required: true
          schema:
            $ref: '#/definitions/update-manifest-params'
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/manifest'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

    delete:
      tags:
        - manifests
      description: Deletes a manifest from the cluster.
      operationId: V2DeleteClusterManifest
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose manifest should be deleted.
          type: string
          format: uuid
          required: true
        - in: query
          name: folder
          description: The folder that contains the files. Manifests can be placed in 'manifests' or 'openshift' directories.
          type: string
          enum: [manifests,openshift]
          required: false
          default: manifests
        - in: query
          name: file_name
          description: The manifest file name to delete from the cluster.
          type: string
          required: true
      responses:
        "200":
          description: Success.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/component-versions:
    get:
      tags:
        - versions
      security:
        - userAuth: [admin, read-only-admin, user]
      description: List of component versions.
      operationId: v2ListComponentVersions
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/list-versions'

  /v2/openshift-versions:
    get:
      tags:
        - versions
      security:
        - userAuth: [admin, read-only-admin, user]
      operationId: v2ListSupportedOpenshiftVersions
      description: Retrieves the list of OpenShift supported versions.
      parameters:
        - in: query
          name: version
          description: Retrieves only the versions that contain the specified substring in their display name.
          type: string
        - in: query
          name: only_latest
          description: If true, returns only the latest version for each minor.
          type: boolean
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/openshift-versions'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/release-sources:
    get:
      tags:
        - versions
      security:
        - userAuth: [admin, read-only-admin, user]
      operationId: v2ListReleaseSources
      description: Retrieves openshift release sources configuration.
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/release-sources'

  /v2/clusters/{cluster_id}/manifests/files:
    get:
      tags:
        - manifests
      security:
        - userAuth: []
      description: Downloads cluster manifest.
      operationId: v2DownloadClusterManifest
      produces:
        - application/octet-stream
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose manifest should be downloaded.
          type: string
          format: uuid
          required: true
        - in: query
          name: folder
          description: The folder that contains the files. Manifests can be placed in 'manifests' or 'openshift' directories.
          type: string
          enum: [manifests,openshift]
          required: false
          default: manifests
        - in: query
          name: file_name
          description: The manifest file name to download.
          type: string
          required: true
      responses:
        "200":
          description: Success.
          schema:
            type: file
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/logs:
    get:
      tags:
        - installer
      description: Download cluster logs.
      security:
        - userAuth: [admin, read-only-admin, user]
        - urlAuth: []
      operationId: V2DownloadClusterLogs
      produces:
        - 'application/octet-stream'
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose logs should be downloaded.
          type: string
          format: uuid
          required: true
        - in: query
          name: logs_type
          description: The type of logs to be downloaded.
          type: string
          enum: ['host', 'controller', 'all']
          required: false
        - in: query
          name: host_id
          description: A specific host in the cluster whose logs should be downloaded.
          type: string
          format: uuid
          required: false
      responses:
        "200":
          description: Success.
          schema:
            type: file
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
    post:
      tags:
        - installer
      security:
        - agentAuth: []
      description: Agent API to upload logs.
      operationId: V2UploadLogs
      consumes:
        - multipart/form-data
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose logs should be uploaded.
          type: string
          format: uuid
          required: true
        - in: formData
          name: upfile
          description: The log file to be uploaded.
          type: file
          required: false
          maxLength: 104857600  #100MB
          x-mimetype: application/zip
        - in: query
          name: logs_type
          description: The type of log file to be uploaded.
          type: string
          enum: ['host', 'controller']
          required: true
        - in: query
          name: infra_env_id
          description: The infra-env ID of the host.
          type: string
          format: uuid
          required: false
        - in: query
          name: host_id
          description: The host whose logs should be uploaded.
          type: string
          format: uuid
          required: false
      responses:
        "204":
          description: Success.
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/monitored-operators:
    get:
      tags:
        - operators
        - installer
      security:
        - agentAuth: []
      description: Lists operators to be monitored for a cluster.
      operationId: V2ListOfClusterOperators
      parameters:
        - in: path
          name: cluster_id
          description: The cluster to return operators for.
          type: string
          format: uuid
          required: true
        - in: query
          name: operator_name
          description: An operator in the specified cluster to return its data.
          type: string
          required: false
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/monitored-operators-list'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'


    put:
      tags:
        - operators
        - installer
      security:
        - agentAuth: []
      description: Controller API to report of monitored operators.
      operationId: v2ReportMonitoredOperatorStatus
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose operators are being monitored.
          type: string
          format: uuid
          required: true
        - in: body
          name: report-params
          description: The operators monitor report.
          required: true
          schema:
            $ref: '#/definitions/operator-monitor-report'
      responses:
        "200":
          description: Success.
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/infra-env/{infra_env_id}/hosts/{host_id}/downloads/ignition:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
        - agentAuth: []
      description: Downloads the customized ignition file for this bound host, produces octet stream. For unbound host - error is returned
      operationId: v2DownloadHostIgnition
      produces:
        - application/octet-stream
      parameters:
        - in: path
          name: infra_env_id
          description: The infra-env of the host whose ignition file should be downloaded.
          type: string
          format: uuid
          required: true
        - in: path
          name: host_id
          description: The host whose ignition file should be downloaded.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            type: file
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/events:
    get:
      tags:
        - events
      security:
        - userAuth: [admin, read-only-admin, user]
        - urlAuth: []
        - watcherAuth: []
      description: Lists events for a cluster.
      operationId: v2ListEvents
      parameters:
        - in: query
          name: cluster_id
          description: The cluster to return events for.
          type: string
          format: uuid
          required: false
        - in: query
          name: host_id
          description: A host in the specified cluster to return events for (DEPRECATED. Use `host_ids` instead).
          type: string
          format: uuid
          required: false
        - in: query
          name: host_ids
          description: Hosts in the specified cluster to return events for.
          type: array
          items:
            type: string
            format: uuid
          required: false
        - in: query
          name: infra_env_id
          description: The infra-env to return events for.
          type: string
          format: uuid
          required: false
        - in: query
          name: limit
          description: The maximum number of records to retrieve.
          type: integer
          required: false
        - in: query
          name: offset
          description: Number of records to skip before starting to return the records.
          type: integer
          required: false
        - in: query
          name: order
          description: Order by event_time of events retrieved.
          type: string
          enum: [ascending, descending]
          default: ascending
        - in: query
          name: severities
          description: Retrieved events severities.
          type: array
          items:
            type: string
            enum: [info, warning, error, critical]
          required: false
        - in: query
          name: message
          description: Retrieved events message pattern.
          type: string
          required: false
        - in: query
          name: deleted_hosts
          description: Deleted hosts flag.
          type: boolean
          required: false
        - in: query
          name: cluster_level
          description: Cluster level events flag.
          type: boolean
          required: false
        - in: query
          name: categories
          description: A comma-separated list of event categories.
          type: array
          items:
            type: string
          required: false
      responses:
        "200":
          description: Success.
          headers:
            Severity-Count-Info:
              type: integer
              description: "Count of events with severity 'info'."
              minimum: 0
            Severity-Count-Warning:
              type: integer
              description: "Count of events with severity 'warning'."
              minimum: 0
            Severity-Count-Error:
              type: integer
              description: "Count of events with severity 'error'."
              minimum: 0
            Severity-Count-Critical:
              type: integer
              description: Count of events with severity 'critical'.
              minimum: 0
            Event-Count:
              type: integer
              description: Count of events retrieved.
              minimum: 0
          schema:
            $ref: '#/definitions/event-list'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
    post:
      tags:
        - events
      security:
        - agentAuth: []
      description: Add new assisted installer event.
      operationId: v2TriggerEvent
      parameters:
        - in: body
          name: trigger-event-params
          description: The event to be created.
          required: true
          schema:
            $ref: '#/definitions/event'
      responses:
        "201":
          description: Success.
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "405":
          description: Method Not Allowed.
          schema:
            $ref: '#/definitions/error'
        "409":
          description: Cluster cannot accept new agents due to its current state.
          schema:
            $ref: '#/definitions/error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "501":
          description: Not implemented.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/support-levels/features:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
      operationId: GetSupportedFeatures
      description: Retrieves the features support levels for each OpenShift version.
      parameters:
        - in: query
          name: openshift_version
          type: string
          description: Version of the OpenShift cluster.
          required: true
        - in: query
          name: cpu_architecture
          description: The CPU architecture of the image (x86_64/arm64/etc).
          type: string
          # TODO: remove arm64 when AI moves to using aarch64
          enum: [ 'x86_64', 'aarch64', 'arm64','ppc64le','s390x','multi' ]
          default: x86_64
        - in: query
          name: platform_type
          description: The provider platform type.
          type: string
          enum: [ 'baremetal', 'none', 'nutanix', 'vsphere', 'external' ]
        - in: query
          name: external_platform_name
          description: External platform name when platform type is set to external. The value of this parameter will be ignored if platform_type is not external.
          type: string
      responses:
        "200":
          description: Success.
          schema:
            type: object
            properties:
              features:
                description: Keys will be one of features-support-level-id enum.
                $ref: '#/definitions/support-levels'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/support-levels/architectures:
    get:
      tags:
        - installer
      security:
        - userAuth: [admin, read-only-admin, user]
      operationId: GetSupportedArchitectures
      description: Retrieves the architecture support-levels for each OpenShift version.
      parameters:
        - in: query
          name: openshift_version
          type: string
          description: Version of the OpenShift cluster.
          required: true
      responses:
        "200":
          description: Success.
          schema:
            type: object
            properties:
              architectures:
                description: Keys will be one of architecture-support-level-id enum.
                $ref: '#/definitions/support-levels'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "503":
          description: Unavailable.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/import:
    post:
      tags:
        - installer
      description: Import an AI cluster using minimal data associated with existing OCP cluster, in order to allow adding day2 hosts to that cluster
      operationId: v2ImportCluster
      parameters:
        - in: body
          name: new-import-cluster-params
          description: Parameters for importing a OCP cluster for adding nodes.
          required: true
          schema:
            $ref: '#/definitions/import-cluster-params'
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/cluster'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/ignored-validations:
    get:
      tags:
        - installer
      description: Fetch the validations which are to be ignored for this cluster.
      operationId: v2GetIgnoredValidations
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose failing validations should be ignored according to this list.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            $ref: '#/definitions/ignored-validations'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
    put:
      tags:
        - installer
      description: Register the validations which are to be ignored for this cluster.
      operationId: v2SetIgnoredValidations
      parameters:
        - in: path
          name: cluster_id
          description: The cluster whose failing validations should be ignored according to this list.
          type: string
          format: uuid
          required: true
        - in: body
          name: ignored_validations
          description: The validations to be ignored.
          required: true
          schema:
            $ref: '#/definitions/ignored-validations'
      responses:
        "201":
          description: Success.
          schema:
            $ref: '#/definitions/ignored-validations'
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

  /v2/clusters/{cluster_id}/ui-settings:
    get:
      tags:
          - installer
      description: Fetch cluster specific UI settings.
      operationId: V2GetClusterUISettings
      parameters:
        - in: path
          name: cluster_id
          description: The cluster for which UI settings should be retrieved.
          type: string
          format: uuid
          required: true
      responses:
        "200":
          description: Success.
          schema:
            type: string
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'
    put:
      tags:
        - installer
      description: Update cluster specific UI settings.
      operationId: V2UpdateClusterUISettings
      parameters:
        - in: path
          name: cluster_id
          description: The cluster for which UI settings should be updated.
          type: string
          format: uuid
          required: true
        - in: body
          name: ui-settings
          description: Settings for the installer UI.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success.
          schema:
            type: string
        "400":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "404":
          description: Error.
          schema:
            $ref: '#/definitions/error'
        "401":
          description: Unauthorized.
          schema:
            $ref: '#/definitions/infra_error'
        "403":
          description: Forbidden.
          schema:
            $ref: '#/definitions/infra_error'
        "500":
          description: Error.
          schema:
            $ref: '#/definitions/error'

definitions:
  ignored-validations:
    type: object
    properties:
      cluster-validation-ids:
        type: string
        format: string
        description: JSON-formatted list of cluster validation IDs that will be ignored for all hosts that belong to this cluster. It may also contain a list with a single string "all" to ignore all cluster validations. Some validations cannot be ignored.
      host-validation-ids:
        type: string
        format: string
        description: JSON-formatted list of host validation IDs that will be ignored for all hosts that belong to this cluster. It may also contain a list with a single string "all" to ignore all host validations. Some validations cannot be ignored.
  monitored-operator:
    type: object
    properties:
      cluster_id:
        type: string
        format: uuid
        description: The cluster that this operator is associated with.
        x-go-custom-tag: gorm:"primaryKey"
      name:
        type: string
        description: Unique name of the operator.
        x-go-custom-tag: gorm:"primaryKey"
      version:
        type: string
        description: Operator version
      namespace:
        type: string
        description: Namespace where to deploy an operator. Only some operators require a namespace.
      subscription_name:
        type: string
        description: The name of the subscription of the operator.
      operator_type:
        $ref: '#/definitions/operator-type'
      properties:
        type: string
        description: Blob of operator-dependent parameters that are required for installation.
        x-go-custom-tag: gorm:"type:text"
      timeout_seconds:
        type: integer
        description: Positive number represents a timeout in seconds for the operator to be available.
      status:
        $ref: '#/definitions/operator-status'
      status_info:
        type: string
        description: Detailed information about the operator state.
      status_updated_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: Time at which the operator was last updated.
      bundles:
        type: array
        description: List of identifier of the bundles associated with the operator. Can be empty.
        items:
          type: string
        x-go-custom-tag: gorm:"type:text[]"
        x-go-type:
          type: StringArray
          import:
            package: github.com/lib/pq
          hints:
            noValidation: true

  operator-monitor-report:
    type: object
    properties:
      name:
        type: string
        description: Unique name of the operator.
      version:
        type: string
        description: operator version.
      status:
        $ref: '#/definitions/operator-status'
      status_info:
        type: string
        description: Detailed information about the operator state.

  operator-type:
    type: string
    enum: ['builtin', 'olm']
    description: Kind of operator. Different types are monitored by the service differently.

  operator-status:
    type: string
    enum: ['failed', 'progressing', 'available']
    description: Represents the operator state.

  operator-create-params:
    type: object
    properties:
      name:
        type: string
      properties:
        type: string
        description: Blob of operator-dependent parameters that are required for installation.
        x-go-custom-tag: gorm:"type:text"

  monitored-operators-list:
    type: array
    items:
      $ref: '#/definitions/monitored-operator'

  bundle:
    type: object
    properties:
      id:
        description: Unique identifier of the bundle, for example `virtualization` or `openshift-ai-nvidia`.
        type: string
      title:
        description: |
          Short human friendly description for the bundle, usually only a few words, for example `Virtualization` or
          `OpenShift AI (NVIDIA)`.
        type: string
      description:
        description: |
          Longer human friendly description for the bundle, usually one or more sentences.
        type: string
      operators:
        description: List of operators associated with the bundle.
        type: array
        items:
          type: string

  list-managed-domains:
    type: array
    items:
      $ref: '#/definitions/managed-domain'

  managed-domain:
    type: object
    properties:
      domain:
        type: string
      provider:
        type: string
        enum: ['route53']

  list-versions:
    type: object
    properties:
      versions:
        $ref: '#/definitions/versions'
      release_tag:
        type: string

  versions:
    type: object
    additionalProperties:
      type: string

  openshift-versions:
    type: object
    additionalProperties:
      $ref: '#/definitions/openshift-version'

  support-levels:
    type: object
    description: Map of feature ID or CPU architecture alongside their support level
    additionalProperties:
      $ref : '#/definitions/support-level'

  support-level:
    type: string
    enum: [ supported, unsupported, tech-preview, dev-preview, unavailable ]

  feature-support-level-id:
    type: string
    enum:
      - 'SNO'
      - 'VIP_AUTO_ALLOC'
      - 'CUSTOM_MANIFEST'
      - 'SINGLE_NODE_EXPANSION'
      - 'LVM'
      - 'ODF'
      - 'LSO'
      - 'CNV'
      - 'MCE'
      - 'MTV'
      - 'OSC'
      - 'NUTANIX_INTEGRATION'
      - 'BAREMETAL_PLATFORM'
      - 'NONE_PLATFORM'
      - 'VSPHERE_INTEGRATION'
      - 'DUAL_STACK_VIPS'
      - 'CLUSTER_MANAGED_NETWORKING' # DEPRECATED
      - 'USER_MANAGED_NETWORKING' # DEPRECATED
      - 'MINIMAL_ISO'
      - 'FULL_ISO'
      - 'EXTERNAL_PLATFORM_OCI'
      - 'DUAL_STACK'
      - 'PLATFORM_MANAGED_NETWORKING'
      - 'SKIP_MCO_REBOOT'
      - 'EXTERNAL_PLATFORM'
      - 'OVN_NETWORK_TYPE'
      - 'SDN_NETWORK_TYPE'
      - 'NODE_FEATURE_DISCOVERY'
      - 'NVIDIA_GPU'
      - 'PIPELINES'
      - 'SERVICEMESH'
      - 'SERVERLESS'
      - 'OPENSHIFT_AI'
      - 'NON_STANDARD_HA_CONTROL_PLANE'
      - 'AUTHORINO'
      - 'USER_MANAGED_LOAD_BALANCER'
      - 'NMSTATE'
      - 'AMD_GPU'
      - 'KMM'
      - 'NODE_HEALTHCHECK'
      - 'SELF_NODE_REMEDIATION'
      - 'FENCE_AGENTS_REMEDIATION'
      - 'NODE_MAINTENANCE'
      - 'KUBE_DESCHEDULER'

  architecture-support-level-id:
    type: string
    enum:
      - 'X86_64_ARCHITECTURE'
      - 'ARM64_ARCHITECTURE'
      - 'PPC64LE_ARCHITECTURE'
      - 'S390X_ARCHITECTURE'
      - 'MULTIARCH_RELEASE_IMAGE'


  preflight-hardware-requirements:
    type: object
    properties:
      operators:
        description: Preflight operators hardware requirements
        type: array
        items:
          $ref: '#/definitions/operator-hardware-requirements'
      ocp:
        description: Preflight OCP requirements
        $ref: '#/definitions/host-type-hardware-requirements-wrapper'

  operator-hardware-requirements:
    type: object
    properties:
      operator_name:
        description: Unique name of the operator. Corresponds to name property of the monitored-operator, i.e. "lso", "cnv", etc.
        type: string
      dependencies:
        description: List of other operator unique names that are required to be installed. Corresponds to name property of the monitored-operator, i.e. "lso", "cnv", etc.
        type: array
        items:
          type: string
      requirements:
        $ref: '#/definitions/host-type-hardware-requirements-wrapper'

  host-type-hardware-requirements-wrapper:
    type: object
    properties:
      worker:
        description: Requirements towards a worker node
        $ref: '#/definitions/host-type-hardware-requirements'
      master:
        description: Requirements towards a master node
        $ref: '#/definitions/host-type-hardware-requirements'

  host-type-hardware-requirements:
    type: object
    properties:
      quantitative:
        description: Host requirements that can be quantified
        $ref: '#/definitions/cluster-host-requirements-details'
      qualitative:
        description: Host requirements that cannot be quantified at the time of calculation. Descriptions or formulas of requiements
        type: array
        items:
          type: string

  cluster-host-requirements-list:
    type: array
    items:
      $ref: '#/definitions/cluster-host-requirements'

  cluster-host-requirements:
    type: object
    properties:
      host_id:
        type: string
        format: uuid
        description: Unique identifier of the host the requirements relate to.
      total:
        $ref: '#/definitions/cluster-host-requirements-details'
        description: Total host requirements for the cluster configuration
      ocp:
        $ref: '#/definitions/cluster-host-requirements-details'
        description: Host requirements for the OCP installation
      operators:
        type: array
        items:
          $ref: '#/definitions/operator-host-requirements'
        description: Host requirements related to requested operators

  operator-host-requirements:
    type: object
    properties:
      operator_name:
        type: string
        description: Name of the operator
      requirements:
        $ref: '#/definitions/cluster-host-requirements-details'
        description: Host requirements for the operator

  cluster-host-requirements-details:
    type: object
    properties:
      cpu_cores:
        type: integer
        description: Required number of CPU cores
      ram_mib:
        type: integer
        description: Required number of RAM in MiB
      disk_size_gb:
        type: integer
        description: Required disk size in GB
      installation_disk_speed_threshold_ms:
        type: integer
        description: Required installation disk speed in ms
      network_latency_threshold_ms:
        type: number
        format: double
        x-nullable: true
        description: Maximum network average latency (RTT) at L3 for role.
      packet_loss_percentage:
        type: number
        format: double
        x-nullable: true
        description: Maximum packet loss allowed at L3 for role.
      tpm_enabled_in_bios:
        type: boolean
        description: Whether TPM module should be enabled in host's BIOS.


  versioned-host-requirements:
    type: object
    properties:
      version:
        type: string
        description: Version of the component for which requirements are defined
      master:
        x-go-name: MasterRequirements
        $ref: '#/definitions/cluster-host-requirements-details'
        description: Master node requirements
      worker:
        x-go-name: WorkerRequirements
        $ref: '#/definitions/cluster-host-requirements-details'
        description: Worker node requirements
      sno:
        x-go-name: SNORequirements
        $ref: '#/definitions/cluster-host-requirements-details'
        description: Single node OpenShift node requirements
      edge-worker:
        x-go-name: EdgeWorkerRequirements
        $ref: '#/definitions/cluster-host-requirements-details'
        description: Edge Worker OpenShift node requirements

  event-list:
    type: array
    items:
      $ref: '#/definitions/event'

  event:
    type: object
    required:
      - severity
      - message
      - event_time
    properties:
      name:
        type: string
        description: Event Name.
      cluster_id:
        type: string
        format: uuid
        description: Unique identifier of the cluster this event relates to.
        x-go-custom-tag: gorm:"index"
        x-nullable: true
      host_id:
        type: string
        format: uuid
        description: Unique identifier of the host this event relates to.
        x-go-custom-tag: gorm:"index"
        x-nullable: true
      infra_env_id:
        type: string
        format: uuid
        description: Unique identifier of the infra-env this event relates to.
        x-go-custom-tag: gorm:"index"
        x-nullable: true
      severity:
        type: string
        enum: [info, warning, error, critical]
      category:
        type: string
        enum: ['user', 'metrics']
        x-go-custom-tag: gorm:"default:'user'"
      message:
        type: string
        x-go-custom-tag: gorm:"type:varchar(4096)"
      event_time:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      request_id:
        type: string
        format: uuid
        description: Unique identifier of the request that caused this event to occur.
      props:
        type: string
        description: Additional properties for the event in JSON format.
        x-go-custom-tag: gorm:"type:text"

  image-create-params:
    type: object
    properties:
      ssh_public_key:
        type: string
        description: SSH public key for debugging the installation.
      static_network_config:
        type: array
        items:
          $ref: '#/definitions/host_static_network_config'
      image_type:
        description: Type of image that should be generated.
        $ref: '#/definitions/image_type'

  host-create-params:
    type: object
    required:
      - host_id
    properties:
      host_id:
        type: string
        format: uuid
      discovery_agent_version:
        type: string

  host_registration_response:
    allOf:
      - $ref: '#/definitions/host'
      - properties:
          next_step_runner_command:
            type: object
            description: Command for starting the next step runner
            properties:
              command:
                type: string
              args:
                type: array
                items:
                  type: string
              retry_seconds:
                type: integer
                description: How long in seconds to wait before retrying registration if the command fails

  host:
    type: object
    required:
      - kind
      - id
      - href
      - status
      - status_info
    properties:
      kind:
        type: string
        enum: ['Host', 'AddToExistingClusterHost']
        description: |
          Indicates the type of this object. Will be 'Host' if this is a complete object or 'HostLink' if it is just a link, or
          'AddToExistingClusterHost' for host being added to existing OCP cluster, or
      id:
        type: string
        format: uuid
        description: Unique identifier of the object.
        x-go-custom-tag: gorm:"primaryKey"
      href:
        type: string
        description: Self link.
      cluster_id:
        type: string
        format: uuid
        x-go-custom-tag: gorm:"foreignkey:Cluster"
        x-nullable: true
        description: The cluster that this host is associated with.
      infra_env_id:
        type: string
        format: uuid
        x-go-custom-tag: gorm:"primaryKey;foreignkey:InfraEnvID"
        description: The infra-env that this host is associated with.
      status:
        type: string
        enum:
          - discovering
          - known
          - disconnected
          - insufficient
          - disabled
          - preparing-for-installation
          - preparing-failed
          - preparing-successful
          - pending-for-input
          - installing
          - installing-in-progress
          - installing-pending-user-action
          - resetting-pending-user-action
          - installed
          - error
          - resetting
          - added-to-existing-cluster
          - cancelled
          - binding
          - unbinding
          - unbinding-pending-user-action
          - known-unbound
          - disconnected-unbound
          - insufficient-unbound
          - disabled-unbound
          - discovering-unbound
          - reclaiming
          - reclaiming-rebooting
      status_info:
        type: string
        x-go-custom-tag: gorm:"type:varchar(2048)"
      validations_info:
        type: string
        description: JSON-formatted string containing the validation results for each validation id grouped by category (network, hardware, etc.)
        x-go-custom-tag: gorm:"type:text"
      logs_info:
        $ref: '#/definitions/logs_state'
        description: The progress of log collection or empty if logs are not applicable
      status_updated_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: The last time that the host status was updated.
      progress:
        $ref: '#/definitions/host-progress-info'
      stage_started_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: Time at which the current progress stage started.
      stage_updated_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: Time at which the current progress stage was last updated.
      progress_stages:
        type: array
        items:
          $ref: '#/definitions/host-stage'
        x-go-custom-tag: gorm:"-"
        x-nullable: true
      connectivity:
        x-go-custom-tag: gorm:"type:text"
        type: string
      api_vip_connectivity:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: Contains a serialized api_vip_connectivity_response
      tang_connectivity:
        x-go-custom-tag: gorm:"type:text"
        type: string
      inventory:
        x-go-custom-tag: gorm:"type:text"
        type: string
      free_addresses:
        x-go-custom-tag: gorm:"type:text"
        type: string
      ntp_sources:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: The configured NTP sources on the host.
      disks_info:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: Additional information about disks, formatted as JSON.
      role:
        $ref: '#/definitions/host-role'
      suggested_role:
        $ref: '#/definitions/host-role'
      bootstrap:
        type: boolean
      logs_collected_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      logs_started_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      installer_version:
        type: string
        description: Installer version.
      installation_disk_path:
        type: string
        description: Contains the inventory disk path, This field is replaced by installation_disk_id field and used for backward compatability with the old UI.
        example: /dev/sda
      installation_disk_id:
        type: string
        description: Contains the inventory disk id to install on.
      updated_at:
        type: string
        format: date-time
        x-go-type:
          type: Time
          import:
            package: time
          hints:
            noValidation: true
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      created_at:
        type: string
        format: date-time
        x-go-type:
          type: Time
          import:
            package: time
          hints:
            noValidation: true
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      checked_in_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: The last time the host's agent communicated with the service.
      connection_timed_out:
        type: boolean
        description: Indicate that connection to assisted service was timed out when soft timeout is enabled.
      registered_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: The last time the host's agent tried to register in the service.
      discovery_agent_version:
        type: string
      requested_hostname:
        type: string
      user_name:
        type: string
      media_status:
        type: string
        x-nullable: true
        enum:
          - connected
          - disconnected
        default: connected
      deleted_at:
        description: swagger:ignore
        x-go-custom-tag: gorm:"type:timestamp with time zone;index"
        x-nullable: false
        x-go-type:
          type: DeletedAt
          import:
            package: gorm.io/gorm
          hints:
            noValidation: true
      ignition_config_overrides:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: Json formatted string containing the user overrides for the host's pointer ignition
        example: '{"ignition": {"version": "3.1.0"}, "storage": {"files": [{"path": "/tmp/example", "contents": {"source": "data:text/plain;base64,aGVscGltdHJhcHBlZGluYXN3YWdnZXJzcGVj"}}]}}'
      installer_args:
        type: string
      timestamp:
        type: integer
        description: The time on the host as seconds since the Unix epoch.
      machine_config_pool_name:
        type: string
      images_status:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: Array of image statuses.
      domain_name_resolutions:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: The domain name resolution result.
      ignition_endpoint_token_set:
        type: boolean
        description: True if the token to fetch the ignition from ignition_endpoint_url is set.
      node_labels:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: Json containing node's labels.
      disks_to_be_formatted:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: |-
          A comma-separated list of disks that will be formatted once
          installation begins, unless otherwise set to be skipped by
          skip_formatting_disks. This means that this list also includes disks
          that appear in skip_formatting_disks. This property is managed by the
          service and cannot be modified by the user.
      skip_formatting_disks:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: |-
          A comma-seperated list of host disks that the service will avoid
          formatting.
  installer-args-params:
    type: object
    properties:
      args:
        description: List of additional arguments passed to coreos-installer
        example: ["--append-karg", "ip=192.0.2.2::192.0.2.254:255.255.255.0:core0.example.com:enp1s0:none", "--save-partindex", "1", "-n"]
        type: array
        items:
          type: string

  steps:
    type: object
    properties:
      next_instruction_seconds:
        type: integer
      post_step_action:
        type: string
        description: What to do after finishing to run step instructions
        default: continue
        enum:
          - exit
          - continue
      instructions:
        type: array
        items:
          $ref: '#/definitions/step'

  step-type:
    type: string
    enum:
      - connectivity-check
      - execute
      - inventory
      - install
      - free-network-addresses
      - dhcp-lease-allocate
      - api-vip-connectivity-check
      - tang-connectivity-check
      - ntp-synchronizer
      - installation-disk-speed-check
      - container-image-availability
      - domain-resolution
      - stop-installation
      - logs-gather
      - next-step-runner
      - upgrade-agent
      - download-boot-artifacts
      - reboot-for-reclaim
      - verify-vips

  step:
    type: object
    properties:
      step_type:
        $ref: '#/definitions/step-type'
      step_id:
        type: string
      args:
        type: array
        items:
          type: string

  steps-reply:
    type: array
    items:
      $ref: '#/definitions/step-reply'

  step-reply:
    type: object
    properties:
      step_type:
        $ref: '#/definitions/step-type'
      step_id:
        type: string
      exit_code:
        type: integer
      output:
        type: string
      error:
        type: string

  connectivity-check-nic:
    type: object
    properties:
      name:
        type: string
      mac:
        format: mac
        type: string
      ip_addresses:
        type: array
        items:
          pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$'
          type: string

  connectivity-check-host:
    type: object
    properties:
      host_id:
        type: string
        format: uuid
      nics:
        type: array
        items:
          $ref: '#/definitions/connectivity-check-nic'

  connectivity-check-params:
    type: array
    items:
      $ref: '#/definitions/connectivity-check-host'

  host-list:
    type: array
    items:
      $ref: '#/definitions/host'

  cluster-create-params:
    type: object
    required:
      - name
      - openshift_version
      - pull_secret
    properties:
      name:
        type: string
        minLength: 1
        maxLength: 54
        description: Name of the OpenShift cluster.
      high_availability_mode:
        type: string
        enum: ['Full', 'None']
        default: 'Full'
        description: |
          (DEPRECATED) Please use 'control_plane_count' instead. Guaranteed availability of the installed cluster. 'Full' installs a Highly-Available cluster
          over multiple master nodes whereas 'None' installs a full cluster over one node.
      openshift_version:
        type: string
        description: Version of the OpenShift cluster.
      ocp_release_image:
        type: string
        description: OpenShift release image URI.
      base_dns_domain:
        type: string
        description: Base domain of the cluster. All DNS records must be sub-domains of this base and include the cluster name.
      cluster_network_cidr:
        type: string
        description: IP address block from which Pod IPs are allocated. This block must not overlap with existing physical networks. These IP addresses are used for the Pod network, and if you need to access the Pods from an external network, configure load balancers and routers to manage the traffic.
        pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$'
        default: "10.128.0.0/14"
      cluster_network_host_prefix:
        type: integer
        description: The subnet prefix length to assign to each individual node. For example, if clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet out of the given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. If you are required to provide access to nodes from an external network, configure load balancers and routers to manage the traffic.
        minimum: 1
        maximum: 128
        default: 23
      service_network_cidr:
        type: string
        description: The IP address pool to use for service IP addresses. You can enter only one IP address pool. If you need to access the services from an external network, configure load balancers and routers to manage the traffic.
        pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$'
        default: "172.30.0.0/16"
      api_vips:
        type: array
        description: The virtual IPs used to reach the OpenShift cluster's API. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks.
        items:
          $ref: '#/definitions/api_vip'
      ingress_vips:
        type: array
        description: The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks.
        items:
          $ref: '#/definitions/ingress_vip'
      pull_secret:
        type: string
        description: The pull secret obtained from Red Hat OpenShift Cluster Manager at console.redhat.com/openshift/install/pull-secret.
      ssh_public_key:
        type: string
        description: SSH public key for debugging OpenShift nodes.
      vip_dhcp_allocation:
        type: boolean
        description: Indicate if virtual IP DHCP allocation mode is enabled.
        x-nullable: true
        default: false
      http_proxy:
        type: string
        description: |
          A proxy URL to use for creating HTTP connections outside the cluster.
          http://\<username\>:\<pswd\>@\<ip\>:\<port\>
        x-nullable: true
      https_proxy:
        type: string
        description: |
          A proxy URL to use for creating HTTPS connections outside the cluster.
          http://\<username\>:\<pswd\>@\<ip\>:\<port\>
        x-nullable: true
      no_proxy:
        type: string
        description: An "*" or a comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude from proxying.
        x-nullable: true
      user_managed_networking:
        type: boolean
        description: (DEPRECATED) Indicate if the networking is managed by the user.
        x-nullable: true
        default: false
      additional_ntp_source:
        type: string
        description: A comma-separated list of NTP sources (name or IP) going to be added to all the hosts.
        x-nullable: true
      olm_operators:
        type: array
        description: |
          List of OLM operators to be installed.
          For the full list of supported operators, check the endpoint `/v2/supported-operators`:
        items:
          $ref: '#/definitions/operator-create-params'
      hyperthreading:
        type: string
        description: Enable/disable hyperthreading on master nodes, worker nodes, or all nodes.
        enum: ['masters', 'workers', 'none', 'all']
        default: 'all'
      network_type:
        type: string
        description: "The desired network type used."
        enum: ['OpenShiftSDN', 'OVNKubernetes']
        x-nullable: true
      schedulable_masters:
        type: boolean
        description: Schedule workloads on masters
        default: false
      cluster_networks:
        type: array
        description: Cluster networks that are associated with this cluster.
        items:
          $ref: '#/definitions/cluster_network'
        x-nullable: true
      service_networks:
        type: array
        description: Service networks that are associated with this cluster.
        items:
          $ref: '#/definitions/service_network'
        x-nullable: true
      machine_networks:
        type: array
        description: Machine networks that are associated with this cluster.
        items:
          $ref: '#/definitions/machine_network'
        x-nullable: true
      platform:
        $ref: '#/definitions/platform'
        x-nullable: true
      cpu_architecture:
        type: string
        x-nullable: false
        default: 'x86_64'
        # TODO: remove arm64 when AI moves to using aarch64
        enum: ['x86_64', 'aarch64', 'arm64','ppc64le','s390x','multi']
        description: The CPU architecture of the image (x86_64/arm64/etc).
      disk_encryption:
        $ref: '#/definitions/disk-encryption'
        description: Installation disks encryption mode and host roles to be applied.
      ignition_endpoint:
        $ref: '#/definitions/ignition-endpoint'
        description: Explicit ignition endpoint overrides the default ignition endpoint.
      tags:
        type: string
        description: A comma-separated list of tags that are associated to the cluster.
        x-nullable: true
      control_plane_count:
        type: integer
        description: Specifies the required number of control plane nodes that should be part of the cluster.
        x-nullable: true
      load_balancer:
        $ref: '#/definitions/load_balancer'

  host-update-params:
    type: object
    properties:
      host_role:
        type: string
        x-nullable: true
        enum: ['auto-assign', 'master', 'worker']
      host_name:
        type: string
        x-nullable: true
      disks_selected_config:
        type: array
        x-nullable: true
        items:
          $ref: '#/definitions/disk-config-params'
      disks_skip_formatting:
        type: array
        x-nullable: true
        description: Allows changing the host's skip_formatting_disks parameter
        items:
          $ref: '#/definitions/disk-skip-formatting-params'
      machine_config_pool_name:
        type: string
        x-nullable: true
      ignition_endpoint_token:
        x-nullable: true
        type: string
        description: A string which will be used as Authorization Bearer token to fetch the ignition from ignition_endpoint_url.
      ignition_endpoint_http_headers:
        type: array
        x-nullable: true
        description: JSON-formatted string of additional HTTP headers when fetching the ignition.
        items:
            $ref: '#/definitions/ignition-endpoint-http-headers-params'
      node_labels:
        type: array
        description: Labels to be added to the corresponding node.
        x-nullable: true
        items:
            $ref: '#/definitions/node-label-params'

  v2-cluster-update-params:
    type: object
    properties:
      name:
        type: string
        minLength: 1
        maxLength: 54
        description: OpenShift cluster name.
        x-nullable: true
      base_dns_domain:
        type: string
        description: Base domain of the cluster. All DNS records must be sub-domains of this base and include the cluster name.
        x-nullable: true
      cluster_network_cidr:
        type: string
        description: IP address block from which Pod IPs are allocated. This block must not overlap with existing physical networks. These IP addresses are used for the Pod network, and if you need to access the Pods from an external network, configure load balancers and routers to manage the traffic.
        pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$'
        x-nullable: true
      platform:
        $ref: '#/definitions/platform'
      cluster_network_host_prefix:
        type: integer
        description: The subnet prefix length to assign to each individual node. For example, if clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet out of the given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. If you are required to provide access to nodes from an external network, configure load balancers and routers to manage the traffic.
        minimum: 1
        maximum: 128
        x-nullable: true
      service_network_cidr:
        type: string
        description: The IP address pool to use for service IP addresses. You can enter only one IP address pool. If you need to access the services from an external network, configure load balancers and routers to manage the traffic.
        pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$'
        x-nullable: true
      api_vips:
        type: array
        description: The virtual IPs used to reach the OpenShift cluster's API. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks.
        items:
          $ref: '#/definitions/api_vip'
        x-nullable: true
      ingress_vips:
        type: array
        description: The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks.
        items:
          $ref: '#/definitions/ingress_vip'
        x-nullable: true
      api_vip_dns_name:
        type: string
        description: The domain name used to reach the OpenShift cluster API.
        x-nullable: true
      machine_network_cidr:
        type: string
        description: A CIDR that all hosts belonging to the cluster should have an interfaces with IP address that belongs to this CIDR. The api_vip belongs to this CIDR.
        pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$'
        x-nullable: true
      pull_secret:
        type: string
        description: The pull secret obtained from Red Hat OpenShift Cluster Manager at console.redhat.com/openshift/install/pull-secret.
        x-nullable: true
      ssh_public_key:
        type: string
        description: SSH public key for debugging OpenShift nodes.
        x-nullable: true
      vip_dhcp_allocation:
        type: boolean
        description: Indicate if virtual IP DHCP allocation mode is enabled.
        x-nullable: true
      http_proxy:
        type: string
        description: |
          A proxy URL to use for creating HTTP connections outside the cluster.
          http://\<username\>:\<pswd\>@\<ip\>:\<port\>
        x-nullable: true
      https_proxy:
        type: string
        description: |
          A proxy URL to use for creating HTTPS connections outside the cluster.
          http://\<username\>:\<pswd\>@\<ip\>:\<port\>
        x-nullable: true
      no_proxy:
        type: string
        description: An "*" or a comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude from proxying.
        x-nullable: true
      user_managed_networking:
        type: boolean
        description: (DEPRECATED) Indicate if the networking is managed by the user.
        x-nullable: true
      additional_ntp_source:
        type: string
        description: A comma-separated list of NTP sources (name or IP) going to be added to all the hosts.
        x-nullable: true
      olm_operators:
        type: array
        description: |
          List of OLM operators to be installed.
          For the full list of supported operators, check the endpoint `/v2/supported-operators`:
        items:
          $ref: '#/definitions/operator-create-params'
      hyperthreading:
        type: string
        description: Enable/disable hyperthreading on master nodes, worker nodes, or all nodes.
        enum: ['masters', 'workers', 'all', 'none']
        x-nullable: true
      network_type:
        type: string
        description: The desired network type used.
        enum: ['OpenShiftSDN', 'OVNKubernetes']
        x-nullable: true
      schedulable_masters:
        type: boolean
        description: Schedule workloads on masters
        default: false
      cluster_networks:
        type: array
        description: Cluster networks that are associated with this cluster.
        items:
          $ref: '#/definitions/cluster_network'
        x-nullable: true
      service_networks:
        type: array
        description: Service networks that are associated with this cluster.
        items:
          $ref: '#/definitions/service_network'
        x-nullable: true
      machine_networks:
        type: array
        description: Machine networks that are associated with this cluster.
        items:
          $ref: '#/definitions/machine_network'
        x-nullable: true
      disk_encryption:
        $ref: '#/definitions/disk-encryption'
        description: Installation disks encryption mode and host roles to be applied.
      ignition_endpoint:
        $ref: '#/definitions/ignition-endpoint'
        description: Explicit ignition endpoint overrides the default ignition endpoint.
      tags:
        type: string
        description: A comma-separated list of tags that are associated to the cluster.
        x-nullable: true
      control_plane_count:
        type: integer
        description: Specifies the required number of control plane nodes that should be part of the cluster.
        x-nullable: true
      load_balancer:
        $ref: '#/definitions/load_balancer'

  import-cluster-params:
    type: object
    required:
      - name
      - api_vip_dnsname
      - openshift_cluster_id
    properties:
      name:
        type: string
        description: OpenShift cluster name.
      api_vip_dnsname:
        type: string
        description: The domain name used to reach the OpenShift cluster API.
      openshift_version:
        type: string
        description: Version of the OpenShift cluster.
      openshift_cluster_id:
        type: string
        format: uuid
        description: The id of the OCP cluster, that hosts will be added to

  finalizing-stage:
    description: Cluster finalizing stage managed by controller
    type: string
    enum:
    - Waiting for cluster operators
    - Adding router ca
    - Applying olm manifests
    - Waiting for olm operators csv initialization
    - Waiting for olm operators csv
    - Waiting for OLM operator setup jobs
    - Done


  cluster:
    type: object
    required:
      - kind
      - id
      - href
      - image_info
      - status
      - status_info
    properties:
      kind:
        type: string
        enum: ['Cluster', 'AddHostsCluster']
        description: |
          Indicates the type of this object. Will be 'Cluster' if this is a complete object,
          'AddHostsCluster' for cluster that add hosts to existing OCP cluster,
      high_availability_mode:
        type: string
        enum: ['Full', 'None']
        default: 'Full'
        description: |
          (DEPRECATED) Please use 'control_plane_count' instead. Guaranteed availability of the installed cluster. 'Full' installs a Highly-Available cluster
          over multiple master nodes whereas 'None' installs a full cluster over one node.
      id:
        type: string
        format: uuid
        description: Unique identifier of the object.
        x-go-custom-tag: gorm:"primaryKey"
      href:
        type: string
        description: Self link.
      name:
        type: string
        description: Name of the OpenShift cluster.
      user_name:
        type: string
      org_id:
        type: string
      email_domain:
        type: string
      openshift_version:
        type: string
        description: Version of the OpenShift cluster.
      ocp_release_image:
        type: string
        description: OpenShift release image URI.
      openshift_cluster_id:
        type: string
        format: uuid
        description: Cluster ID on OCP system.
      image_info:
        $ref: '#/definitions/image_info'
      platform:
        $ref: '#/definitions/platform'
      base_dns_domain:
        type: string
        description: Base domain of the cluster. All DNS records must be sub-domains of this base and include the cluster name.
      cluster_network_cidr:
        type: string
        description: IP address block from which Pod IPs are allocated. This block must not overlap with existing physical networks. These IP addresses are used for the Pod network, and if you need to access the Pods from an external network, configure load balancers and routers to manage the traffic.
        pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$'
      cluster_network_host_prefix:
        type: integer
        description: The subnet prefix length to assign to each individual node. For example, if clusterNetworkHostPrefix is set to 23, then each node is assigned a /23 subnet out of the given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses. If you are required to provide access to nodes from an external network, configure load balancers and routers to manage the traffic.
        minimum: 1
        maximum: 128
      service_network_cidr:
        type: string
        description: The IP address pool to use for service IP addresses. You can enter only one IP address pool. If you need to access the services from an external network, configure load balancers and routers to manage the traffic.
        pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$'
      api_vips:
        x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID"
        x-nullable: true
        type: array
        description: The virtual IPs used to reach the OpenShift cluster's API. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks.
        items:
          $ref: '#/definitions/api_vip'
      api_vip_dns_name:
        type: string
        description: The domain name used to reach the OpenShift cluster API.
        x-nullable: true
      machine_network_cidr:
        type: string
        description: A CIDR that all hosts belonging to the cluster should have an interfaces with IP address that belongs to this CIDR. The api_vip belongs to this CIDR.
        pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$'
      ingress_vips:
        x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID"
        x-nullable: true
        type: array
        description: The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks.
        items:
          $ref: '#/definitions/ingress_vip'
      ssh_public_key:
        type: string
        description: SSH public key for debugging OpenShift nodes.
      http_proxy:
        type: string
        description: |
          A proxy URL to use for creating HTTP connections outside the cluster.
          http://\<username\>:\<pswd\>@\<ip\>:\<port\>
      https_proxy:
        type: string
        description: |
          A proxy URL to use for creating HTTPS connections outside the cluster.
          http://\<username\>:\<pswd\>@\<ip\>:\<port\>
        x-go-custom-tag: gorm:"column:https_proxy"
      no_proxy:
        type: string
        description: A comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude from proxying.
      status:
        type: string
        description: Status of the OpenShift cluster.
        enum:
          - insufficient
          - ready
          - error
          - preparing-for-installation
          - pending-for-input
          - installing
          - finalizing
          - installed
          - adding-hosts
          - cancelled
          - installing-pending-user-action
      status_info:
        type: string
        x-go-custom-tag: gorm:"type:varchar(2048)"
        description: Additional information pertaining to the status of the OpenShift cluster.
      status_updated_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: The last time that the cluster status was updated.
      progress:
        $ref: '#/definitions/cluster-progress-info'
        description: Installation progress percentages of the cluster.
      disk_encryption:
        $ref: '#/definitions/disk-encryption'
        description: Information regarding hosts' installation disks encryption.
      hosts:
        x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID"
        type: array
        description: Hosts that are associated with this cluster.
        items:
          $ref: '#/definitions/host'
      ready_host_count:
        type: integer
        format: int64
        description: hosts associated to this cluster that are in 'known' state.
        x-go-custom-tag: gorm:"-"
      enabled_host_count:
        type: integer
        format: int64
        description: hosts associated to this cluster that are not in 'disabled' state.
        x-go-custom-tag: gorm:"-"
      total_host_count:
        type: integer
        format: int64
        description: All hosts associated to this cluster.
        x-go-custom-tag: gorm:"-"
      schedulable_masters:
        type: boolean
        description: Schedule workloads on masters
        default: false
      schedulable_masters_forced_true:
        type: boolean
        description: |
          Indicates if schedule workloads on masters will be enabled regardless the value of 'schedulable_masters' property.
          Set to 'true' when not enough hosts are associated with this cluster to disable the scheduling on masters.
        default: true
      updated_at:
        type: string
        format: date-time
        x-go-type:
          type: Time
          import:
            package: time
          hints:
            noValidation: true
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: The last time that this cluster was updated.
      created_at:
        type: string
        format: date-time
        x-go-type:
          type: Time
          import:
            package: time
          hints:
            noValidation: true
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: The time that this cluster was created.
      install_started_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: The time that this cluster started installation.
      install_completed_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: The time that this cluster completed installation.
      host_networks:
        type: array
        items:
          $ref: '#/definitions/host_network'
        x-go-custom-tag: gorm:"-"
        x-nullable: true
        description: List of host networks to be filled during query.
      pull_secret_set:
        type: boolean
        description: True if the pull secret has been added to the cluster.
      vip_dhcp_allocation:
        type: boolean
        description: Indicate if virtual IP DHCP allocation mode is enabled.
        x-nullable: true
      validations_info:
        type: string
        description: JSON-formatted string containing the validation results for each validation id grouped by category (network, hosts-data, etc.)
        x-go-custom-tag: gorm:"type:text"
      logs_info:
        $ref: '#/definitions/logs_state'
        description: The progress of log collection or empty if logs are not applicable
      install_config_overrides:
        x-go-custom-tag: gorm:"type:text"
        type: string
        description: JSON-formatted string containing the user overrides for the install-config.yaml file.
        example: '{"networking":{"networkType": "OVNKubernetes"},"fips":true}'
      controller_logs_collected_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      controller_logs_started_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      connectivity_majority_groups:
        type: string
        description: Json formatted string containing the majority groups for connectivity checks.
        x-go-custom-tag: gorm:"type:text"
      ip_collisions:
        type: string
        description: Json formatted string containing ip collisions detected in the cluster.
        x-go-custom-tag: gorm:"type:text"
      ignored_host_validations:
        type: string
        description: Json formatted string containing a list of host validations to be ignored. May also contain a list with a single string "all" to ignore all host validations. Some validations cannot be ignored.
        x-go-custom-tag: gorm:"type:text"
      ignored_cluster_validations:
        type: string
        description: Json formatted string containing a list of cluster validations to be ignored. May also contain a list with a single string "all" to ignore all cluster validations. Some validations cannot be ignored.
        x-go-custom-tag: gorm:"type:text"
      deleted_at:
        description: swagger:ignore
        x-go-custom-tag: gorm:"type:timestamp with time zone;index"
        x-nullable: false
        x-go-type:
          type: DeletedAt
          import:
            package: gorm.io/gorm
          hints:
            noValidation: true
      user_managed_networking:
        type: boolean
        x-nullable: true
        description: (DEPRECATED) Indicate if the networking is managed by the user.
      additional_ntp_source:
        type: string
        description: A comma-separated list of NTP sources (name or IP) going to be added to all the hosts.
      monitored_operators:
        x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID"
        type: array
        description: Operators that are associated with this cluster.
        items:
          $ref: '#/definitions/monitored-operator'
      ams_subscription_id:
        type: string
        format: uuid
        description: Unique identifier of the AMS subscription in OCM.
      hyperthreading:
        type: string
        enum: ['masters', 'workers', 'all', 'none']
        description: Enable/disable hyperthreading on master nodes, worker nodes, or all nodes
      feature_usage:
        type: string
        description: JSON-formatted string containing the usage information by feature name
        x-go-custom-tag: gorm:"type:text"
      network_type:
        type: string
        description: The desired network type used.
        enum: ['OpenShiftSDN', 'OVNKubernetes']
        x-nullable: true
      cluster_networks:
        x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID"
        x-nullable: true
        type: array
        description: Cluster networks that are associated with this cluster.
        items:
          $ref: '#/definitions/cluster_network'
      service_networks:
        x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID"
        x-nullable: true
        type: array
        description: Service networks that are associated with this cluster.
        items:
          $ref: '#/definitions/service_network'
      machine_networks:
        x-go-custom-tag: gorm:"foreignkey:ClusterID;references:ID"
        x-nullable: true
        type: array
        description: Machine networks that are associated with this cluster.
        items:
          $ref: '#/definitions/machine_network'
      cpu_architecture:
        type: string
        x-nullable: false
        default: 'x86_64'
         # TODO: remove arm64 when AI moves to using aarch64
        enum: ['x86_64', 'aarch64', 'arm64','ppc64le','s390x','multi']
        description: The CPU architecture of the image (x86_64/arm64/etc).
      ignition_endpoint:
        $ref: '#/definitions/ignition-endpoint'
        description: Explicit ignition endpoint overrides the default ignition endpoint.
      imported:
        type: boolean
        default: false
        description: |-
          Indicates whether this cluster is an imported day-2 cluster or a
          regular cluster. Clusters are considered imported when they are
          created via the ../clusters/import endpoint. Day-2 clusters converted
          from day-1 clusters by kube-api controllers or the
          ../clusters/<cluster_id>/actions/allow-add-hosts endpoint are not
          considered imported. Imported clusters usually lack a lot of
          information and are filled with default values that don't necessarily
          reflect the actual cluster they represent
      tags:
        type: string
        description: A comma-separated list of tags that are associated to the cluster.
      last-installation-preparation:
        $ref: '#/definitions/last-installation-preparation'
      org_soft_timeouts_enabled:
        type: boolean
        description: Indication if organization soft timeouts is enabled for the cluster.
      control_plane_count:
        type: integer
        description: Specifies the required number of control plane nodes that should be part of the cluster.
      load_balancer:
        $ref: '#/definitions/load_balancer'

  last-installation-preparation:
    type: object
    description: Gives the status of the last installation preparation (if any)
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:last_installation_preparation_"
    x-nullable: false
    properties:
      status:
        type: string
        default: "not_started"
        x-nullable: false
        enum: [not_started, failed, success]
        description: The last installation preparation status
      reason:
        type: string
        description: The reason for the preparation status if applicable

  ignition-endpoint:
    type: object
    description: Explicit ignition endpoint overrides the default ignition endpoint.
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:ignition_endpoint_"
    properties:
      url:
        type: string
        description: The URL for the ignition endpoint.
        x-nullable: true
      ca_certificate:
        type: string
        x-nullable: true
        description: base64 encoded CA certficate to be used when contacting the URL via https.

  platform:
    type: object
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:platform_"
    description: The configuration for the specific platform upon which to perform the installation.
    required:
      - type
    properties:
      type:
        $ref: '#/definitions/platform_type'
      external:
        $ref: '#/definitions/platform_external'
        x-nullable: true

  image_info:
    type: object
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:image_"
    properties:
      ssh_public_key:
        type: string
        description: SSH public key for debugging the installation.
      size_bytes:
        type: integer
        minimum: 0
      download_url:
        type: string
      generator_version:
        type: string
        description: Image generator version.
      created_at:
        type: string
        format: date-time
        x-go-type:
          type: Time
          import:
            package: time
          hints:
            noValidation: true
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      expires_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      static_network_config:
        type: string
        description: static network configuration string in the format expected by discovery ignition generation
      type:
        $ref: '#/definitions/image_type'

  host_static_network_config:
    type: object
    properties:
      network_yaml:
        type: string
        description: yaml string that can be processed by nmstate
      mac_interface_map:
        $ref: '#/definitions/mac_interface_map'
        description: mapping of host macs to logical interfaces used in the network yaml

  mac_interface_map:
    type: array
    items:
      type: object
      properties:
        mac_address:
          type: string
          pattern: '^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$'
          description: mac address present on the host
        logical_nic_name:
          type: string
          description: nic name used in the yaml, which relates 1:1 to the mac address

  image_type:
    type: string
    enum: [full-iso, minimal-iso]

  free-addresses-list:
    type: array
    items:
      type: string
      format: ipv4

  cluster-list:
    type: array
    items:
      $ref: '#/definitions/cluster'

  host_network:
    type: object
    properties:
      cidr:
        type: string
      host_ids:
        type: array
        items:
          type: string
          format: uuid

  l2-connectivity:
    type: object
    properties:
      outgoing_nic:
        type: string
      outgoing_ip_address:
        type: string
      remote_ip_address:
        type: string
      remote_mac:
        type: string
      successful:
        type: boolean

  l3-connectivity:
    type: object
    properties:
      outgoing_nic:
        type: string
      remote_ip_address:
        type: string
      successful:
        type: boolean
      average_rtt_ms:
        type: number
        format: double
        description: Average round trip time in milliseconds.
        x-go-name: "AverageRTTMs"
      packet_loss_percentage:
        type: number
        format: double
        description: Percentage of packets lost during connectivity check.

  mtu-report:
    type: object
    properties:
      outgoing_nic:
        type: string
      remote_ip_address:
        type: string
      mtu_successful:
        type: boolean

  connectivity-remote-host:
    type: object
    properties:
      host_id:
        type: string
        format: uuid
      l2_connectivity:
        type: array
        items:
          $ref: '#/definitions/l2-connectivity'
      l3_connectivity:
        type: array
        items:
          $ref: '#/definitions/l3-connectivity'
      mtu_report:
        type: array
        items:
          $ref: '#/definitions/mtu-report'

  # Return value of connectivity check
  connectivity-report:
    type: object
    properties:
      remote_hosts:
        type: array
        items:
          $ref: '#/definitions/connectivity-remote-host'

  ingress-cert-params:
    type: string

  completion-params:
    type: object
    required:
      - is_success
    properties:
      is_success:
        type: boolean
      error_info:
        type: string
      data:
        type: object
        description: additional data from the cluster
        additionalProperties:
          type: object


  host-progress:
    type: object
    properties:
      current_stage:
        $ref: '#/definitions/host-stage'
      progress_info:
        type: string
        x-go-custom-tag: gorm:"type:varchar(2048)"

  host-progress-info:
    type: object
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:progress_"
    properties:
      installation_percentage:
        type: integer
      current_stage:
        $ref: '#/definitions/host-stage'
      progress_info:
        type: string
        x-go-custom-tag: gorm:"type:varchar(2048)"
      stage_started_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: Time at which the current progress stage started.
      stage_updated_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: Time at which the current progress stage was last updated.
      stage_timed_out:
        type: boolean
        description: Indicate of the current stage has been timed out.

  cluster-progress-info:
    type: object
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:progress_"
    properties:
      total_percentage:
        type: integer
      preparing_for_installation_stage_percentage:
        type: integer
      installing_stage_percentage:
        type: integer
      finalizing_stage_percentage:
        type: integer
      finalizing_stage:
        $ref: '#/definitions/finalizing-stage'
      finalizing_stage_started_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      finalizing_stage_timed_out:
        type: boolean

  cluster-finalizing-progress:
    type: object
    properties:
      finalizing_stage:
        $ref: '#/definitions/finalizing-stage'

  disk-encryption:
    type: object
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:disk_encryption_"
    properties:
      enable_on:
        type: string
        description: Enable/disable disk encryption on master nodes, worker nodes, or all nodes.
        enum: ['none', 'all', 'masters', 'workers']
        default: none
      mode:
        type: string
        description: The disk encryption mode to use.
        enum: ['tpmv2', 'tang']
        default: tpmv2
      tang_servers:
        type: string
        description: JSON-formatted string containing additional information regarding tang's configuration
        example: '[{"url":"http://tang.example.com:7500","thumbprint":"PLjNyRdGw03zlRoGjQYMahSZGu9"}, {"url":"http://tang.example.com:7501","thumbprint":"PLjNyRdGw03zlRoGjQYMahSZGu8"}]'
        x-go-custom-tag: gorm:"type:text"

  host-stage:
    type: string
    enum:
      - Starting installation
      - Waiting for control plane
      - Waiting for bootkube
      - Waiting for controller
      - Installing
      - Writing image to disk
      - Rebooting
      - Waiting for ignition
      - Configuring
      - Joined
      - Done
      - Failed

  error:
    type: object
    required:
      - kind
      - id
      - href
      - code
      - reason
    properties:
      kind:
        type: string
        enum: ['Error']
        description: Indicates the type of this object. Will always be 'Error'.
      id:
        type: integer
        format: int32
        description: Numeric identifier of the error.
        minimum: 400
        maximum: 504
      href:
        type: string
        description: Self link.
      code:
        type: string
        description: Globally unique code of the error, composed of the unique identifier of the API and the numeric identifier of the error. For example, if the numeric identifier of the error is 93 and the identifier of the API is assisted_install then the code will be ASSISTED-INSTALL-93.
      reason:
        type: string
        description: Human-readable description of the error.

  cluster_default_config:
    type: object
    properties:
      cluster_network_cidr:
        type: string
        pattern: '^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[\/]([1-9]|[1-2][0-9]|3[0-2]?)$'
      cluster_network_host_prefix:
        type: integer
        minimum: 1
        maximum: 32
      inactive_deletion_hours:
        type: integer
      service_network_cidr:
        type: string
        pattern: '^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[\/]([1-9]|[1-2][0-9]|3[0-2]?)$'
      ntp_source:
        type: string
        x-omitempty: false
      cluster_networks_ipv4:
        type: array
        items:
          $ref: '#/definitions/cluster_network'
      cluster_networks_dualstack:
        type: array
        items:
          $ref: '#/definitions/cluster_network'
      service_networks_ipv4:
        type: array
        items:
          $ref: '#/definitions/service_network'
      service_networks_dualstack:
        type: array
        items:
          $ref: '#/definitions/service_network'
      forbidden_hostnames:
        description: This provides a list of forbidden hostnames. If this list is empty or not present, this implies that the UI should fall back to a hard coded list.
        type: array
        items:
          type: string

  infra_error:
    type: object
    required:
      - code
      - message
    properties:
      code:
        type: integer
        format: int32
        description: Numeric identifier of the error.
        minimum: 401
        maximum: 403
      message:
        type: string
        description: Human-readable description of the error.

  interface:
    type: object
    properties:
      ipv6_addresses:
        type: array
        items:
          type: string
      vendor:
        type: string
      name:
        type: string
      has_carrier:
        type: boolean
      product:
        type: string
      mtu:
        type: integer
      ipv4_addresses:
        type: array
        items:
          type: string
      biosdevname:
        type: string
      client_id:
        type: string
      mac_address:
        type: string
      flags:
        type: array
        items:
          type: string
      speed_mbps:
        type: integer
      type:
        type: string

  disk:
    type: object
    properties:
      id:
        type: string
        description: Determine the disk's unique identifier which is the by-id field if it exists and fallback to the by-path field otherwise
      drive_type:
        $ref: '#/definitions/drive_type'
      has_uuid:
        type: boolean
      vendor:
        type: string
      name:
        type: string
      path:
        type: string
      hctl:
        type: string
      by_path:
        type: string
        description: by-path is the shortest physical path to the device
      by_id:
        type: string
        description: by-id is the World Wide Number of the device which guaranteed to be unique for every storage device
      model:
        type: string
      wwn:
        type: string
      serial:
        type: string
      size_bytes:
        type: integer
      bootable:
        type: boolean
      removable:
        type: boolean
      partitionTypes:
        type: string
      is_installation_media:
        type: boolean
        description: Whether the disk appears to be an installation media or not
      installation_eligibility:
        x-nullable: false
        type: object
        properties:
          eligible:
            type: boolean
            description: Whether the disk is eligible for installation or not.
          not_eligible_reasons:
            type: array
            description: Reasons for why this disk is not eligible for installation.
            items:
              type: string
      smart:
        type: string
      io_perf:
        $ref: '#/definitions/io_perf'
      holders:
        type: string
        description: A comma-separated list of disk names that this disk belongs to
      iscsi:
        $ref: '#/definitions/iscsi'

  drive_type:
    type: string
    enum:
      - Unknown
      - HDD
      - FDD
      - ODD
      - SSD
      - virtual
      - Multipath
      - iSCSI
      - FC
      - LVM
      - RAID
      - ECKD        # IBM
      - ECKD (ESE)  # IBM
      - FBA         # IBM

  io_perf:
    type: object
    properties:
      sync_duration:
        type: integer
        description: 99th percentile of fsync duration in milliseconds

  iscsi:
    type: object
    properties:
      host_ip_address:
        type: string
        description: Host IP address used to reach iSCSI target

  boot:
    type: object
    properties:
      current_boot_mode:
        type: string
      pxe_interface:
        type: string
      command_line:
        type: string
      secure_boot_state:
        $ref: '#/definitions/secure-boot-state'
      device_type:
        type: string
        enum: [persistent, ephemeral]

  system_vendor:
    type: object
    properties:
      serial_number:
        type: string
      product_name:
        type: string
      manufacturer:
        type: string
      virtual:
        type: boolean
        description: Whether the machine appears to be a virtual machine or not

  memory:
    type: object
    properties:
      physical_bytes:
        type: integer
      usable_bytes:
        type: integer
      physical_bytes_method:
        description: The method by which the physical memory was set
        $ref: '#/definitions/memory_method'

  cpu:
    type: object
    properties:
      count:
        type: integer
      frequency:
        type: number
      flags:
        type: array
        items:
          type: string
      model_name:
        type: string
      architecture:
        type: string

  gpu:
    type: object
    properties:
      vendor:
        type: string
        description: The name of the device vendor (for example "Intel Corporation")
      vendor_id:
        type: string
        description: ID of the vendor (for example "8086")
      device_id:
        type: string
        description: ID of the device (for example "3ea0")
      name:
        type: string
        description: Product name of the device (for example "UHD Graphics 620 (Whiskey Lake)")
      address:
        type: string
        description: Device address (for example "0000:00:02.0")

  route:
    type: object
    properties:
      interface:
        type: string
        description: Interface to which packets for this route will be sent
      gateway:
        type: string
        description: Gateway address where the packets are sent
      destination:
        type: string
        description: The destination network or destination host
      family:
        type: integer
        format: int32
        description: Defines whether this is an IPv4 (4) or IPv6 route (6)
      metric:
        type: integer
        format: int32
        description: Route priority metric

  inventory:
    type: object
    properties:
      hostname:
        type: string
      bmc_address:
        type: string
      interfaces:
        type: array
        items:
          $ref: '#/definitions/interface'
      disks:
        type: array
        items:
          $ref: '#/definitions/disk'
      boot:
        $ref: '#/definitions/boot'
      system_vendor:
        $ref: '#/definitions/system_vendor'
      bmc_v6address:
        type: string
      memory:
        $ref: '#/definitions/memory'
      cpu:
        $ref: '#/definitions/cpu'
      gpus:
        type: array
        items:
          $ref: '#/definitions/gpu'
      routes:
        type: array
        items:
          $ref: '#/definitions/route'
      tpm_version:
        type: string
        enum: ['none', '1.2', '2.0']

  free_network_addresses:
    type: object
    properties:
      network:
        type: string
        pattern: '^([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]|[1-2][0-9]|3[0-2]?$'
      free_addresses:
        type: array
        items:
          type: string
          format: ipv4

  free_networks_addresses:
    type: array
    items:
      $ref: '#/definitions/free_network_addresses'

  free_addresses_request:
    type: array
    items:
      type: string
      pattern: '^([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]|[1-2][0-9]|3[0-2]?$'

  download_boot_artifacts_request:
    type: object
    description: Information sent to the agent for downloading artifacts to boot a host into discovery.
    required:
      - kernel_url
      - rootfs_url
      - initrd_url
      - host_fs_mount_dir
    properties:
      kernel_url:
        type: string
        description: URL address to download the kernel.
      rootfs_url:
        type: string
        description: URL address to download the rootfs.
      initrd_url:
        type: string
        description: URL address to download the initrd.
      host_fs_mount_dir:
        type: string
        description: |-
          The base directory on the host that contains the /boot folder. The host will download boot
          artifacts into a folder in this directory.

  reboot_for_reclaim_request:
    type: object
    description: Information sent to the agent for rebooting a host into discovery.
    required:
      - host_fs_mount_dir
    properties:
      host_fs_mount_dir:
        type: string
        description: |-
          The base directory on the host that contains the /boot folder. The host needs to
          chroot into this directory in order to properly reboot.

  api_vip_connectivity_request:
    type: object
    required:
      - url
    properties:
      url:
        type: string
        description: URL address of the API.
      verify_cidr:
        type: boolean
        description: Whether to verify if the API VIP belongs to one of the interfaces (DEPRECATED).
      ca_certificate:
        type: string
        x-nullable: true
        description: A CA certficate to be used when contacting the URL via https.
      ignition_endpoint_token:
        x-nullable: true
        type: string
        description: A string which will be used as Authorization Bearer token to fetch the ignition from ignition_endpoint_url (DEPRECATED use request_headers to pass this token).
      request_headers:
        type: array
        x-nullable: true
        x-omitempty: true
        description: Additional request headers to include when fetching the ignition from ignition_endpoint_url.
        items:
          $ref: "#/definitions/api_vip_connectivity_additional_request_header"

  api_vip_connectivity_additional_request_header:
    type: object
    properties:
      key:
        type: string
        description: Value of the header's key when making a request
      value:
        type: string
        description: The value corresponding to the header key

  api_vip_connectivity_response:
    type: object
    description: |-
      The response from the day-2 agent's attempt to download the worker ignition file from the API machine config server of the target cluster.
      Note - the name "API VIP connectivity" is old and misleading and is preserved for backwards compatibility.
    properties:
      is_success:
        type: boolean
        description: Whether the agent was able to download the ignition or not
      url:
        type: string
        description: This parameter mirrors the url parameter of the corresponding api_vip_connectivity_request
      download_error:
        type: string
        description: The error that occurred while downloading the worker ignition file, ignored when is_success is true
      ignition:
        type: string
        description: |-
          Ignition file fetched from the target cluster's API machine config server.
          This ignition file may be incomplete as almost all files / systemd units are removed from it by the agent in order to save space.

  tang_connectivity_request:
    type: object
    required:
      - tang_servers
    properties:
      tang_servers:
        type: string
        description: JSON-formatted string containing additional information regarding tang's configuration

  tang_connectivity_response:
    type: object
    properties:
      is_success:
        type: boolean
        description: Tang check result.
      tang_server_response:
        type: array
        items:
          x-go-name: TangServerResponse
          type: object
          properties:
            tang_url:
              type: string
              description: Tang URL.
            payload:
              type: string
              description: Tang response payload.
            signatures:
              type: array
              items:
                x-go-name: TangServerSignatures
                type: object
                properties:
                  protected:
                    type: string
                  signature:
                    type: string

  disk_speed_check_request:
    type: object
    required:
      - path
    properties:
      path:
        type: string
        description: --filename argument for fio (expects a file or a block device path).

  disk_speed_check_response:
    type: object
    properties:
      io_sync_duration:
        type: integer
        description: The 99th percentile of fdatasync durations in milliseconds.
      path:
        type: string
        description: The device path.

  domain_resolution_request:
    type: object
    required:
      - domains
    properties:
      domains:
        type: array
        items:
          x-go-type:
            type: DomainResolutionRequestDomain
            import:
              path: github.com/openshift/assisted-service/models
          type: object

  domain_resolution_response:
    type: object
    required:
      - resolutions
    properties:
      resolutions:
        type: array
        items:
          x-go-name: DomainResolutionResponseDomain
          type: object
          required:
            - domain_name
          properties:
            domain_name:
              type: string
              description: "The domain that was resolved"
            ipv4_addresses:
              type: array
              description: "The IPv4 addresses of the domain, empty if none"
              items:
                type: string
                format: ipv4
            ipv6_addresses:
              type: array
              description: "The IPv6 addresses of the domain, empty if none"
              items:
                type: string
                format: ipv6
            cnames:
              type: array
              description: The cnames that were resolved for the domain, empty if none
              items:
                type: string

  disk_speed:
    type: object
    properties:
      tested:
        type: boolean
      exit_code:
        type: integer
      speed_ms:
        type: integer

  disk_info:
    type: object
    properties:
      id:
        type: string
        format: uuid
      path:
        type: string
      disk_speed:
        $ref: '#/definitions/disk_speed'

  platform_type:
    type: string
    enum:
      - baremetal
      - nutanix
      - vsphere
      - none
      - external

  platform_external:
    type: object
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:external_"
    description: Configuration used when installing with an external platform type.
    properties:
      platform_name:
        description: |-
          Holds the arbitrary string representing the infrastructure provider name.
        type: string
        minLength: 1
        x-nullable: true
      cloud_controller_manager:
        description: |-
          When set to external, this property will enable an external cloud provider.
        type: string
        x-nullable: true
        enum:
          - ""
          - External
        default: ""

  memory_method:
    type: string
    enum:
      - dmidecode
      - ghw
      - meminfo

  credentials:
    type: object
    properties:
      username:
        type: string
      password:
        type: string
      console_url:
        type: string

  disk-config-params:
    type: object
    required:
      - 'id'
    properties:
      id:
        type: string
      role:
        $ref: "#/definitions/disk-role"

  disk-skip-formatting-params:
    type: object
    description: Allows an addition or removal of a host disk from the host's skip_formatting_disks list
    required:
      - 'disk_id'
      - 'skip_formatting'
    properties:
      disk_id:
        type: string
        description: The ID of the disk that is being added to or removed from the host's skip_formatting_disks list
      skip_formatting:
        type: boolean
        description: True if you wish to add the disk to the skip_formatting_disks list, false if you wish to remove it

  disk-role:
    type: string
    enum:
      - 'none'
      - 'install'

  ignition-endpoint-http-headers-params:
    type: object
    required:
    - 'key'
    - 'value'
    properties:
      key:
        description: The key for the http header's key-value pair.
        type: string
      value:
        description: The value for the http header's key-value pair.
        type: string

  node-label-params:
    type: object
    required:
    - 'key'
    - 'value'
    properties:
      key:
        description: The key for the label's key-value pair.
        type: string
      value:
        description: The value for the label's key-value pair.
        type: string

  host-role-update-params:
    type: string
    enum:
      - 'auto-assign'
      - 'master'
      - 'worker'

  host-role:
    type: string
    enum:
      - 'auto-assign'
      - 'master'
      - 'worker'
      - 'bootstrap'

  host-validation-id:
    type: string
    enum:
      - 'connected'
      - 'media-connected'
      - 'has-inventory'
      - 'has-min-cpu-cores'
      - 'has-min-valid-disks'
      - 'has-min-memory'
      - 'machine-cidr-defined'
      - 'has-cpu-cores-for-role'
      - 'has-memory-for-role'
      - 'hostname-unique'
      - 'hostname-valid'
      - 'belongs-to-machine-cidr'
      - 'ignition-downloadable'
      - 'belongs-to-majority-group'
      - 'valid-platform-network-settings'
      - 'ntp-synced'
      - 'time-synced-between-host-and-service'
      - 'container-images-available'
      - 'lso-requirements-satisfied'
      - 'ocs-requirements-satisfied'
      - 'odf-requirements-satisfied'
      - 'lvm-requirements-satisfied'
      - 'mce-requirements-satisfied'
      - 'mtv-requirements-satisfied'
      - 'osc-requirements-satisfied'
      - 'sufficient-installation-disk-speed'
      - 'cnv-requirements-satisfied'
      - 'sufficient-network-latency-requirement-for-role'
      - 'sufficient-packet-loss-requirement-for-role'
      - 'has-default-route'
      - 'api-domain-name-resolved-correctly'
      - 'api-int-domain-name-resolved-correctly'
      - 'apps-domain-name-resolved-correctly'
      - 'release-domain-name-resolved-correctly'
      - 'compatible-with-cluster-platform'
      - 'dns-wildcard-not-configured'
      - 'disk-encryption-requirements-satisfied'
      - 'non-overlapping-subnets'
      - 'vsphere-disk-uuid-enabled'
      - 'compatible-agent'
      - 'no-skip-installation-disk'
      - 'no-skip-missing-disk'
      - 'no-ip-collisions-in-network'
      - 'no-iscsi-nic-belongs-to-machine-cidr'
      - 'node-feature-discovery-requirements-satisfied'
      - 'nvidia-gpu-requirements-satisfied'
      - 'pipelines-requirements-satisfied'
      - 'servicemesh-requirements-satisfied'
      - 'serverless-requirements-satisfied'
      - 'openshift-ai-requirements-satisfied'
      - 'authorino-requirements-satisfied'
      - 'mtu-valid'
      - 'nmstate-requirements-satisfied'
      - 'amd-gpu-requirements-satisfied'
      - 'kmm-requirements-satisfied'
      - 'node-healthcheck-requirements-satisfied'
      - 'self-node-remediation-requirements-satisfied'
      - 'fence-agents-remediation-requirements-satisfied'
      - 'node-maintenance-requirements-satisfied'
      - 'kube-descheduler-requirements-satisfied'

  dhcp_allocation_request:
    type: object
    required:
      - interface
      - api_vip_mac
      - ingress_vip_mac
    properties:
      interface:
        type: string
        description: The network interface (NIC) to run the DHCP requests on.
      api_vip_mac:
        type: string
        format: mac
        description: MAC address for the API virtual IP.
      ingress_vip_mac:
        type: string
        format: mac
        description: MAC address for the Ingress virtual IP.
      api_vip_lease:
        type: string
        description: Contents of lease file to be used for API virtual IP.
      ingress_vip_lease:
        type: string
        description: Contents of lease file to be used for for Ingress virtual IP.

  dhcp_allocation_response:
    type: object
    required:
      - api_vip_address
      - ingress_vip_address
    properties:
      api_vip_address:
        type: string
        format: ipv4
        description: The IPv4 address that was allocated by DHCP for the API virtual IP.
      ingress_vip_address:
        type: string
        format: ipv4
        description: The IPv4 address that was allocated by DHCP for the Ingress virtual IP.
      api_vip_lease:
        type: string
        description: Contents of last acquired lease for API virtual IP.
      ingress_vip_lease:
        type: string
        description: Contents of last acquired lease for Ingress virtual IP.

  next_step_cmd_request:
    type: object
    required:
      - infra_env_id
      - host_id
      - agent_version
    properties:
      infra_env_id:
        type: string
        format: uuid
        description: Infra env id
      host_id:
        type: string
        format: uuid
        description: Host id
      agent_version:
        pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$'
        type: string
        description: Agent image version

  logs_gather_cmd_request:
    type: object
    required:
      - cluster_id
      - infra_env_id
      - host_id
      - bootstrap
      - installer_gather
    properties:
      cluster_id:
        type: string
        format: uuid
        description: Cluster id
      infra_env_id:
        type: string
        format: uuid
        description: Infra env id
      host_id:
        type: string
        format: uuid
        description: Host id
      bootstrap:
        type: boolean
        description: Host is bootstrap or not
      installer_gather:
        type: boolean
        description: Run installer gather logs
        default: true
      master_ips:
        type: array
        description: List of master ips
        items:
          type: string
          description: Master ip.
          pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$'


  install_cmd_request:
    type: object
    required:
      - cluster_id
      - infra_env_id
      - host_id
      - role
      - boot_device
      - controller_image
      - installer_image
    properties:
      cluster_id:
        type: string
        format: uuid
        description: Cluster id
      infra_env_id:
        type: string
        format: uuid
        description: Infra env id
      host_id:
        type: string
        format: uuid
        description: Host id
      role:
        $ref: '#/definitions/host-role'
      boot_device:
        type: string
        description: Boot device to write image on
      controller_image:
        pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$'
        type: string
        description: Assisted installer controller image
      installer_image:
        pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$'
        type: string
        description: Assisted installer image
      control_plane_count:
        type: integer
        description: Specifies the required number of control plane nodes that should be part of the cluster.
      proxy:
        $ref: "#/definitions/proxy"
      check_cvo:
        type: boolean
        description: Check CVO status if needed
        default: true
      disks_to_format:
        type: array
        description: List of disks to format
        items:
          type: string
          description: Disk to format
      must_gather_image:
        type: string
        description: Must-gather images to use
      mco_image:
        pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$'
        type: string
        description: Machine config operator image
      openshift_version:
        type: string
        description: Version of the OpenShift cluster.
      service_ips:
        type: array
        description: List of service ips
        items:
          type: string
          description: Service ip.
          pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))$'
      installer_args:
        type: string
        description: Core-os installer addtional args
      skip_installation_disk_cleanup:
        type: boolean
        description: Skip formatting installation disk
      enable_skip_mco_reboot:
        type: boolean
        description: If true, assisted service will attempt to skip MCO reboot
      notify_num_reboots:
        type: boolean
        description: If true, notify number of reboots by assisted controller
      coreos_image:
        type: string
        description: CoreOS container image to use if installing to the local device

  ntp_synchronization_request:
    type: object
    required:
      - ntp_source
    properties:
      ntp_source:
        type: string
        description: A comma-separated list of NTP sources (name or IP) going to be added to all the hosts.

  ntp_synchronization_response:
    properties:
      ntp_sources:
        type: array
        items:
          $ref: "#/definitions/ntp_source"

  ntp_source:
    type: object
    properties:
      source_name:
        type: string
        description: NTP source name or IP.
      source_state:
        description: Indication of state of an NTP source.
        $ref: "#/definitions/source_state"

  container_image_availability_request:
    type: object
    required:
      - images
    properties:
      timeout:
        type: integer
        description: Positive number represents a timeout in seconds for a pull operation.
      images:
        type: array
        description: List of image names to be checked.
        items:
          pattern: '^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$'
          type: string
          description: A fully qualified image name (FQIN).

  container_image_availability_response:
    type: object
    required:
      - images
    properties:
      images:
        type: array
        description: List of images that were checked.
        items:
          $ref: '#/definitions/container_image_availability'

  container_image_availability:
    type: object
    properties:
      name:
        type: string
        description: A fully qualified image name (FQIN).
      size_bytes:
        type: number
        description: Size of the image in bytes.
      time:
        type: number
        description: Seconds it took to pull the image.
      download_rate:
        type: number
        description: The rate of size/time in seconds MBps.
      result:
        $ref: '#/definitions/container_image_availability_result'

  container_image_availability_result:
    type: string
    enum: ['success', 'failure']
    description: Image availability result.

  upgrade_agent_request:
    type: object
    properties:
      agent_image:
        type: string
        description: |
          Full image reference of the image that the agent should upgrade to, for example
          `quay.io/registry-proxy.engineering.redhat.com/rh-osbs/openshift4-assisted-installer-agent-rhel8:v1.0.0-142`.

  upgrade_agent_response:
    type: object
    properties:
      agent_image:
        type: string
        description: |
          Full image reference of the image that the agent has upgraded to, for example
          `quay.io/registry-proxy.engineering.redhat.com/rh-osbs/openshift4-assisted-installer-agent-rhel8:v1.0.0-142`.
      result:
        $ref: '#/definitions/upgrade_agent_result'

  upgrade_agent_result:
    type: string
    enum: ['success', 'failure']
    description: Agent upgrade result.

  vip_type:
    type: string
    description: The vip type.
    enum: ['api', 'ingress']

  verify_vip:
    type: object
    description: Request to verify single vip.
    properties:
      vip:
        $ref: '#/definitions/ip'
      vip_type:
        $ref: '#/definitions/vip_type'

  verified_vip:
    type: object
    description: Single VIP verification result.
    properties:
      vip:
        $ref: '#/definitions/ip'
      vip_type:
        $ref: '#/definitions/vip_type'
      verification:
        $ref: '#/definitions/vip_verification'

  verify_vips_request:
    type: array
    description: list of vips to be verified.
    items:
      $ref: '#/definitions/verify_vip'

  verify_vips_response:
    type: array
    description: list of verified vips.
    items:
      $ref: '#/definitions/verified_vip'


  source_state:
    type: string
    enum:
      - synced
      - combined
      - not_combined
      - error
      - variable
      - unreachable

  cluster-validation-id:
    type: string
    enum:
      - 'machine-cidr-defined'
      - 'cluster-cidr-defined'
      - 'service-cidr-defined'
      - 'no-cidrs-overlapping'
      - 'networks-same-address-families'
      - 'network-prefix-valid'
      - 'machine-cidr-equals-to-calculated-cidr'
      - 'api-vips-defined'
      - 'api-vips-valid'
      - 'ingress-vips-defined'
      - 'ingress-vips-valid'
      - 'all-hosts-are-ready-to-install'
      - 'sufficient-masters-count'
      - 'dns-domain-defined'
      - 'pull-secret-set'
      - 'ntp-server-configured'
      - 'lso-requirements-satisfied'
      - 'ocs-requirements-satisfied'
      - 'odf-requirements-satisfied'
      - 'cnv-requirements-satisfied'
      - 'lvm-requirements-satisfied'
      - 'mce-requirements-satisfied'
      - 'mtv-requirements-satisfied'
      - 'osc-requirements-satisfied'
      - 'network-type-valid'
      - 'platform-requirements-satisfied'
      - 'node-feature-discovery-requirements-satisfied'
      - 'nvidia-gpu-requirements-satisfied'
      - 'pipelines-requirements-satisfied'
      - 'servicemesh-requirements-satisfied'
      - 'serverless-requirements-satisfied'
      - 'openshift-ai-requirements-satisfied'
      - 'authorino-requirements-satisfied'
      - 'nmstate-requirements-satisfied'
      - 'amd-gpu-requirements-satisfied'
      - 'kmm-requirements-satisfied'
      - 'node-healthcheck-requirements-satisfied'
      - 'self-node-remediation-requirements-satisfied'
      - 'fence-agents-remediation-requirements-satisfied'
      - 'node-maintenance-requirements-satisfied'
      - 'kube-descheduler-requirements-satisfied'

  logs_type:
    type: string
    enum:
      - 'host'
      - 'controller'
      - 'all'
      - ''

  logs_state:
    x-go-custom-tag: gorm:"type:varchar(2048)"
    type: string
    enum:
      - 'requested'
      - 'collecting'
      - 'completed'
      - 'timeout'
      - ''

  logs-progress-params:
    type: object
    required:
      - logs_state
    properties:
      logs_state:
        description: The state of collecting logs.
        $ref: '#/definitions/logs_state'

  list-manifests:
    type: array
    items:
      $ref: '#/definitions/manifest'

  manifest:
    type: object
    properties:
      folder:
        description: The folder that contains the files. Manifests can be placed in 'manifests' or 'openshift' directories.
        type: string
        enum: [manifests,openshift]
      file_name:
        type: string
        description: The file name prefaced by the folder that contains it.
      manifest_source:
        type: string
        enum: [user,system]
        description: Describes whether manifest is sourced from a user or created by the system.

  create-manifest-params:
    type: object
    properties:
      folder:
        description: The folder that contains the files. Manifests can be placed in 'manifests' or 'openshift' directories.
        type: string
        enum: [manifests,openshift]
        default: manifests
      file_name:
        description: The name of the manifest to customize the installed OCP cluster.
        type: string
        pattern: '^[^\/]*\.(json|ya?ml(\.patch_?[a-zA-Z0-9_]*)?)$'
      content:
        description: base64 encoded manifest content.
        type: string
    required:
      - file_name
      - content

  update-manifest-params:
    type: object
    properties:
      folder:
        description: The folder for the manifest to modify.
        type: string
        enum: [manifests,openshift]
        default: manifests
        x-nullable: false
      file_name:
        description: The file name for the manifest to modify.
        type: string
        pattern: '^[^\/]*\.(json|ya?ml(\.patch_?[a-zA-Z0-9_]*)?)$'
        x-nullable: false
      updated_folder:
        description: The new folder for the manifest. Manifests can be placed in 'manifests' or 'openshift' directories.
        type: string
        enum: [manifests,openshift]
        default: manifests
        x-nullable: true
      updated_file_name:
        description: The new file name for the manifest.
        type: string
        pattern: '^[^\/]*\.(json|ya?ml(\.patch_?[a-zA-Z0-9_]*)?)$'
        x-nullable: true
      updated_content:
        description: The new base64 encoded manifest content.
        type: string
        x-nullable: true
    required:
      - folder
      - file_name

  host-ignition-params:
    properties:
      config:
        type: string

  openshift-version:
    type: object
    required:
      - display_name
      - support_level
      - cpu_architectures
    properties:
      display_name:
        type: string
        description: Name of the version to be presented to the user.
      support_level:
        type: string
        enum: [beta, production, maintenance, end-of-life]
        description: Level of support of the version.
      default:
        type: boolean
        description: Indication that the version is the recommended one.
      cpu_architectures:
        type: array
        items:
          type: string
        description: Available CPU architectures.

  os-image:
    type: object
    required:
      - openshift_version
      - cpu_architecture
      - url
      - version
    properties:
      openshift_version:
        type: string
        description: Version of the operating system image
        example: "4.12"
      cpu_architecture:
        type: string
        default: "x86_64"
         # TODO: remove arm64 when AI moves to using aarch64
        enum: ['x86_64', 'aarch64', 'arm64','ppc64le','s390x']
        description: The CPU architecture of the image (x86_64/arm64/etc).
        x-go-custom-tag: gorm:"default:'x86_64'"
      url:
        type: string
        description: The base OS image used for the discovery iso.
      version:
        type: string
        description: Build ID of the OS image.

  os-images:
    type: array
    items:
      $ref: '#/definitions/os-image'

  release-image:
    type: object
    required:
      - openshift_version
      - cpu_architecture
      - url
      - version
    properties:
      openshift_version:
        type: string
        description: Version of the OpenShift cluster.
      cpu_architecture:
        type: string
        default: "x86_64"
         # TODO: remove arm64 when AI moves to using aarch64
        enum: ['x86_64', 'aarch64', 'arm64','ppc64le','s390x','multi']
        description: (DEPRECATED) The CPU architecture of the image (x86_64/arm64/etc).
        x-go-custom-tag: gorm:"default:'x86_64'"
      cpu_architectures:
        type: array
        items:
          type: string
        description: List of CPU architectures provided by the image.
        x-go-custom-tag: gorm:"type:text[]"
        x-go-type:
          type: StringArray
          import:
            package: github.com/lib/pq
          hints:
            noValidation: true
      url:
        type: string
        description: The installation image of the OpenShift cluster.
        x-go-custom-tag: gorm:"primarykey"
      version:
        type: string
        description: OCP version from the release metadata.
      default:
        type: boolean
        description: Indication that the version is the recommended one.
      support_level:
        type: string
        enum: [beta, production, maintenance, end-of-life]
        description: Level of support of the version.

  release-images:
    type: array
    items:
      $ref: '#/definitions/release-image'

  release-source:
    type: object
    required:
      - openshift_version
      - multi_cpu_architectures
      - upgrade_channels
    properties:
      openshift_version:
        type: string
        description: Version of the OpenShift cluster.
        example: "4.14"
      multi_cpu_architectures:
        type: array
        items:
          type: string
          enum: ['x86_64', 'aarch64', 'arm64','ppc64le','s390x']
          description: Supported CPU architecture for multi-architecture releases in this OpenShift version..
      upgrade_channels:
        type: array
        items:
          $ref: '#/definitions/upgrade-channel'

  release-sources:
    type: array
    items:
      $ref: '#/definitions/release-source'

  upgrade-channel:
    type: object
    required:
      - cpu_architecture
      - channels
    properties:
      cpu_architecture:
        type: string
        enum: ['x86_64', 'aarch64', 'arm64','ppc64le','s390x','multi']
        description: The CPU architecture of the image.
      channels:
        type: array
        items:
          $ref: '#/definitions/release-channel'

  release-channel:
    type: string
    enum: [candidate, fast, stable, eus]
    description: Release channel.

  kernel_argument:
    type: object
    description: pair of [operation, argument] specifying the argument and what operation should be applied on it.
    properties:
      operation:
        type: string
        enum: ['append', 'replace', 'delete']
        description: The operation to apply on the kernel argument.
      value:
        type: string
        pattern: '^(?:(?:[^ \t\n\r"]+)|(?:"[^"]*"))+$'
        description: |
          Kernel argument can have the form <parameter> or <parameter>=<value>. The following examples should
          be supported:
          rd.net.timeout.carrier=60
          isolcpus=1,2,10-20,100-2000:2/25
          quiet
          The parsing by the command line parser in linux kernel is much looser and this pattern follows it.

  kernel_arguments:
    description: List of kernel arugment objects that define the operations and values to be applied.
    x-omitempty: false
    type: array
    items:
      $ref: '#/definitions/kernel_argument'

  operator-property:
    type: object
    properties:
      name:
        type: string
        description: Name of the property
      data_type:
        type: string
        enum: ['boolean', 'string', 'integer', 'float']
        description: Type of the property
      mandatory:
        type: boolean
        description: Indicates whether the property is reqired
      options:
        type: array
        items:
          type: string
        description: Values to select from
      description:
        type: string
        description: Description of a property
      default_value:
        type: string
        description: Default value for the property

  operator-properties:
    type: array
    items:
      $ref: '#/definitions/operator-property'

  usage:
    type: object
    properties:
      id:
        type: string
        description: Unique idenftifier of the feature
      name:
        type: string
        description: name of the feature to track
      data:
        type: object
        description: additional properties of the feature
        additionalProperties:
          type: object

  infra-env:
    type: object
    required:
      - kind
      - id
      - href
      - name
      - type
      - updated_at
      - created_at
    properties:
      kind:
        type: string
        enum: ['InfraEnv']
        description: Indicates the type of this object.
      id:
        type: string
        format: uuid
        description: Unique identifier of the object.
        x-go-custom-tag: gorm:"primaryKey"
      href:
        type: string
        description: Self link.
      openshift_version:
        type: string
        description: Version of the OpenShift cluster (used to infer the RHCOS version - temporary until generic logic implemented).
      name:
        type: string
        description: Name of the infra-env.
      user_name:
        type: string
      org_id:
        type: string
      email_domain:
        type: string
      proxy:
        $ref: "#/definitions/proxy"
      additional_ntp_sources:
        type: string
        description: A comma-separated list of NTP sources (name or IP) going to be added to all the hosts.
      ssh_authorized_key:
        type: string
        description: SSH public key for debugging the installation.
      pull_secret_set:
        type: boolean
        description: True if the pull secret has been added to the cluster.
      static_network_config:
        type: string
        description: static network configuration string in the format expected by discovery ignition generation.
      type:
        $ref: '#/definitions/image_type'
      ignition_config_override:
        type: string
        description: Json formatted string containing the user overrides for the initial ignition config.
      cluster_id:
        type: string
        format: uuid
        description: If set, all hosts that register will be associated with the specified cluster.
        x-go-custom-tag: gorm:"index"
      size_bytes:
        type: integer
        minimum: 0
      download_url:
        type: string
      generator_version:
        type: string
        description: Image generator version.
      updated_at:
        type: string
        format: date-time
        x-go-type:
          type: Time
          import:
            package: time
          hints:
            noValidation: true
        x-go-custom-tag: gorm:"type:timestamp with time zone"
        description: The last time that this infra-env was updated.
      created_at:
        type: string
        format: date-time
        x-go-type:
          type: Time
          import:
            package: time
          hints:
            noValidation: true
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      expires_at:
        type: string
        format: date-time
        x-go-custom-tag: gorm:"type:timestamp with time zone"
      cpu_architecture:
        type: string
        x-nullable: false
        default: 'x86_64'
         # TODO: remove arm64 when AI moves to using aarch64
        enum: ['x86_64', 'aarch64', 'arm64','ppc64le','s390x']
        description: The CPU architecture of the image (x86_64/arm64/etc).
      kernel_arguments:
        type: string
        x-nullable: true
        x-go-custom-tag: gorm:"type:text"
        description: JSON formatted string array representing the discovery image kernel arguments.
      additional_trust_bundle:
        type: string
        x-nullable: false
        description: |-
          PEM-encoded X.509 certificate bundle. Hosts discovered by this
          infra-env will trust the certificates in this bundle. Clusters formed
          from the hosts discovered by this infra-env will also trust the
          certificates in this bundle.
  proxy:
    type: object
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:proxy_"
    properties:
      http_proxy:
        type: string
        description: |
          A proxy URL to use for creating HTTP connections outside the cluster.
          http://\<username\>:\<pswd\>@\<ip\>:\<port\>
        x-nullable: true
      https_proxy:
        type: string
        description: |
          A proxy URL to use for creating HTTPS connections outside the cluster.
          http://\<username\>:\<pswd\>@\<ip\>:\<port\>
        x-nullable: true
        x-go-custom-tag: gorm:"column:https_proxy"
      no_proxy:
        type: string
        description: An "*" or a comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude from proxying.
        x-nullable: true

  infra-env-list:
    type: array
    items:
      $ref: '#/definitions/infra-env'

  infra-env-create-params:
    type: object
    required:
      - name
      - pull_secret
    properties:
      name:
        type: string
        description: Name of the infra-env.
      proxy:
        $ref: "#/definitions/proxy"
      additional_ntp_sources:
        type: string
        description: A comma-separated list of NTP sources (name or IP) going to be added to all the hosts.
        x-nullable: true
      ssh_authorized_key:
        type: string
        description: SSH public key for debugging the installation.
        x-nullable: true
      pull_secret:
        type: string
        description: The pull secret obtained from Red Hat OpenShift Cluster Manager at console.redhat.com/openshift/install/pull-secret.
      static_network_config:
        type: array
        items:
          $ref: '#/definitions/host_static_network_config'
      image_type:
        $ref: '#/definitions/image_type'
      ignition_config_override:
        type: string
        description: JSON formatted string containing the user overrides for the initial ignition config.
      cluster_id:
        type: string
        format: uuid
        description: If set, all hosts that register will be associated with the specified cluster.
        x-nullable: true
      openshift_version:
        type: string
        description: Version of the OpenShift cluster (used to infer the RHCOS version - temporary until generic logic implemented).
      cpu_architecture:
        type: string
        x-nullable: false
        default: 'x86_64'
         # TODO: remove arm64 when AI moves to using aarch64
        enum: ['x86_64', 'aarch64', 'arm64','ppc64le','s390x']
        description: The CPU architecture of the image (x86_64/arm64/etc).
      kernel_arguments:
        $ref: '#/definitions/kernel_arguments'
      additional_trust_bundle:
        type: string
        x-nullable: false
        maxLength: 65535
        description: |-
          PEM-encoded X.509 certificate bundle. Hosts discovered by this
          infra-env will trust the certificates in this bundle. Clusters formed
          from the hosts discovered by this infra-env will also trust the
          certificates in this bundle.
  infra-env-update-params:
    type: object
    properties:
      proxy:
        $ref: "#/definitions/proxy"
      additional_ntp_sources:
        type: string
        description: A comma-separated list of NTP sources (name or IP) going to be added to all the hosts.
        x-nullable: true
      ssh_authorized_key:
        type: string
        description: SSH public key for debugging the installation.
        x-nullable: true
      pull_secret:
        type: string
        description: The pull secret obtained from Red Hat OpenShift Cluster Manager at console.redhat.com/openshift/install/pull-secret.
      static_network_config:
        type: array
        items:
          $ref: '#/definitions/host_static_network_config'
      image_type:
        $ref: '#/definitions/image_type'
      ignition_config_override:
        type: string
        description: JSON formatted string containing the user overrides for the initial ignition config.
      kernel_arguments:
        $ref: '#/definitions/kernel_arguments'
      additional_trust_bundle:
        type: string
        description: Allows users to change the additional_trust_bundle infra-env field
        x-nullable: true
        maxLength: 65535
      openshift_version:
        type: string
        description: Version of the OS image
        x-nullable: true

  ip:
    type: string
    x-go-custom-tag: gorm:"primaryKey"
    pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,}))?$'

  subnet:
    type: string
    x-go-custom-tag: gorm:"primaryKey"
    pattern: '^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$'

  vip_verification:
    type: string
    enum: ['unverified', 'failed', 'succeeded']
    description: vip verification result.
    default: 'unverified'

  cluster_network:
    type: object
    description: A network from which Pod IPs are allocated. This block must not overlap with existing physical networks. These IP addresses are used for the Pod network, and if you need to access the Pods from an external network, configure load balancers and routers to manage the traffic.
    properties:
      cluster_id:
        type: string
        format: uuid
        description: The cluster that this network is associated with.
        x-go-custom-tag: gorm:"primaryKey"
      cidr:
        $ref: '#/definitions/subnet'
        description: The IP block address pool.
      host_prefix:
        type: integer
        description: The subnet prefix length to assign to each individual node. For example if is set to 23, then each node is assigned a /23 subnet out of the given CIDR, which allows for 510 (2^(32 - 23) - 2) pod IPs addresses.
        minimum: 1
        maximum: 128

  machine_network:
    type: object
    description: A network that all hosts belonging to the cluster should have an interface with IP address in. The VIPs (if exist) belong to this network.
    properties:
      cluster_id:
        type: string
        format: uuid
        description: The cluster that this network is associated with.
        x-go-custom-tag: gorm:"primaryKey"
      cidr:
        $ref: '#/definitions/subnet'
        description: The IP block address pool.

  service_network:
    type: object
    description: IP address block for service IP blocks.
    properties:
      cluster_id:
        type: string
        format: uuid
        description: A network to use for service IP addresses. If you need to access the services from an external network, configure load balancers and routers to manage the traffic.
        x-go-custom-tag: gorm:"primaryKey"
      cidr:
        $ref: '#/definitions/subnet'
        description: The IP block address pool.

  api_vip:
    type: object
    description: The virtual IP used to reach the OpenShift cluster's API.
    properties:
      cluster_id:
        type: string
        format: uuid
        description: The cluster that this VIP is associated with.
        x-go-custom-tag: gorm:"primaryKey"
      ip:
        $ref: '#/definitions/ip'
        description: The IP address.
      verification:
        $ref: '#/definitions/vip_verification'
        description: API VIP verification result.

  ingress_vip:
    type: object
    description: The virtual IP used for cluster ingress traffic.
    properties:
      cluster_id:
        type: string
        format: uuid
        description: The cluster that this VIP is associated with.
        x-go-custom-tag: gorm:"primaryKey"
      ip:
        $ref: '#/definitions/ip'
        description: The IP address.
      verification:
        $ref: '#/definitions/vip_verification'
        description: Ingress VIP verification result.

  bind-host-params:
    required:
      - cluster_id
    properties:
      cluster_id:
        type: string
        format: uuid

  presigned-url:
    type: object
    required:
      - url
    properties:
      url:
        type: string
        description: Pre-signed URL for downloading the infra-env discovery image.
      expires_at:
        type: string
        format: date-time
        description: Expiration time for the URL token.

  secure-boot-state:
    type: string
    enum:
    - Unknown
    - NotSupported
    - Enabled
    - Disabled

  load_balancer:
    type: object
    x-go-custom-tag: gorm:"embedded;embeddedPrefix:load_balancer_"
    properties:
      type:
        x-go-custom-tag: gorm:"not null;check:load_balancer_type in ('cluster-managed', 'user-managed');default:'cluster-managed'"
        description: |
          Indicates if the load balancer will be managed by the cluster or by the user. This is optional and The
          default is `cluster-managed`.

          `cluster-managed` means that the cluster will start the components that assign the API and ingress VIPs to the
          nodes of the cluster automatically.

          `user-managed` means that the user is responsible for configuring an external load balancer and assign the
          API and ingress VIPs to it. Note that this configuration needs to be completed before starting the
          installation of the cluster, as it is needed during the installation process.
        type: string
        enum:
        - cluster-managed
        - user-managed