Skip to content
Y.Jace Liu edited this page Oct 26, 2017 · 7 revisions

Welcome to the alto-orchestrator wiki!

Orchestrator API

The schema in this wiki may be behind the latest.

For updated schema, please refer to here

  • Register to orchestrator: /register

    ---
    "$schema": http://json-schema.org/draft-06/schema#
    type: object
    properties:
      domain-name:
        type: string
        title: The domain-name schema.
        description: The name of the domain
        examples:
        - domain1
        id: "/properties/domain-name"
      controller-url:
        type: string
        title: The controller-url schema.
        description: The base URL of the controller for doing path query and resource query
        examples:
        - https://10.0.1.40:8181/api/openalto/adapter/
        id: "/properties/controller-url"
      hosts:
        id: "/properties/hosts"
        type: array
        minItems: 1
        uniqueItems: true
        items:
          description: Host IPs in the domain
          examples:
          - 10.0.1.100
          id: "/properties/hosts/items"
          type: string
          pattern: ^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|$
      ingress-points:
        type: array
        id: "/properties/ingress-points"
        minItems: 1
        uniqueItems: true
        items:
          type: string
          description: The ip of ingress points
          examples:
          - 10.0.1.1
          id: "/properties/ingress-points/items"
          pattern: ^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|$
    required:
    - hosts
    - ingress-points
    - domain-name
    - controller-url
  • Provide a task to schedule: /tasks

    ---
    "$schema": http://json-schema.org/draft-06/schema#
    title: Task
    description: A task to be scheduled
    type: array
    minItems: 1
    uniqueItems: true
    items:
      type: object
      properties:
        id:
          description: The id of the task
          type: integer
        jobs:
          description: The array of jobs of the task
          type: array
          minItems: 0
          uniqueItems: true
          items:
            type: object
            properties:
              potential_srcs:
                type: array
                minItems: 1
                uniqueItems: true
                items:
                  type: object
                  properties:
                    ip:
                      type: string
                      pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|$"
                    port:
                      type: integer
                      minimum: 0
                      maximum: 65535
                potential_dsts:
                  type: array
                  minItems: 1
                  uniqueItems: true
                  items:
                    type: object
                    properties:
                      ip:
                        type: string
                        pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|$"
                      port:
                        type: integer
                        minimum: 0
                        maximum: 65535
                    required:
                    - ip
                    - port
            required:
            - potential_srcs
            - potential_dsts
      required:
      - id
      - jobs
Clone this wiki locally