diff --git a/cray/modules/bos/cli.py b/cray/modules/bos/cli.py index e5fae62..ac09659 100644 --- a/cray/modules/bos/cli.py +++ b/cray/modules/bos/cli.py @@ -35,10 +35,10 @@ cli = generate(__file__, swagger_opts=SWAGGER_OPTS) # Update v2 sessions should only be in the API -- not intended for CLI use -del cli.commands['v2'].commands['sessions'].commands['update'] +#del cli.commands['v2'].commands['sessions'].commands['update'] # Remove all v1 endpoints -del cli.commands['v1'] +#del cli.commands['v1'] # Place the v2 commands at the 'cray bos' level of the cli CURRENT_VERSION = 'v2' diff --git a/cray/modules/bos/openapi.yaml b/cray/modules/bos/openapi.yaml index 2c5c4df..67c2a38 100644 --- a/cray/modules/bos/openapi.yaml +++ b/cray/modules/bos/openapi.yaml @@ -1,9 +1,9 @@ # Cray Boot Orchestration Service (BOS) API Specification -openapi: "3.0.2" +openapi: "3.0.3" info: title: "Boot Orchestration Service" - version: "0.0.0-api" + version: "2.8.0" description: | The Boot Orchestration Service (BOS) provides coordinated provisioning actions over defined hardware sets to enable boot, reboot, shutdown, configuration and @@ -17,78 +17,83 @@ info: ## Resources - ### /sessiontemplate + ### Session Template - A session template sets the operational context of which nodes to operate on for + A Session Template sets the operational context of which nodes to operate on for any given set of nodes. It is largely comprised of one or more boot sets and their associated software configuration. - A boot set defines a list of nodes, the image you want to boot/reboot the nodes with, + A Boot Set defines a list of nodes, the image you want to boot/reboot the nodes with, kernel parameters to use to boot the nodes, and additional configuration management framework actions to apply during node bring up. - ### /session + ### Session - A BOS session applies a provided action to the nodes defined in a session - template. + A BOS Session applies a provided action to the nodes defined in a Session Template. - ## Workflow + ## Workflow: Create a New Session - ### Create a New Session + 1. Choose the Session Template to use. - #### GET /sessiontemplate + Session Templates which do not belong to a tenant are uniquely identified by their + names. All Session Templates that belong to a given tenant are uniquely identified + by their names, but may share names with Session Templates that belong to other + tenants or that do not belong to a tenant. - List available session templates. - Note the *name* which uniquely identifies each session template. - This value can be used to create a new session later, - if specified in the request body of POST /session. + a. List available Session Templates. - #### POST /sessiontemplate + GET /v2/sessiontemplates - If no session template pre-exists that satisfies requirements, - then create a new session template. *name* uniquely identifies the - session template. - This value can be used to create a new session later, - if specified in the request body of POST /session. + b. Create a new Session Template if desired. - #### POST /session + PUT /v2/sessiontemplate/{template_name} - Specify template_name and an - operation to create a new session. - The template_name corresponds to the session template *name*. - A new session is launched as a result of this call. + If no Session Template exists that satisfies requirements, + then create a new Session Template. + This Session Template can be used to create a new Session later. - A limit can also be specified to narrow the scope of the session. The limit - can consist of nodes, groups, or roles in a comma-separated list. - Multiple groups are treated as separated by OR, unless "&" is added to - the start of the component, in which case this becomes an AND. Components - can also be preceded by "!" to exclude them. + 2. Create the Session. - Note, the response from a successful session launch contains *links*. - Within *links*, *href* is a string that uniquely identifies the session. - *href* is constructed using the session template name and a generated UUID. - Use the entire *href* string as the path parameter *session_id* - to uniquely identify a session in for the /session/{session_id} - endpoint. + POST /v2/sessions + Specify template_name and an operation to create a new Session. + The template_name corresponds to the Session Template *name*. + A new Session is launched as a result of this call (in the case of + /v2/sessions, the option to stage but not begin the Session also exists). - #### GET /session/{session_id} + A limit can also be specified to narrow the scope of the Session. The limit + can consist of nodes, groups, or roles in a comma-separated list. + Multiple groups are treated as separated by OR, unless "&" is added to + the start of the component, in which case this becomes an AND. Components + can also be preceded by "!" to exclude them. - Get session details by session id. + Note, the response from a successful Session launch contains *links*. + Within *links*, *href* is a string that uniquely identifies the Session. + *href* is constructed using the Session Template name and a generated UUID. + Use the entire *href* string as the path parameter *session_id* + to uniquely identify a Session. - List all in progress and completed sessions. + 3. Get details on the Session. + + GET /v2/sessions/{session_id} ## Interactions with Other APIs + ### Configuration Framework Service (CFS) + + If *enable_cfs* is true in a Session Template, then BOS will invoke CFS to + configure the target nodes during *boot* or *reboot* operations. + + ### Hardware State Manager (HSM) - BOS works in concert with Image Management Service (IMS) to access boot images, - and if *enable_cfs* is true then - BOS will invoke CFS to configure the compute nodes. + In some situations BOS checks HSM to determine if a node has been disabled. + ### Image Management Service (IMS) - All boot images specified via the session template, must be available via IMS. + BOS works in concert with IMS to access boot images. + All boot images specified via the Session Template must be available via IMS. servers: @@ -98,6 +103,103 @@ servers: description: The service as exposed through Kubernetes DNS service mapping components: schemas: + # Version-agnostic schemas + AgeString: + type: string + description: Age in minutes (e.g. "3m"), hours (e.g. "5h"), days (e.g. "10d"), or weeks (e.g. "2w"). + example: "3d" + pattern: '^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$' + minLength: 1 + # This allows for over 10 years using the smallest units (minutes) + maxLength: 8 + BootInitrdPath: + type: string + description: A path to the initrd to use for booting. + example: "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd" + maxLength: 4095 + BootKernelPath: + type: string + description: A path to the kernel to use for booting. + example: "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel" + maxLength: 4095 + BootManifestPath: + type: string + description: | + A path identifying the metadata describing the components of the boot image. + This could be a URI, URL, etc, depending on the type of the Boot Set. + example: "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json" + minLength: 1 + maxLength: 4095 + BootKernelParameters: + type: string + description: The kernel parameters to use to boot the nodes. + example: "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}" + maxLength: 4096 + BootSetEtag: + type: string + description: This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with. + example: "1cc4eef4f407bd8a62d7d66ee4b9e9c8" + maxLength: 65536 + BootSetName: + type: string + description: | + The Boot Set name. + + * Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_). + * Boot Set names must begin and end with a letter or digit. + example: "compute" + minLength: 1 + maxLength: 127 + pattern: '^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$' + writeOnly: true + BootSetRootfsProvider: + type: string + description: The root file system provider. + example: "cpss3" + minLength: 1 + maxLength: 511 + BootSetRootfsProviderPassthrough: + type: string + description: | + The root file system provider passthrough. + These are additional kernel parameters that will be appended to + the 'rootfs=' kernel parameter + example: "dvs:api-gw-service-nmn.local:300:nmn0" + maxLength: 4096 + BootSetType: + type: string + description: | + The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute. + example: "s3" + minLength: 1 + maxLength: 127 + CfsConfiguration: + type: string + description: The name of configuration to be applied. + example: "compute-23.4.0" + maxLength: 127 + EmptyString: + type: string + description: An empty string value. + enum: [ '' ] + maxLength: 0 + EmptyStringNullable: + type: string + description: An empty string value. + enum: [ '' ] + nullable: true + maxLength: 0 + EnableCfs: + type: boolean + description: | + Whether to enable the Configuration Framework Service (CFS). + default: true + HardwareComponentName: + type: string + description: Hardware component name (xname). + example: "x3001c0s39b0n0" + minLength: 1 + maxLength: 127 Healthz: description: Service health status type: object @@ -107,34 +209,73 @@ components: apiStatus: type: string additionalProperties: false - Version: - description: Version data + Link: + description: Link to other resources type: object properties: - major: - type: integer - minor: - type: integer - patch: - type: integer - links: - type: array - items: - $ref: '#/components/schemas/Link' + href: + type: string + rel: + type: string additionalProperties: false + LinkList: + description: List of links to other resources + type: array + items: + $ref: '#/components/schemas/Link' + LinkListReadOnly: + description: List of links to other resources + type: array + readOnly: true + items: + $ref: '#/components/schemas/Link' + NodeList: + type: array + description: | + A node list that is required to have at least one node. + Nodes must be specified by component name (xname). NIDs are not supported. + If the reject_nids option is enabled, then Session Template creation or validation will fail if + any of the boot sets contain a NodeList that appears to contain a NID. + minItems: 1 + maxItems: 65535 + example: ["x3000c0s19b1n0", "x3000c0s19b2n0"] + items: + $ref: '#/components/schemas/HardwareComponentName' + NodeGroupList: + type: array + description: Node group list. Allows actions against associated nodes by logical groupings. + minItems: 1 + maxItems: 4095 + items: + type: string + description: Name of a user-defined logical group in the Hardware State Manager (HSM). + minLength: 1 + maxLength: 127 + NodeRoleList: + type: array + description: Node role list. Allows actions against nodes with associated roles. + minItems: 1 + maxItems: 1023 + example: ["Compute", "Application"] + items: + type: string + description: Name of a role that is defined in the Hardware State Manager (HSM). + example: "Compute" + minLength: 1 + maxLength: 127 ProblemDetails: description: An error response for RFC 7807 problem details. type: object properties: type: - description: + description: | Relative URI reference to the type of problem which includes human readable documentation. type: string format: uri default: "about:blank" title: - description: + description: | Short, human-readable summary of the problem, should not change by occurrence. type: string @@ -143,599 +284,190 @@ components: type: integer example: 400 instance: - description: A relative URI reference that identifies the specific - occurrence of the problem + description: | + A relative URI reference that identifies the specific occurrence of + the problem format: uri type: string detail: - description: + description: | A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information. type: string additionalProperties: false - Link: - description: Link to other resources - type: object - properties: - rel: - type: string - href: - type: string - additionalProperties: false - # V1 - V1CfsParameters: - type: object - description: | - CFS Parameters is the collection of parameters that are passed to the Configuration - Framework Service when configuration is enabled. - properties: - clone_url: - type: string - description: | - The clone url for the repository providing the configuration. (DEPRECATED) - branch: - type: string - description: | - The name of the branch containing the configuration that you want to - apply to the nodes. Mutually exclusive with commit. (DEPRECATED) - commit: - type: string - description: | - The commit id of the configuration that you want to - apply to the nodes. Mutually exclusive with branch. (DEPRECATED) - playbook: - type: string - description: | - The name of the playbook to run for configuration. The file path must be specified - relative to the base directory of the config repo. (DEPRECATED) - configuration: - type: string - description: | - The name of configuration to be applied. - additionalProperties: false - V1GenericMetadata: - type: object - description: | - The status metadata - properties: - start_time: - type: string - description: | - The start time - example: "2020-04-24T12:00" - stop_time: - type: string - description: | - The stop time - example: "2020-04-24T12:00" - complete: - type: boolean - description: | - Is the object's status complete - example: true - in_progress: - type: boolean - description: | - Is the object still doing something - example: false - error_count: - type: integer - description: | - How many errors were encountered - example: 0 - additionalProperties: false - V1NodeList: - type: array - items: - type: string - example: ["x3000c0s19b1n0", "x3000c0s19b2n0"] - V1PhaseCategoryStatus: - type: object - description: | - A list of the nodes in a given category within a phase. - - ## Link Relationships - - * self : The session object - - properties: - name: - type: string - description: | - Name of the Phase Category - example: "Succeeded" - pattern: '^(?i)not_started|in_progress|succeeded|failed|excluded$' - node_list: - $ref: '#/components/schemas/V1NodeList' - V1PhaseStatus: - type: object - description: | - The phase's status. It is a list of all of the nodes in the phase and - what category those nodes fall into within the phase. - - ## Link Relationships - - * self : The session object - - properties: - name: - type: string - description: | - Name of the Phase - example: "Boot" - pattern: '^(?i)boot|configure|shutdown$' - metadata: - $ref: '#/components/schemas/V1GenericMetadata' - categories: - type: array - items: - $ref: '#/components/schemas/V1PhaseCategoryStatus' - errors: - $ref: '#/components/schemas/V1NodeErrorsList' - V1BootSetStatus: - type: object + SessionLimit: + type: string description: | - The status for a Boot Set. It as a list of the phase statuses for the Boot Set. - - ## Link Relationships - - * self : The session object - * phase : A phase of the boot set + A comma-separated list of nodes, groups, or roles to which the Session + will be limited. Components are treated as OR operations unless + preceded by "&" for AND or "!" for NOT. - properties: - name: - type: string - minLength: 1 - description: Name of the Boot Set - example: "Boot-Set" - session: - type: string - description: Session ID - example: "Session-ID" - metadata: - $ref: '#/components/schemas/V1GenericMetadata' - phases: - type: array - items: - $ref: '#/components/schemas/V1PhaseStatus' - links: - type: array - items: - $ref: '#/components/schemas/Link' - V1SessionStatus: - type: object - description: | - The status for a Boot Session. It is a list of all of the Boot Set Statuses in the session. - ## Link Relationships + Alternatively, the limit can be set to "*", which means no limit. - * self : The session object - * boot sets: URL to access the Boot Set status + An empty string or null value is the same as specifying no limit. - properties: - metadata: - $ref: '#/components/schemas/V1GenericMetadata' - boot_sets: - description: | - The boot sets in the Session - type: array - items: - type: string - minItems: 1 - id: - type: string - description: Session ID - links: - type: array - items: - $ref: '#/components/schemas/Link' - V1BootSet: + If the reject_nids option is enabled, then Session creation will fail if its + limit appears to contain a NID value. + maxLength: 524288 + nullable: true + default: "" + SessionTemplateDescription: + type: string + description: An optional description for the Session Template. + minLength: 1 + maxLength: 1023 + SessionTemplateName: + type: string description: | - A boot set defines a collection of nodes and the information about the - boot artifacts and parameters to be sent to each node over the specified - network to enable these nodes to boot. When multiple boot sets are used - in a session template, the boot_ordinal and shutdown_ordinal indicate - the order in which boot sets need to be acted upon. Boot sets sharing - the same ordinal number will be addressed at the same time. - type: object - properties: - name: - type: string - description: | - The Boot Set name. - boot_ordinal: - type: integer - minimum: 0 - description: | - The boot ordinal. This will establish the order for boot set operations. - Boot sets boot in order from the lowest to highest boot_ordinal. - shutdown_ordinal: - type: integer - minimum: 0 - description: | - The shutdown ordinal. This will establish the order for boot set - shutdown operations. Sets shutdown from low to high shutdown_ordinal. - path: - type: string - description: | - A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc. - It will be processed based on the type attribute. - type: - type: string - description: | - The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute. - etag: - type: string - description: | - This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with. - kernel_parameters: - type: string - description: | - The kernel parameters to use to boot the nodes. - network: - type: string - description: | - The network over which the node will boot from. - Choices: NMN -- Node Management Network - pattern: '^(?i)nmn$' - node_list: - type: array - items: - type: string - minItems: 1 - description: | - The node list. This is an explicit mapping against hardware xnames. - node_roles_groups: - type: array - items: - type: string - minItems: 1 - description: | - The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD. - node_groups: - type: array - items: - type: string - minItems: 1 - description: | - The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD. - rootfs_provider: - type: string - description: | - The root file system provider. - rootfs_provider_passthrough: - type: string - description: | - The root file system provider passthrough. - These are additional kernel parameters that will be appended to - the 'rootfs=' kernel parameter - additionalProperties: false - required: [path, type] - V1SessionTemplate: + Name of the Session Template. + + The name must: + * Use only letters, digits, periods (.), dashes (-), and underscores (_). + * Begin and end with a letter or digit. + minLength: 1 + maxLength: 127 + pattern: '^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$' + example: "cle-1.0.0" + TenantName: + type: string + description: Name of a tenant. Used for multi-tenancy. An empty string means no tenant. + example: "vcluster-my-tenant1" + maxLength: 127 + Version: + description: Version data type: object - description: | - A Session Template object represents a collection of resources and metadata. - A session template is used to create a Session which when combined with an - action (i.e. boot, reconfigure, reboot, shutdown) will create a Kubernetes BOA job - to complete the required tasks for the operation. - - A Session Template can be created from a JSON structure. It will return - a SessionTemplate name if successful. - This name is required when creating a Session. - - ## Link Relationships - - * self : The session object properties: - name: - type: string - description: Name of the SessionTemplate. The length of the name is restricted to 45 characters. - example: "cle-1.0.0" - minLength: 1 - pattern: "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" - description: - type: string - description: | - An optional description for the session template. - cfs_url: + major: type: string - description: | - The url for the repository providing the configuration. DEPRECATED - cfs_branch: + pattern: '^(0|[1-9][0-9]*)$' + minor: type: string - description: | - The name of the branch containing the configuration that you want to - apply to the nodes. DEPRECATED. - enable_cfs: - type: boolean - description: | - Whether to enable the Configuration Framework Service (CFS). - Choices: true/false - default: true - cfs: - $ref: '#/components/schemas/V1CfsParameters' - partition: + pattern: '^(0|[1-9][0-9]*)$' + patch: type: string - description: | - The machine partition to operate on. - boot_sets: - type: object - additionalProperties: - $ref: '#/components/schemas/V1BootSet' + pattern: '^(0|[1-9][0-9]*)$' links: - type: array - readOnly: true - items: - $ref: '#/components/schemas/Link' - required: [name] + $ref: '#/components/schemas/LinkList' additionalProperties: false - V1Session: - description: | - A Session object - - ## Link Relationships - - * self : The session object - type: object - properties: - operation: - type: string - description: > - A Session represents an operation on a SessionTemplate. - The creation of a session effectively results in the creation - of a Kubernetes Boot Orchestration Agent (BOA) job to perform the - duties required to complete the operation. - - Operation -- An operation to perform on nodes in this session. - Boot Boot nodes that are off. - - Configure Reconfigure the nodes using the Configuration Framework - Service (CFS). - - Reboot Gracefully power down nodes that are on and then power - them back up. - - Shutdown Gracefully power down nodes that are on. - - pattern: '^(?i)boot|configure|reboot|shutdown$' - templateUuid: - type: string - description: DEPRECATED - use templateName - example: "my-session-template" - format: string - templateName: - type: string - description: The name of the Session Template - example: "my-session-template" - format: string - job: - type: string - maxLength: 64 - readOnly: true - description: > - The identity of the Kubernetes job that is created to handle the session. - example: "boa-07877de1-09bb-4ca8-a4e5-943b1262dbf0" - limit: - type: string - description: > - A comma-separated of nodes, groups, or roles to which the session - will be limited. Components are treated as OR operations unless - preceded by "&" for AND or "!" for NOT. - links: - type: array - readOnly: true - items: - $ref: '#/components/schemas/Link' - required: [operation] - additionalProperties: false - V1NodeChangeList: - type: object - description: | - The information used to update the status of a node list. It moves nodes from - one category to another within a phase. - properties: - phase: - type: string - example: "Boot" - source: - type: string - example: "in_progress" - destination: - type: string - example: "Succeeded" - node_list: - $ref: '#/components/schemas/V1NodeList' - additionalProperties: false - required: [phase, source, destination, node_list] - V1NodeErrorsList: - type: object - description: | - Categorizing nodes into failures by the type of error they have. - This is an additive characterization. Nodes will be added to existing errors. - This does not overwrite previously existing errors. - additionalProperties: - $ref: '#/components/schemas/V1NodeList' - V1UpdateRequestNodeChangeList: - description: | - This is the payload sent during an update request. It contains - updates to which categories nodes are in. - type: array - items: - type: object - properties: - update_type: - description: The type of update data - pattern: "NodeChangeList" - type: string - phase: - description: | - The phase that this data belongs to. If blank, it belongs to - the Boot Set itself, which only applies to the GenericMetadata type. - pattern: "(?i)shutdown|boot|configure" - type: string - data: - $ref: '#/components/schemas/V1NodeChangeList' - V1UpdateRequestNodeErrorsList: - description: | - This is the payload sent during an update request. It contains - updates to which errors have occurred and which nodes encountered those errors - type: array - items: - type: object - properties: - update_type: - description: The type of update data - pattern: "NodeErrorsList" - type: string - phase: - description: | - The phase that this data belongs to. If blank, it belongs to - the Boot Set itself, which only applies to the GenericMetadata type. - pattern: "(?i)shutdown|boot|configure" - type: string - data: - $ref: '#/components/schemas/V1NodeErrorsList' - V1UpdateRequestGenericMetadata: - description: | - This is the payload sent during an update request. It contains - updates to metadata, specifically start and stop times - type: array - items: - type: object - properties: - update_type: - description: The type of update data - pattern: "GenericMetadata" - type: string - phase: - description: | - The phase that this data belongs to. If the phase is boot_set, it belongs to - the Boot Set itself, which only applies to the GenericMetadata type. - pattern: '(?i)shutdown|boot|configure|boot_set' - type: string - data: - $ref: '#/components/schemas/V1GenericMetadata' # V2 + V2TenantName: + type: string + description: | + Name of the tenant that owns this resource. Only used in environments + with multi-tenancy enabled. An empty string or null value means the resource + is not owned by a tenant. The absence of this field from a resource indicates + the same. + nullable: true + readOnly: true + maxLength: 127 V2CfsParameters: type: object description: | - CFS Parameters is the collection of parameters that are passed to the Configuration + This is the collection of parameters that are passed to the Configuration Framework Service when configuration is enabled. Can be set as the global value for - a Session Template, or individually within a boot set. + a Session Template, or individually within a Boot Set. properties: configuration: - type: string - description: | - The name of configuration to be applied. + $ref: '#/components/schemas/CfsConfiguration' additionalProperties: false V2SessionTemplate: type: object description: | A Session Template object represents a collection of resources and metadata. - A session template is used to create a Session which applies the data to - group of components. - - A Session Template can be created from a JSON structure. It will return - a SessionTemplate name if successful. - This name is required when creating a Session. + A Session Template is used to create a Session which applies the data to + group of Components. ## Link Relationships - * self : The session object + * self : The Session Template object properties: name: type: string - description: Name of the SessionTemplate. The length of the name is restricted to 45 characters. - example: "cle-1.0.0" - # These validation parameters are restricted by Kubernetes naming conventions. minLength: 1 - maxLength: 45 - pattern: "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" + maxLength: 127 + pattern: '^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$' readOnly: true - description: - type: string description: | - An optional description for the session template. + Name of the Session Template. + + Names must: + * Use only letters, digits, periods (.), dashes (-), and underscores (_). + * Begin and end with a letter or digit. + example: "cle-1.0.0" + tenant: + $ref: '#/components/schemas/V2TenantName' + description: + $ref: '#/components/schemas/SessionTemplateDescription' enable_cfs: - type: boolean - description: | - Whether to enable the Configuration Framework Service (CFS). - Choices: true/false - default: true + $ref: '#/components/schemas/EnableCfs' cfs: $ref: '#/components/schemas/V2CfsParameters' boot_sets: type: object + description: | + Mapping from Boot Set names to Boot Sets. + + * Boot Set names must be 1-127 characters in length. + * Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_). + * Boot Set names must begin and end with a letter or digit. + minProperties: 1 + maxProperties: 127 additionalProperties: $ref: '#/components/schemas/V2BootSet' links: - type: array - readOnly: true - items: - $ref: '#/components/schemas/Link' + $ref: '#/components/schemas/LinkListReadOnly' additionalProperties: false - V2SessionTemplateArray: - description: An array of session templates. - type: array - items: - $ref: '#/components/schemas/V2SessionTemplate' + required: [ boot_sets ] V2SessionTemplateValidation: description: | Message describing errors or incompleteness in a Session Template. type: string + V2SessionName: + type: string + description: | + Name of the Session. + + The name must: + * Use only letters, digits, periods (.), dashes (-), and underscores (_). + * Begin and end with a letter or digit. + minLength: 1 + maxLength: 127 + pattern: '^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$' + example: "session-20190728032600" + V2SessionOperation: + type: string + enum: ['boot', 'reboot', 'shutdown'] + description: | + A Session represents a desired state that is being applied to a group + of Components. Sessions run until all Components it manages have + either been disabled due to completion, or until all Components are + managed by other newer Sessions. + + Operation -- An operation to perform on Components in this Session. + Boot Applies the Template to the Components and boots/reboots if necessary. + Reboot Applies the Template to the Components; guarantees a reboot. + Shutdown Power down Components that are on. V2SessionCreate: description: | A Session Creation object. A UUID name is generated if a name is not provided. The limit parameter is - required if the session_limit_required option is true. If the reject_nids option is enabled, then Session - creation will fail if a Session limit appears to contain a NID value. + required if the session_limit_required option is true. type: object properties: name: - type: string - description: | - Name of the session. - - The name must: - * Use only letters, digits, periods (.), dashes (-), and underscores (_). - * Begin and end with a letter or digit. - example: "session-20190728032600" - minLength: 1 - maxLength: 127 - pattern: '^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$' + $ref: '#/components/schemas/V2SessionName' operation: - type: string - enum: ['boot', 'reboot', 'shutdown'] - description: > - A Session represents a desired state that is being applied to a group - of components. Sessions run until all components it manages have - either been disabled due to completion, or until all components are - managed by other newer sessions. - - Operation -- An operation to perform on nodes in this session. - Boot Applies the template to the components and boots/reboots if necessary. - Reboot Applies the template to the components guarantees a reboot. - Shutdown Power down nodes that are on. + $ref: '#/components/schemas/V2SessionOperation' template_name: - type: string - description: The name of the Session Template - example: "my-session-template" - format: string + $ref: '#/components/schemas/SessionTemplateName' limit: - type: string - description: > - A comma-separated of nodes, groups, or roles to which the session - will be limited. Components are treated as OR operations unless - preceded by "&" for AND or "!" for NOT. - - Alternatively, the limit can be set to "*", which means no limit. - - The limit parameter is required if the session_limit_required option is true. + $ref: '#/components/schemas/SessionLimit' stage: type: boolean - description: > - Set to stage a session which will not immediately change the state of any components. - The "applystaged" endpoint can be called at a later time to trigger the start of this session. + description: | + Set to stage a Session which will not immediately change the state of any Components. + The "applystaged" endpoint can be called at a later time to trigger the start of this Session. default: false include_disabled: type: boolean @@ -744,142 +476,120 @@ components: default: false required: [operation, template_name] additionalProperties: false + V2SessionStatusLabel: + type: string + enum: ['pending', 'running', 'complete'] + description: The status of a Session. + V2SessionStartTime: + type: string + description: When the Session was created. + maxLength: 127 + V2SessionEndTime: + type: string + nullable: true + description: When the Session was completed. A null value means the Session has not ended. + maxLength: 127 V2SessionStatus: type: object description: | - Information on the status of a session. + Information on the status of a Session. properties: start_time: - type: string - description: | - When the session was created. + $ref: '#/components/schemas/V2SessionStartTime' end_time: - type: string - description: | - When the session completed. + $ref: '#/components/schemas/V2SessionEndTime' status: - type: string - enum: ['pending', 'running', 'complete'] - description: | - The status of a session. + $ref: '#/components/schemas/V2SessionStatusLabel' error: type: string + nullable: true description: | - Error which prevented the session from running + Error which prevented the Session from running. + A null value means the Session has not encountered an error. + maxLength: 65536 additionalProperties: false V2BootSet: description: | - A boot set is a collection of nodes defined by an explicit list, their functional + A Boot Set is a collection of nodes defined by an explicit list, their functional role, and their logical groupings. This collection of nodes is associated with one set of boot artifacts and optional additional records for configuration and root filesystem provisioning. + + A boot set requires at least one of the following fields to be specified: + node_list, node_roles_groups, node_groups + + If specified, the name field must match the key mapping to this boot set in the + boot_sets field of the containing V2SessionTemplate. type: object properties: name: - type: string - description: | - The Boot Set name. + $ref: '#/components/schemas/BootSetName' path: - type: string - description: | - A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc. - It will be processed based on the type attribute. + $ref: '#/components/schemas/BootManifestPath' cfs: $ref: '#/components/schemas/V2CfsParameters' type: - type: string - description: | - The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute. + $ref: '#/components/schemas/BootSetType' etag: - type: string - description: | - This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with. + $ref: '#/components/schemas/BootSetEtag' kernel_parameters: - type: string - description: | - The kernel parameters to use to boot the nodes. + $ref: '#/components/schemas/BootKernelParameters' node_list: - type: array - items: - type: string - minItems: 1 - description: | - The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if - it contains a boot set with a node list that appears to contain a NID. + $ref: '#/components/schemas/NodeList' node_roles_groups: - type: array - items: - type: string - minItems: 1 - description: | - The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD. + $ref: '#/components/schemas/NodeRoleList' node_groups: - type: array - items: - type: string - minItems: 1 - description: | - The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD. - rootfs_provider: + $ref: '#/components/schemas/NodeGroupList' + arch: type: string - description: | - The root file system provider. + description: > + The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value + should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown + are treated as being of type X86. + default: X86 + enum: [X86, ARM, Other, Unknown] + rootfs_provider: + $ref: '#/components/schemas/BootSetRootfsProvider' rootfs_provider_passthrough: - type: string - description: | - The root file system provider passthrough. - These are additional kernel parameters that will be appended to - the 'rootfs=' kernel parameter + $ref: '#/components/schemas/BootSetRootfsProviderPassthrough' additionalProperties: false required: [path, type] + V2SessionTemplateArray: + description: An array of Session Templates. + type: array + items: + $ref: '#/components/schemas/V2SessionTemplate' V2Session: description: | A Session object ## Link Relationships - * self : The session object + * self : The Session object type: object properties: name: - type: string - description: > - Name of the session. + $ref: '#/components/schemas/V2SessionName' + tenant: + $ref: '#/components/schemas/V2TenantName' operation: - type: string - enum: ['boot', 'reboot', 'shutdown'] - description: > - A Session represents a desired state that is being applied to a group - of components. Sessions run until all components it manages have - either been disabled due to completion, or until all components are - managed by other newer sessions. - - Operation -- An operation to perform on nodes in this session. - Boot Applies the template to the components and boots/reboots if necessary. - Reboot Applies the template to the components guarantees a reboot. - Shutdown Power down nodes that are on. + $ref: '#/components/schemas/V2SessionOperation' template_name: - type: string - description: The name of the Session Template - example: "my-session-template" - format: string + $ref: '#/components/schemas/SessionTemplateName' limit: - type: string - description: > - A comma-separated of nodes, groups, or roles to which the session - will be limited. Components are treated as OR operations unless - preceded by "&" for AND or "!" for NOT. + $ref: '#/components/schemas/SessionLimit' stage: type: boolean - description: > - Set to stage a session which will not immediately change the state of any components. - The "applystaged" endpoint can be called at a later time to trigger the start of this session. + description: | + Set to stage a Session which will not immediately change the state of any Components. + The "applystaged" endpoint can be called at a later time to trigger the start of this Session. components: type: string - description: > + description: | A comma-separated list of nodes, representing the initial list of nodes - the session should operate against. The list will remain even if - other sessions have taken over management of the nodes. + the Session should operate against. The list will remain even if + other Sessions have taken over management of the nodes. + maxLength: 524288 include_disabled: type: boolean description: | @@ -887,83 +597,96 @@ components: status: $ref: '#/components/schemas/V2SessionStatus' additionalProperties: false + required: [name, operation, template_name] + V2SessionUpdate: + description: | + A Session update object + + ## Link Relationships + + * self : The Session object + type: object + properties: + components: + type: string + description: | + A comma-separated list of nodes, representing the initial list of nodes + the Session should operate against. The list will remain even if + other Sessions have taken over management of the nodes. + maxLength: 524288 + status: + $ref: '#/components/schemas/V2SessionStatus' + additionalProperties: false V2SessionArray: - description: An array of sessions. + description: An array of Sessions. type: array items: $ref: '#/components/schemas/V2Session' V2SessionExtendedStatusPhases: type: object description: | - Detailed information on the phases of a session. + Detailed information on the phases of a Session. properties: percent_complete: - type: number + type: number description: | - The percent of components currently in a completed/stable state + The percent of Components currently in a completed/stable state percent_powering_on: - type: number + type: number description: | - The percent of components currently in the powering-on phase + The percent of Components currently in the powering-on phase percent_powering_off: - type: number + type: number description: | - The percent of components currently in the powering-off phase + The percent of Components currently in the powering-off phase percent_configuring: - type: number + type: number description: | - The percent of components currently in the configuring phase + The percent of Components currently in the configuring phase additionalProperties: false V2SessionExtendedStatusTiming: type: object description: | - Detailed information on the timing of a session. + Detailed information on the timing of a Session. properties: start_time: - type: string - description: | - When the session was created. + $ref: '#/components/schemas/V2SessionStartTime' end_time: - type: string - description: | - When the session completed. + $ref: '#/components/schemas/V2SessionEndTime' duration: type: string description: | - The current duration of the on-going session or final duration of the completed session. + The current duration of the ongoing Session or final duration of the completed Session. additionalProperties: false V2SessionExtendedStatus: type: object description: | - Detailed information on the status of a session. + Detailed information on the status of a Session. properties: status: - type: string - enum: ['pending', 'running', 'complete'] - description: | - The status of a session. + $ref: '#/components/schemas/V2SessionStatusLabel' managed_components_count: type: integer description: | - The count of components currently managed by this session + The count of Components currently managed by this Session phases: $ref: '#/components/schemas/V2SessionExtendedStatusPhases' percent_successful: - type: number + type: number description: | - The percent of components currently in a successful state + The percent of Components currently in a successful state percent_failed: - type: number + type: number description: | - The percent of components currently in a failed state + The percent of Components currently in a failed state percent_staged: - type: number + type: number description: | - The percent of components currently still staged for this session + The percent of Components currently still staged for this Session error_summary: - type: object + type: object description: | - A summary of the errors currently listed by all components + A summary of the errors currently listed by all Components timing: $ref: '#/components/schemas/V2SessionExtendedStatusTiming' additionalProperties: false @@ -973,75 +696,75 @@ components: type: object properties: kernel: - type: string - description: An md5sum hash of the kernel ID + $ref: '#/components/schemas/BootKernelPath' kernel_parameters: - type: string - description: Kernel parameters + $ref: '#/components/schemas/BootKernelParameters' initrd: - type: string - description: Initrd ID + $ref: '#/components/schemas/BootInitrdPath' additionalProperties: false + V2ComponentBssToken: + type: string + description: | + A token received from the node identifying the boot artifacts. + For BOS use-only, users should not set this field. It will be overwritten. + maxLength: 65535 + V2ComponentId: + type: string + description: The Component's ID. (e.g. xname for hardware Components) + minLength: 1 + maxLength: 127 + V2ComponentIdList: + description: A list of Component IDs (xnames) + type: array + maxItems: 32768 + items: + $ref: '#/components/schemas/V2ComponentId' + V2ComponentLastUpdated: + type: string + description: The date/time when the state was last updated in RFC 3339 format. + example: '2019-07-28T03:26:00Z' + format: date-time + readOnly: true V2ComponentActualState: description: | - The desired boot artifacts and configuration for a component + The actual boot artifacts and configuration for a Component type: object properties: boot_artifacts: $ref: '#/components/schemas/V2BootArtifacts' bss_token: - type: string - description: > - A token received from the node identifying the boot artifacts. - For BOS use-only, users should not set this field. It will be overwritten. + $ref: '#/components/schemas/V2ComponentBssToken' last_updated: - type: string - description: The date/time when the state was last updated in RFC 3339 format. - example: '2019-07-28T03:26:00Z' - format: date-time - readOnly: true + $ref: '#/components/schemas/V2ComponentLastUpdated' additionalProperties: false V2ComponentDesiredState: description: | - The desired boot artifacts and configuration for a component + The desired boot artifacts and configuration for a Component type: object properties: boot_artifacts: $ref: '#/components/schemas/V2BootArtifacts' configuration: - type: string - description: A CFS configuration ID. + $ref: '#/components/schemas/CfsConfiguration' bss_token: - type: string - description: > - A token received from BSS identifying the boot artifacts. - For BOS use-only, users should not set this field. It will be overwritten. + $ref: '#/components/schemas/V2ComponentBssToken' last_updated: - type: string - description: The date/time when the state was last updated in RFC 3339 format. - example: '2019-07-28T03:26:00Z' - format: date-time - readOnly: true + $ref: '#/components/schemas/V2ComponentLastUpdated' additionalProperties: false V2ComponentStagedState: description: | - The desired boot artifacts and configuration for a component + The staged boot artifacts and configuration for a Component. Optionally, a Session + may be set which can be triggered at a later time against this Component. type: object properties: boot_artifacts: $ref: '#/components/schemas/V2BootArtifacts' configuration: - type: string - description: A CFS configuration ID. + $ref: '#/components/schemas/CfsConfiguration' session: type: string - description: A session which can be triggered at a later time against this component. last_updated: - type: string - description: The date/time when the state was last updated in RFC 3339 format. - example: '2019-07-28T03:26:00Z' - format: date-time - readOnly: true + $ref: '#/components/schemas/V2ComponentLastUpdated' additionalProperties: false V2ComponentLastAction: description: | @@ -1049,14 +772,11 @@ components: type: object properties: last_updated: - type: string - description: The date/time when the state was last updated in RFC 3339 format. - example: '2019-07-28T03:26:00Z' - format: date-time - readOnly: true + $ref: '#/components/schemas/V2ComponentLastUpdated' action: type: string - description: A description of the most recent operator/action to impact the component. + description: A description of the most recent operator/action to impact the Component. + maxLength: 1024 failed: type: boolean description: Denotes if the last action failed to accomplish its task @@ -1069,36 +789,103 @@ components: power_on_attempts: type: integer description: How many attempts have been made to power-on since the last time the node was in the desired state. + minimum: 0 + maximum: 1048576 power_off_graceful_attempts: type: integer description: How many attempts have been made to power-off gracefully since the last time the node was in the desired state. + minimum: 0 + maximum: 1048576 power_off_forceful_attempts: type: integer description: How many attempts have been made to power-off forcefully since the last time the node was in the desired state. + minimum: 0 + maximum: 1048576 additionalProperties: false + V2ComponentPhase: + type: string + description: The current phase of the Component in the boot process. + maxLength: 128 V2ComponentStatus: - description: Status information for the component + description: Status information for the Component type: object properties: phase: - type: string - description: The current phase of the component in the boot process. + $ref: '#/components/schemas/V2ComponentPhase' status: type: string - description: The current status of the component. More detailed than phase. + description: The current status of the Component. More detailed than phase. readOnly: true status_override: type: string description: If set, this will override the status value. + maxLength: 65536 additionalProperties: false V2Component: description: | - The current and desired artifacts state for a component. + The current and desired artifacts state for a Component, and + the Session responsible for the Component's current state. type: object properties: id: + $ref: '#/components/schemas/V2ComponentId' + actual_state: + $ref: '#/components/schemas/V2ComponentActualState' + desired_state: + $ref: '#/components/schemas/V2ComponentDesiredState' + staged_state: + $ref: '#/components/schemas/V2ComponentStagedState' + last_action: + $ref: '#/components/schemas/V2ComponentLastAction' + event_stats: + $ref: '#/components/schemas/V2ComponentEventStats' + status: + $ref: '#/components/schemas/V2ComponentStatus' + enabled: + type: boolean + description: A flag indicating if actions should be taken for this Component. + error: type: string - description: The component's id. e.g. xname for hardware components + description: A description of the most recent error to impact the Component. + maxLength: 65536 + session: + type: string + retry_policy: + type: integer + description: | + The maximum number attempts per action when actions fail. + Defaults to the global default_retry_policy if not set + example: 1 + minimum: 0 + maximum: 1048576 + additionalProperties: false + minProperties: 1 + V2ComponentCliUpdate: + description: | + Component attributes that can be updated using the CLI + type: object + properties: + enabled: + type: boolean + description: A flag indicating if actions should be taken for this Component. + retry_policy: + type: integer + description: | + The maximum number attempts per action when actions fail. + Defaults to the global default_retry_policy if not set + example: 1 + minimum: 0 + maximum: 1048576 + additionalProperties: false + minProperties: 1 + V2ComponentWithId: + description: | + The current and desired artifacts state for a Component, and + the Session responsible for the Component's current state. + type: object + properties: + id: + $ref: '#/components/schemas/V2ComponentId' actual_state: $ref: '#/components/schemas/V2ComponentActualState' desired_state: @@ -1113,124 +900,158 @@ components: $ref: '#/components/schemas/V2ComponentStatus' enabled: type: boolean - description: A flag indicating if actions should be taken for this component. + description: A flag indicating if actions should be taken for this Component. error: type: string - description: A description of the most recent error to impact the component. + description: A description of the most recent error to impact the Component. + maxLength: 65536 session: type: string - description: The session responsible for the component's current state retry_policy: type: integer description: | The maximum number attempts per action when actions fail. Defaults to the global default_retry_policy if not set example: 1 + minimum: 0 + maximum: 1048576 additionalProperties: false + required: [ id ] V2ComponentArray: - description: An array of component states. + description: An array of Component states. type: array items: $ref: '#/components/schemas/V2Component' + V2ComponentArrayWithIds: + description: An array of Component states with associated Ids. + type: array + items: + $ref: '#/components/schemas/V2ComponentWithId' V2ComponentsFilter: - description: Information for patching multiple components. + description: | + Information for patching multiple Components by listing their IDs or + session. Only one of the two may be specified. type: object properties: ids: type: string - description: A comma-separated list of component IDs + description: A comma-separated list of Component IDs. + minLength: 1 + maxLength: 65535 session: - type: string - description: A session name. All components part of this session will be patched. + $ref: '#/components/schemas/V2SessionName' + minProperties: 1 + maxProperties: 1 + additionalProperties: false V2ComponentsUpdate: - description: Information for patching multiple components. + description: Information for patching multiple Components. type: object properties: patch: - $ref: '#/components/schemas/V2Component' + $ref: '#/components/schemas/V2ComponentCliUpdate' filters: $ref: '#/components/schemas/V2ComponentsFilter' required: [patch, filters] + additionalProperties: false V2ApplyStagedComponents: description: | - A list of components that should have their staged session applied. + A list of Components that should have their staged Session applied. type: object properties: xnames: - description: The list of component xnames - type: array - items: - type: string + $ref: '#/components/schemas/V2ComponentIdList' additionalProperties: false V2ApplyStagedStatus: description: | - A list of components that should have their staged session applied. + Mapping from Component staged Session statuses to Components with that status. type: object properties: succeeded: - description: The list of component xnames - type: array - items: - type: string + $ref: '#/components/schemas/V2ComponentIdList' failed: - description: The list of component xnames - type: array - items: - type: string + $ref: '#/components/schemas/V2ComponentIdList' ignored: - description: The list of component xnames - type: array - items: - type: string + $ref: '#/components/schemas/V2ComponentIdList' additionalProperties: false V2Options: description: | - Options for the boot orchestration service. + Options for the Boot Orchestration Service. type: object properties: cleanup_completed_session_ttl: type: string - description: Delete complete sessions that are older than cleanup_completed_session_ttl (in hours). 0h disables cleanup behavior. + description: | + Delete complete Sessions that are older than cleanup_completed_session_ttl (in minutes, hours, days, or weeks). + 0 disables cleanup behavior. + example: "3d" + pattern: '^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$' + minLength: 1 + # This allows for over 10 years using the smallest units (minutes) + maxLength: 8 clear_stage: type: boolean - description: Allows components staged information to be cleared when the requested staging action has been started. Defaults to false. + description: Allows a Component's staged information to be cleared when the requested staging action has been started. Defaults to false. component_actual_state_ttl: type: string - description: The maximum amount of time a component's actual state is considered valid (in hours). 0h disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically. + description: | + The maximum amount of time a Component's actual state is considered valid (in minutes, hours, days, or weeks). + 0 disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically. + example: "6h" + pattern: '^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$' + minLength: 1 + # This allows for over 10 years using the smallest units (minutes) + maxLength: 8 disable_components_on_completion: type: boolean - description: If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS. If false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes. + description: | + If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS. + If false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes. discovery_frequency: type: integer - description: How frequently the BOS discovery agent syncs new components from HSM. (in seconds) + description: How frequently the BOS discovery agent syncs new Components from HSM (in seconds) + minimum: 0 + # A little over a year + maximum: 33554432 logging_level: type: string description: The logging level for all BOS services + pattern: '^([dD][eE][bB][uU][gG]|[iI][nN][fF][oO]|[wW][aA][rR][nN][iI][nN][gG]|[eE][rR][rR][oO][rR]|[cC][rR][iI][tT][iI][cC][aA][lL])$' max_boot_wait_time: type: integer description: How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds) + minimum: 0 + # Over 12 days + maximum: 1048576 max_power_on_wait_time: type: integer description: How long BOS will wait for a node to power on before calling power on again (in seconds) + minimum: 0 + # Over 12 days + maximum: 1048576 max_power_off_wait_time: type: integer description: How long BOS will wait for a node to power off before forcefully powering off (in seconds) + minimum: 0 + # Over 12 days + maximum: 1048576 polling_frequency: type: integer - description: How frequently the BOS operators check component state for needed actions. (in seconds) + description: How frequently the BOS operators check Component state for needed actions (in seconds) + minimum: 0 + # Over 12 days + maximum: 1048576 default_retry_policy: type: integer description: The default maximum number attempts per node for failed actions. example: 1 + minimum: 0 + maximum: 1048576 max_component_batch_size: type: integer - description: The maximum number of components that a BOS operator will process at once. 0 means no limit. + description: The maximum number of Components that a BOS operator will process at once. 0 means no limit. example: 1000 minimum: 0 maximum: 131071 - session_limit_required: - type: boolean - description: If true, Sessions cannot be created without specifying the limit parameter. reject_nids: type: boolean description: | @@ -1241,38 +1062,49 @@ components: - When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error. This option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started). + session_limit_required: + type: boolean + description: If true, Sessions cannot be created without specifying the limit parameter. additionalProperties: true + minProperties: 1 + maxProperties: 1024 + requestBodies: V2sessionCreateRequest: - description: The information to create a session + description: The information to create a Session required: true content: application/json: schema: $ref: '#/components/schemas/V2SessionCreate' V2componentUpdateRequest: - description: The state for a single component + description: The state for a single Component required: true content: application/json: schema: - $ref: '#/components/schemas/V2Component' + $ref: '#/components/schemas/V2ComponentCliUpdate' V2componentsPutRequest: - description: The state for an array of components + description: The state for an array of Components required: true content: application/json: schema: - $ref: '#/components/schemas/V2ComponentArray' - V2componentsUpdateRequest: - description: The state for an array of components + $ref: '#/components/schemas/V2ComponentArrayWithIds' + V2componentsUpdateRequestArray: + description: An array of Component states + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V2ComponentArrayWithIds' + V2componentsUpdateRequestFilter: + description: A Component state and filter required: true content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/V2ComponentsUpdate' - - $ref: '#/components/schemas/V2ComponentArray' + $ref: '#/components/schemas/V2ComponentsUpdate' V2optionsUpdateRequest: description: Service-wide options required: true @@ -1281,14 +1113,14 @@ components: schema: $ref: '#/components/schemas/V2Options' V2sessionUpdateRequest: - description: The state for a single session + description: The state for a single Session required: true content: application/json: schema: - $ref: '#/components/schemas/V2Session' + $ref: '#/components/schemas/V2SessionUpdate' V2applyStagedRequest: - description: A list of xnames that should have their staged session applied. + description: A list of xnames that should have their staged Session applied. required: true content: application/json: @@ -1296,6 +1128,8 @@ components: $ref: '#/components/schemas/V2ApplyStagedComponents' responses: + ResourceDeleted: + description: The resource was deleted. ServiceHealth: description: Service Health information content: @@ -1313,42 +1147,21 @@ components: application/json: schema: $ref: '#/components/schemas/Version' - ResourceDeleted: - description: The resource was deleted. - # V1 - V1SessionDetails: - description: Session details - content: - application/json: - schema: - $ref: '#/components/schemas/V1Session' - V1SessionStatus: - description: A list of Boot Set Statuses and metadata - content: - application/json: - schema: - $ref: '#/components/schemas/V1SessionStatus' - V1SessionTemplateDetails: - description: Session template details - content: - application/json: - schema: - $ref: '#/components/schemas/V1SessionTemplate' # V2 V2SessionTemplateDetails: - description: Session template details + description: Session Template details content: application/json: schema: $ref: '#/components/schemas/V2SessionTemplate' V2SessionTemplateDetailsArray: - description: Session template details + description: Session Template details array content: application/json: schema: $ref: '#/components/schemas/V2SessionTemplateArray' V2SessionTemplateValidation: - description: Session template validity details + description: Session Template validity details content: application/json: schema: @@ -1360,7 +1173,7 @@ components: schema: $ref: '#/components/schemas/V2Session' V2SessionDetailsArray: - description: Session details + description: Session details array content: application/json: schema: @@ -1372,19 +1185,19 @@ components: schema: $ref: '#/components/schemas/V2SessionExtendedStatus' V2componentDetails: - description: A single component state + description: A single Component state content: application/json: schema: $ref: '#/components/schemas/V2Component' V2componentDetailsArray: - description: A collection of component states + description: A collection of Component states content: application/json: schema: $ref: '#/components/schemas/V2ComponentArray' V2applyStagedResponse: - description: A list of xnames that should have their staged session applied. + description: A list of xnames that should have their staged Session applied. content: application/json: schema: @@ -1396,18 +1209,44 @@ components: schema: $ref: '#/components/schemas/V2Options' # Errors + AlreadyExists: + description: The resource to be created already exists + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' BadRequest: description: Bad Request content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' + BadRequestOrMultiTenancyNotSupported: + description: | + Multi-tenancy is not supported for this request. + If no tenant was specified, then the request was bad for another reason. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + MultiTenancyNotSupported: + description: Multi-tenancy is not supported for this BOS request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' ResourceNotFound: description: The resource was not found. content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' + UpdateConflict: + description: The update was not allowed due to a conflict. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' ServiceUnavailable: description: Service Unavailable content: @@ -1420,472 +1259,88 @@ components: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' -paths: - /: - get: - summary: Get API versions - description: Return list of versions currently running. - tags: - - version - x-openapi-router-controller: bos.server.controllers.base - responses: - 200: - $ref: '#/components/responses/Version' -# See Version guidance is in -# https://connect.us.cray.com/confluence/display/SMA/Shasta+RESTful+Service+Design#ShastaRESTfulServiceDesign-Versioning -# -# Need standard fmt operationId getVersion, postSession, etc. - /v1: - get: - summary: Get API version - tags: - - version - x-openapi-router-controller: bos.server.controllers.v1.base - operationId: v1_get - responses: - 200: - $ref: '#/components/responses/Version' - 500: - $ref: '#/components/responses/BadRequest' - /v1/healthz: - get: - summary: Get service health details - tags: - - healthz - x-openapi-router-controller: bos.server.controllers.v1.healthz - operationId: v1_get_healthz - description: - Get bos health details. - responses: - 200: - $ref: '#/components/responses/ServiceHealth' - 500: - $ref: '#/components/responses/BadRequest' - 503: - $ref: '#/components/responses/ServiceUnavailable' - /v1/sessiontemplate: - post: - summary: Create session template - tags: - - sessiontemplate - x-openapi-router-controller: bos.server.controllers.v1.sessiontemplate - operationId: create_v1_sessiontemplate - description: - Create a new session template. - requestBody: - description: A JSON object for creating a session template - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/V1SessionTemplate' - responses: - 200: - $ref: '#/components/responses/V1SessionTemplateDetails' - 400: - $ref: '#/components/responses/BadRequest' - get: - summary: List session templates - description: | - List all session templates. Session templates are - uniquely identified by the name. - tags: - - sessiontemplate - x-openapi-router-controller: bos.server.controllers.v1.sessiontemplate - operationId: get_v1_sessiontemplates - responses: - 200: - description: A collection of SessionTemplates - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/V1SessionTemplate' - /v1/sessiontemplate/{session_template_id}: - parameters: - - name: session_template_id - in: path - description: Session Template ID - required: true - schema: - type: string - get: - summary: Get session template by id - description: | - Get session template by session_template_id. - The session_template_id corresponds to the *name* - of the session template. - tags: - - sessiontemplate - x-openapi-router-controller: bos.server.controllers.v1.sessiontemplate - operationId: get_v1_sessiontemplate - responses: - 200: - $ref: '#/components/responses/V1SessionTemplateDetails' - 404: - $ref: '#/components/responses/ResourceNotFound' - delete: - summary: Delete a session template - description: Delete a session template. - tags: - - sessiontemplate - x-openapi-router-controller: bos.server.controllers.v1.sessiontemplate - operationId: delete_v1_sessiontemplate - responses: - 204: - $ref: '#/components/responses/ResourceDeleted' - 404: - $ref: '#/components/responses/ResourceNotFound' - /v1/sessiontemplatetemplate: - get: - summary: Get an example session template. - description: | - Returns a skeleton of a session template, which can be - used as a starting point for users creating their own - session templates. - tags: - - sessiontemplate - x-openapi-router-controller: bos.server.controllers.v1.sessiontemplate - operationId: get_v1_sessiontemplatetemplate - responses: - 200: - $ref: '#/components/responses/V1SessionTemplateDetails' - /v1/session: - post: - summary: Create a session + + parameters: + TemplateIdPathParam: + name: session_template_id + in: path + description: Session Template name + required: true + schema: + $ref: '#/components/schemas/SessionTemplateName' + V2ComponentIdPathParam: + name: component_id + in: path + description: Component ID. e.g. xname for hardware Components + required: true + schema: + $ref: '#/components/schemas/V2ComponentId' + V2SessionIdPathParam: + name: session_id + in: path + description: Session ID + required: true + schema: + $ref: '#/components/schemas/V2SessionName' + V2SessionsMaxAgeQueryParam: + name: max_age + schema: + $ref: '#/components/schemas/AgeString' + in: query + description: |- + Only include Sessions younger than the given age. Age is given in the format "1d" or "6h" + V2SessionsMinAgeQueryParam: + name: min_age + schema: + $ref: '#/components/schemas/AgeString' + in: query + description: |- + Only include Sessions older than the given age. Age is given in the format "1d" or "6h" + V2SessionsStatusQueryParam: + name: status + schema: + $ref: '#/components/schemas/V2SessionStatusLabel' + in: query + description: |- + Only include Sessions with the given status. + V2TenantHeaderParam: + name: Cray-Tenant-Name + in: header description: | - The creation of a session performs the operation - specified in the SessionCreateRequest - on the boot set(s) defined in the session template. - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.session - operationId: create_v1_session - requestBody: - description: A JSON object for creating a Session - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/V1Session' - responses: - 200: - $ref: '#/components/responses/V1SessionDetails' - 400: - $ref: '#/components/responses/BadRequest' + Tenant name. + + Requests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant. + + Requests with an empty tenant name, or that omit this parameter, will have no such context restrictions. + required: false + schema: + $ref: '#/components/schemas/TenantName' + +paths: + /: get: - summary: List sessions - description: | - List all sessions, including those in progress and those complete. + summary: Get API versions + description: Return list of versions currently running. tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.session - operationId: get_v1_sessions + - version + x-openapi-router-controller: bos.server.controllers.base + operationId: root_get responses: 200: - description: A collection of Sessions + description: A collection of Versions content: application/json: schema: type: array items: - $ref: '#/components/schemas/V1Session' - /v1/session/{session_id}: - get: - summary: Get session details by id - description: Get session details by session_id. - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.session - operationId: get_v1_session - responses: - 200: - $ref: '#/components/responses/V1SessionDetails' - 404: - $ref: '#/components/responses/ResourceNotFound' - delete: - summary: Delete session by id - description: Delete session by session_id. - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.session - operationId: delete_v1_session - responses: - 204: - $ref: '#/components/responses/ResourceDeleted' - 404: - $ref: '#/components/responses/ResourceNotFound' - parameters: - - name: session_id - in: path - description: Session ID - required: true - schema: - type: string - /v1/session/{session_id}/status: - parameters: - - name: session_id - in: path - description: Session ID - required: true - schema: - type: string - get: - summary: A list of the statuses for the different boot sets. - description: | - A list of the statuses for the different boot sets. - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: get_v1_session_status - responses: - 200: - $ref: '#/components/responses/V1SessionStatus' - 404: - $ref: '#/components/responses/ResourceNotFound' - post: - summary: Create the initial session status - description: | - Creates the initial session status. - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: create_v1_session_status - requestBody: - description: A JSON object for creating the status for a session - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/V1SessionStatus' - responses: - 204: - $ref: '#/components/responses/V1SessionStatus' - 400: - $ref: '#/components/responses/BadRequest' - patch: - summary: Update the session status - description: | - Update the session status. You can update the start or stop times. - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: update_v1_session_status - requestBody: - description: A JSON object for updating the status for a session - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/V1GenericMetadata' - responses: - 200: - $ref: '#/components/responses/V1SessionStatus' - 404: - $ref: '#/components/responses/BadRequest' - delete: - summary: Delete the session status - description: | - Deletes an existing Session status - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: delete_v1_session_status - responses: - 204: - $ref: '#/components/responses/ResourceDeleted' - 400: - $ref: '#/components/responses/BadRequest' - /v1/session/{session_id}/status/{boot_set_name}: - parameters: - - name: session_id - in: path - description: Session ID - required: true - schema: - type: string - - name: boot_set_name - in: path - description: Boot set name - required: true - schema: - type: string - get: - summary: Get the status for a boot set. - description: Get the status for a boot set. - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: get_v1_session_status_by_bootset - responses: - 200: - description: A list of the Phase Statuses for the Boot Set and metadata - content: - application/json: - schema: - $ref: '#/components/schemas/V1BootSetStatus' - 404: - $ref: '#/components/responses/ResourceNotFound' - post: - summary: Create a Boot Set Status - description: | - Create a status for a Boot Set - tags: - - session - - status - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: create_v1_boot_set_status - requestBody: - description: A JSON object for creating a status for a Boot Set - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/V1BootSetStatus' - responses: - 201: - description: The created Boot Set status - content: - application/json: - schema: - $ref: '#/components/schemas/V1BootSetStatus' - patch: - summary: Update the status. - description: | - This will change the status for one or more nodes within - the boot set. - tags: - - session - # - cli_ignore - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: update_v1_session_status_by_bootset - requestBody: - description: A JSON object for updating the status for a session - required: true - content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/V1UpdateRequestNodeChangeList' - - $ref: '#/components/schemas/V1UpdateRequestNodeErrorsList' - - $ref: '#/components/schemas/V1UpdateRequestGenericMetadata' - responses: - 200: - description: A list of Boot Set Statuses and metadata - content: - application/json: - schema: - $ref: '#/components/schemas/V1BootSetStatus' - 404: - $ref: '#/components/responses/ResourceNotFound' - delete: - summary: Delete the Boot Set status - description: | - Deletes an existing Boot Set status - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: delete_v1_boot_set_status - responses: - 204: - $ref: '#/components/responses/ResourceDeleted' - 400: - $ref: '#/components/responses/BadRequest' - /v1/session/{session_id}/status/{boot_set_name}/{phase_name}: - parameters: - - name: session_id - in: path - description: Session ID - required: true - schema: - type: string - - name: boot_set_name - in: path - description: Boot set name - required: true - schema: - type: string - - name: phase_name - in: path - description: The phase name - required: true - schema: - type: string - get: - summary: Get the status for a specific boot set and phase. - description: Get the status for a specific boot set and phase. - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: get_v1_session_status_by_bootset_and_phase - responses: - 200: - description: A list of the nodes in the Phase and Category - content: - application/json: - schema: - $ref: '#/components/schemas/V1PhaseStatus' - 404: - $ref: '#/components/responses/ResourceNotFound' - /v1/session/{session_id}/status/{boot_set_name}/{phase_name}/{category_name}: - parameters: - - name: session_id - in: path - description: Session ID - required: true - schema: - type: string - - name: boot_set_name - in: path - description: Boot set name - required: true - schema: - type: string - - name: phase_name - in: path - description: The phase name - required: true - schema: - type: string - - name: category_name - in: path - description: The category name - required: true - schema: - type: string - get: - summary: Get the status for a specific boot set, phase, and category. - description: Get the status for a specific boot set, phase, and category. - tags: - - session - x-openapi-router-controller: bos.server.controllers.v1.status - operationId: get_v1_session_status_by_bootset_and_phase_and_category - responses: - 200: - description: A list of the nodes in the Phase and Category - content: - application/json: - schema: - $ref: '#/components/schemas/V1PhaseCategoryStatus' - 404: - $ref: '#/components/responses/ResourceNotFound' - /v1/version: - get: - summary: Get API version - tags: - - version - x-openapi-router-controller: bos.server.controllers.v1.base - operationId: v1_get_version - responses: - 200: - $ref: '#/components/responses/Version' + $ref: '#/components/schemas/Version' 500: - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/InternalError' /v2: get: summary: Get API version + description: Return the API version tags: - v2 - version @@ -1895,17 +1350,16 @@ paths: 200: $ref: '#/components/responses/Version' 500: - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/InternalError' /v2/healthz: get: summary: Get service health details + description: Get BOS health details. tags: - v2 - healthz x-openapi-router-controller: bos.server.controllers.v2.healthz operationId: get_v2_healthz - description: - Get bos health details. responses: 200: $ref: '#/components/responses/ServiceHealth' @@ -1914,11 +1368,11 @@ paths: 503: $ref: '#/components/responses/ServiceUnavailable' /v2/sessiontemplates: + parameters: + - $ref: '#/components/parameters/V2TenantHeaderParam' get: - summary: List session templates - description: | - List all session templates. Session templates are - uniquely identified by the name. + summary: List Session Templates + description: List all Session Templates. tags: - v2 - sessiontemplates @@ -1929,18 +1383,14 @@ paths: $ref: '#/components/responses/V2SessionTemplateDetailsArray' /v2/sessiontemplatesvalid/{session_template_id}: parameters: - - name: session_template_id - in: path - description: Session Template ID - required: true - schema: - type: string + - $ref: '#/components/parameters/TemplateIdPathParam' + - $ref: '#/components/parameters/V2TenantHeaderParam' get: - summary: Validate the session template by id + summary: Validate the Session Template by ID description: | - Validate session template by session_template_id. - The session_template_id corresponds to the *name* - of the session template. + Validate Session Template by Session Template ID. + The Session Template ID corresponds to the *name* + of the Session Template. tags: - v2 - sessiontemplatess @@ -1953,18 +1403,14 @@ paths: $ref: '#/components/responses/ResourceNotFound' /v2/sessiontemplates/{session_template_id}: parameters: - - name: session_template_id - in: path - description: Session Template ID - required: true - schema: - type: string + - $ref: '#/components/parameters/TemplateIdPathParam' + - $ref: '#/components/parameters/V2TenantHeaderParam' get: - summary: Get session template by id + summary: Get Session Template by ID description: | - Get session template by session_template_id. - The session_template_id corresponds to the *name* - of the session template. + Get Session Template by Session Template ID. + The Session Template ID corresponds to the *name* + of the Session Template. tags: - v2 - sessiontemplatess @@ -1976,16 +1422,15 @@ paths: 404: $ref: '#/components/responses/ResourceNotFound' put: - summary: Create session template + summary: Create Session Template + description: Create a new Session Template. tags: - v2 - sessiontemplates x-openapi-router-controller: bos.server.controllers.v2.sessiontemplates operationId: put_v2_sessiontemplate - description: - Create a new session template. requestBody: - description: A JSON object for creating a session template + description: A JSON object for creating a Session Template required: true content: application/json: @@ -1997,14 +1442,15 @@ paths: 400: $ref: '#/components/responses/BadRequest' patch: - summary: Update a session template + summary: Update a Session Template + description: Update an existing Session Template. tags: - v2 - sessiontemplates x-openapi-router-controller: bos.server.controllers.v2.sessiontemplates operationId: patch_v2_sessiontemplate requestBody: - description: A JSON object for updating a session template + description: A JSON object for updating a Session Template required: true content: application/json: @@ -2014,10 +1460,12 @@ paths: 200: $ref: '#/components/responses/V2SessionTemplateDetails' 400: - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/BadRequest' + 404: + $ref: '#/components/responses/ResourceNotFound' delete: - summary: Delete a session template - description: Delete a session template. + summary: Delete a Session Template + description: Delete a Session Template. tags: - v2 - sessiontemplates @@ -2030,11 +1478,11 @@ paths: $ref: '#/components/responses/ResourceNotFound' /v2/sessiontemplatetemplate: get: - summary: Get an example session template. + summary: Get an example Session Template. description: | - Returns a skeleton of a session template, which can be + Returns a skeleton of a Session Template, which can be used as a starting point for users creating their own - session templates. + Session Templates. tags: - v2 - sessiontemplates @@ -2044,12 +1492,14 @@ paths: 200: $ref: '#/components/responses/V2SessionTemplateDetails' /v2/sessions: + parameters: + - $ref: '#/components/parameters/V2TenantHeaderParam' post: - summary: Create a session + summary: Create a Session description: | - The creation of a session performs the operation + The creation of a Session performs the operation specified in the SessionCreateRequest - on the boot set(s) defined in the session template. + on the Boot Sets defined in the Session Template. tags: - v2 - sessions @@ -2063,76 +1513,47 @@ paths: 400: $ref: '#/components/responses/BadRequest' get: - summary: List sessions + summary: List Sessions + parameters: + - $ref: '#/components/parameters/V2SessionsMinAgeQueryParam' + - $ref: '#/components/parameters/V2SessionsMaxAgeQueryParam' + - $ref: '#/components/parameters/V2SessionsStatusQueryParam' description: | - List all sessions, including those in progress and those complete. + List all Sessions, including those in progress and those complete. tags: - v2 - sessions x-openapi-router-controller: bos.server.controllers.v2.sessions operationId: get_v2_sessions - parameters: - - name: min_age - schema: - type: string - in: query - description: >- - Return only sessions older than the given age. Age is given in the format "1d" or "6h" - - name: max_age - schema: - type: string - in: query - description: >- - Return only sessions younger than the given age. Age is given in the format "1d" or "6h" - - name: status - schema: - type: string - enum: ['pending', 'running', 'complete'] - in: query - description: >- - Return only sessions with the given status. responses: 200: $ref: '#/components/responses/V2SessionDetailsArray' delete: - summary: Delete multiple sessions. + summary: Delete multiple Sessions. + parameters: + - $ref: '#/components/parameters/V2SessionsMinAgeQueryParam' + - $ref: '#/components/parameters/V2SessionsMaxAgeQueryParam' + - $ref: '#/components/parameters/V2SessionsStatusQueryParam' + description: | + Delete multiple Sessions. If filters are provided, only Sessions matching + all filters will be deleted. By default only completed Sessions will be deleted. tags: - v2 - sessions x-openapi-router-controller: bos.server.controllers.v2.sessions operationId: delete_v2_sessions - parameters: - - name: min_age - schema: - type: string - in: query - description: >- - Return only sessions older than the given age. Age is given in the format "1d" or "6h" - - name: max_age - schema: - type: string - in: query - description: >- - Return only sessions younger than the given age. Age is given in the format "1d" or "6h" - - name: status - schema: - enum: ['pending', 'running', 'complete'] - type: string - in: query - description: >- - Return only sessions with the given status. - description: - Delete multiple sessions. If filters are provided, only sessions matching - all filters will be deleted. By default only completed sessions will be deleted. responses: 204: $ref: '#/components/responses/ResourceDeleted' 400: $ref: '#/components/responses/BadRequest' /v2/sessions/{session_id}: + parameters: + - $ref: '#/components/parameters/V2SessionIdPathParam' + - $ref: '#/components/parameters/V2TenantHeaderParam' get: - summary: Get session details by id - description: Get session details by session_id. + summary: Get Session details by ID + description: Get Session details by Session ID. tags: - v2 - sessions @@ -2144,12 +1565,15 @@ paths: 404: $ref: '#/components/responses/ResourceNotFound' patch: - summary: Update a single session + summary: Update status of a single Session + description: | + Update the state for a given Session in the BOS database. + This is intended only for internal use by the BOS service. tags: - v2 - sessions + - cli_ignore x-openapi-router-controller: bos.server.controllers.v2.sessions - description: Update the state for a given session in the BOS database operationId: patch_v2_session requestBody: $ref: '#/components/requestBodies/V2sessionUpdateRequest' @@ -2161,8 +1585,8 @@ paths: 404: $ref: '#/components/responses/ResourceNotFound' delete: - summary: Delete session by id - description: Delete session by session_id. + summary: Delete Session by ID + description: Delete Session by Session ID. tags: - v2 - sessions @@ -2173,17 +1597,13 @@ paths: $ref: '#/components/responses/ResourceDeleted' 404: $ref: '#/components/responses/ResourceNotFound' - parameters: - - name: session_id - in: path - description: Session ID - required: true - schema: - type: string /v2/sessions/{session_id}/status: + parameters: + - $ref: '#/components/parameters/V2SessionIdPathParam' + - $ref: '#/components/parameters/V2TenantHeaderParam' get: - summary: Get session extended status information by id - description: Get session extended status information by id + summary: Get Session extended status information by ID + description: Get Session extended status information by ID tags: - v2 - sessions @@ -2195,93 +1615,89 @@ paths: 404: $ref: '#/components/responses/ResourceNotFound' post: - summary: Saves the current session to database + summary: Saves the current Session to database tags: - v2 - sessions - cli_ignore x-openapi-router-controller: bos.server.controllers.v2.sessions - description: Saves the current session to database. For use at session completion. + description: Saves the current Session to database. For use at Session completion. operationId: save_v2_session_status responses: 200: $ref: '#/components/responses/V2SessionDetails' 404: $ref: '#/components/responses/ResourceNotFound' - parameters: - - name: session_id - in: path - description: Session ID - required: true - schema: - type: string /v2/components: + parameters: + - $ref: '#/components/parameters/V2TenantHeaderParam' get: - summary: Retrieve the state of a collection of components - tags: - - v2 - - components - x-openapi-router-controller: bos.server.controllers.v2.components - description: >- - Retrieve the full collection of components in the form of a - ComponentArray. Full results can also be filtered by query - parameters. Only the first filter parameter of each type is - used and the parameters are applied in an AND fashion. - If the collection is empty or the filters have no match, an - empty array is returned. - operationId: get_v2_components + summary: Retrieve the state of a collection of Components parameters: - name: ids schema: - type: string + $ref: '#/components/schemas/V2ComponentId' in: query - description: >- - Retrieve the components with the given id - (e.g. xname for hardware components). Can be chained - for selecting groups of components. + description: |- + Retrieve the Components with the given ID + (e.g. xname for hardware Components). Can be chained + for selecting groups of Components. - name: session schema: - type: string + $ref: '#/components/schemas/V2SessionName' in: query - description: >- - Retrieve the components with the given session id. + description: |- + Retrieve the Components with the given Session ID. - name: staged_session schema: - type: string + $ref: '#/components/schemas/V2SessionName' in: query - description: >- - Retrieve the components with the given staged session id. + description: |- + Retrieve the Components with the given staged Session ID. - name: enabled schema: type: boolean in: query - description: >- - Retrieve the components with the "enabled" state. + description: |- + Retrieve the Components with the "enabled" state. - name: phase schema: - type: string + $ref: '#/components/schemas/V2ComponentPhase' in: query - description: >- - Retrieve the components in the given phase. + description: |- + Retrieve the Components in the given phase. - name: status schema: type: string + maxLength: 512 in: query - description: >- - Retrieve the components with the given status. + description: |- + Retrieve the Components with the given status. + description: |- + Retrieve the full collection of Components in the form of a + ComponentArray. Full results can also be filtered by query + parameters. Only the first filter parameter of each type is + used and the parameters are applied in an AND fashion. + If the collection is empty or the filters have no match, an + empty array is returned. + tags: + - v2 + - components + x-openapi-router-controller: bos.server.controllers.v2.components + operationId: get_v2_components responses: 200: $ref: '#/components/responses/V2componentDetailsArray' 400: $ref: '#/components/responses/BadRequest' put: - summary: Add or Replace a collection of components + summary: Add or Replace a collection of Components + description: Update the state for a collection of Components in the BOS database tags: - v2 - components - cli_ignore x-openapi-router-controller: bos.server.controllers.v2.components - description: Update the state for a collection of components in the BOS database operationId: put_v2_components requestBody: $ref: '#/components/requestBodies/V2componentsPutRequest' @@ -2291,16 +1707,15 @@ paths: 400: $ref: '#/components/responses/BadRequest' patch: - summary: Update a collection of components + summary: Update a collection of Components + description: Update the state for a collection of Components in the BOS database tags: - v2 - components - - cli_ignore x-openapi-router-controller: bos.server.controllers.v2.components - description: Update the state for a collection of components in the BOS database operationId: patch_v2_components requestBody: - $ref: '#/components/requestBodies/V2componentsUpdateRequest' + $ref: '#/components/requestBodies/V2componentsUpdateRequestFilter' responses: 200: $ref: '#/components/responses/V2componentDetailsArray' @@ -2309,13 +1724,16 @@ paths: 404: $ref: '#/components/responses/ResourceNotFound' /v2/components/{component_id}: + parameters: + - $ref: '#/components/parameters/V2ComponentIdPathParam' + - $ref: '#/components/parameters/V2TenantHeaderParam' get: - summary: Retrieve the state of a single component + summary: Retrieve the state of a single Component + description: Retrieve the current and desired state of a single Component tags: - v2 - components x-openapi-router-controller: bos.server.controllers.v2.components - description: Retrieve the current and desired state of a single component operationId: get_v2_component responses: 200: @@ -2325,12 +1743,12 @@ paths: 404: $ref: '#/components/responses/ResourceNotFound' put: - summary: Add or Replace a single component + summary: Add or Replace a single Component + description: Update the state for a given Component in the BOS database tags: - v2 - components x-openapi-router-controller: bos.server.controllers.v2.components - description: Update the state for a given component in the BOS database operationId: put_v2_component requestBody: $ref: '#/components/requestBodies/V2componentUpdateRequest' @@ -2340,12 +1758,12 @@ paths: 400: $ref: '#/components/responses/BadRequest' patch: - summary: Update a single component + summary: Update a single Component + description: Update the state for a given Component in the BOS database tags: - v2 - components x-openapi-router-controller: bos.server.controllers.v2.components - description: Update the state for a given component in the BOS database operationId: patch_v2_component requestBody: $ref: '#/components/requestBodies/V2componentUpdateRequest' @@ -2356,34 +1774,31 @@ paths: $ref: '#/components/responses/BadRequest' 404: $ref: '#/components/responses/ResourceNotFound' + 409: + $ref: '#/components/responses/UpdateConflict' delete: + summary: Delete a single Component + description: Delete the given Component tags: - v2 - components - cli_ignore - summary: Delete a single component x-openapi-router-controller: bos.server.controllers.v2.components - description: Delete the given component operationId: delete_v2_component responses: 204: $ref: '#/components/responses/ResourceDeleted' 404: $ref: '#/components/responses/ResourceNotFound' - parameters: - - name: component_id - in: path - description: Component id. e.g. xname for hardware components - required: true - schema: - type: string /v2/applystaged: + parameters: + - $ref: '#/components/parameters/V2TenantHeaderParam' post: - summary: Start a staged session for the specified components + summary: Start a staged Session for the specified Components description: | - Given a list of xnames, this will trigger the start of any sessions - staged for those components. Components without a staged session - will be ignored, and a list all components that are acted on will + Given a list of xnames, this will trigger the start of any Sessions + staged for those Components. Components without a staged Session + will be ignored, and a list all Components that are acted on will be returned in the response. tags: - v2 @@ -2400,22 +1815,22 @@ paths: /v2/options: get: summary: Retrieve the BOS service options + description: Retrieve the list of BOS service options. tags: - options x-openapi-router-controller: bos.server.controllers.v2.options - description: Retrieve the list of BOS service options. operationId: get_v2_options responses: 200: $ref: '#/components/responses/V2options' patch: summary: Update BOS service options + description: Update one or more of the BOS service options. tags: - v2 - options x-openapi-router-controller: bos.server.controllers.v2.options operationId: patch_v2_options - description: Update one or more of the BOS service options. requestBody: $ref: '#/components/requestBodies/V2optionsUpdateRequest' responses: @@ -2426,6 +1841,7 @@ paths: /v2/version: get: summary: Get API version + description: Return the API version tags: - v2 - version @@ -2435,4 +1851,4 @@ paths: 200: $ref: '#/components/responses/Version' 500: - $ref: '#/components/responses/BadRequest' + $ref: '#/components/responses/BadRequest' \ No newline at end of file diff --git a/cray/modules/bos/swagger3.json b/cray/modules/bos/swagger3.json index b1ffdd5..5e2d770 100644 --- a/cray/modules/bos/swagger3.json +++ b/cray/modules/bos/swagger3.json @@ -1,14993 +1,12168 @@ { - "openapi": "3.0.2", - "info": { - "title": "Boot Orchestration Service", - "version": "0.0.0-api", - "description": "The Boot Orchestration Service (BOS) provides coordinated provisioning actions\nover defined hardware sets to enable boot, reboot, shutdown, configuration and\nstaging for specified hardware subsets. These provisioning actions apply state\nthrough numerous system management APIs at the request of system administrators\nfor managed product environments.\n\nThe default content type for the BOS API is \"application/json\". Unsuccessful\nAPI calls return a content type of \"application/problem+json\" as per RFC 7807.\n\n## Resources\n\n\n### /sessiontemplate\n\nA session template sets the operational context of which nodes to operate on for\nany given set of nodes. It is largely comprised of one or more boot\nsets and their associated software configuration.\n\nA boot set defines a list of nodes, the image you want to boot/reboot the nodes with,\nkernel parameters to use to boot the nodes, and additional configuration management\nframework actions to apply during node bring up.\n\n### /session\n\nA BOS session applies a provided action to the nodes defined in a session\ntemplate.\n\n## Workflow\n\n\n### Create a New Session\n\n#### GET /sessiontemplate\n\nList available session templates.\nNote the *name* which uniquely identifies each session template.\nThis value can be used to create a new session later,\nif specified in the request body of POST /session.\n\n#### POST /sessiontemplate\n\nIf no session template pre-exists that satisfies requirements,\nthen create a new session template. *name* uniquely identifies the\nsession template.\nThis value can be used to create a new session later,\nif specified in the request body of POST /session.\n\n#### POST /session\n\nSpecify template_name and an\noperation to create a new session.\nThe template_name corresponds to the session template *name*.\nA new session is launched as a result of this call.\n\nA limit can also be specified to narrow the scope of the session. The limit\ncan consist of nodes, groups, or roles in a comma-separated list.\nMultiple groups are treated as separated by OR, unless \"&\" is added to\nthe start of the component, in which case this becomes an AND. Components\ncan also be preceded by \"!\" to exclude them.\n\nNote, the response from a successful session launch contains *links*.\nWithin *links*, *href* is a string that uniquely identifies the session.\n*href* is constructed using the session template name and a generated UUID.\nUse the entire *href* string as the path parameter *session_id*\nto uniquely identify a session in for the /session/{session_id}\nendpoint.\n\n\n#### GET /session/{session_id}\n\nGet session details by session id.\n\nList all in progress and completed sessions.\n\n\n## Interactions with Other APIs\n\n\nBOS works in concert with Image Management Service (IMS) to access boot images,\nand if *enable_cfs* is true then\nBOS will invoke CFS to configure the compute nodes.\n\n\nAll boot images specified via the session template, must be available via IMS.\n" - }, - "servers": [ - { - "url": "https://api-gw-service-nmn.local/apis/bos", - "description": "The production BOS API server through a standard API gateway" + "openapi": "3.0.3", + "info": { + "title": "Boot Orchestration Service", + "version": "2.8.0", + "description": "The Boot Orchestration Service (BOS) provides coordinated provisioning actions\nover defined hardware sets to enable boot, reboot, shutdown, configuration and\nstaging for specified hardware subsets. These provisioning actions apply state\nthrough numerous system management APIs at the request of system administrators\nfor managed product environments.\n\nThe default content type for the BOS API is \"application/json\". Unsuccessful\nAPI calls return a content type of \"application/problem+json\" as per RFC 7807.\n\n## Resources\n\n\n### Session Template\n\nA Session Template sets the operational context of which nodes to operate on for\nany given set of nodes. It is largely comprised of one or more boot\nsets and their associated software configuration.\n\nA Boot Set defines a list of nodes, the image you want to boot/reboot the nodes with,\nkernel parameters to use to boot the nodes, and additional configuration management\nframework actions to apply during node bring up.\n\n### Session\n\nA BOS Session applies a provided action to the nodes defined in a Session Template.\n\n\n## Workflow: Create a New Session\n\n1. Choose the Session Template to use.\n\n Session Templates which do not belong to a tenant are uniquely identified by their\n names. All Session Templates that belong to a given tenant are uniquely identified\n by their names, but may share names with Session Templates that belong to other\n tenants or that do not belong to a tenant.\n\n a. List available Session Templates.\n\n GET /v2/sessiontemplates\n\n b. Create a new Session Template if desired.\n\n PUT /v2/sessiontemplate/{template_name}\n\n If no Session Template exists that satisfies requirements,\n then create a new Session Template.\n This Session Template can be used to create a new Session later.\n\n2. Create the Session.\n\n POST /v2/sessions\n\n Specify template_name and an operation to create a new Session.\n The template_name corresponds to the Session Template *name*.\n A new Session is launched as a result of this call (in the case of\n /v2/sessions, the option to stage but not begin the Session also exists).\n\n A limit can also be specified to narrow the scope of the Session. The limit\n can consist of nodes, groups, or roles in a comma-separated list.\n Multiple groups are treated as separated by OR, unless \"&\" is added to\n the start of the component, in which case this becomes an AND. Components\n can also be preceded by \"!\" to exclude them.\n\n Note, the response from a successful Session launch contains *links*.\n Within *links*, *href* is a string that uniquely identifies the Session.\n *href* is constructed using the Session Template name and a generated UUID.\n Use the entire *href* string as the path parameter *session_id*\n to uniquely identify a Session.\n\n3. Get details on the Session.\n\n GET /v2/sessions/{session_id}\n\n\n## Interactions with Other APIs\n\n### Configuration Framework Service (CFS)\n\nIf *enable_cfs* is true in a Session Template, then BOS will invoke CFS to\nconfigure the target nodes during *boot* or *reboot* operations.\n\n### Hardware State Manager (HSM)\n\nIn some situations BOS checks HSM to determine if a node has been disabled.\n\n### Image Management Service (IMS)\n\nBOS works in concert with IMS to access boot images.\nAll boot images specified via the Session Template must be available via IMS.\n" }, - { - "url": "https://cray-bos", - "description": "The service as exposed through Kubernetes DNS service mapping" - } - ], - "components": { - "schemas": { - "Healthz": { - "description": "Service health status", - "type": "object", - "properties": { - "dbStatus": { - "type": "string" - }, - "apiStatus": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Version": { - "description": "Version data", - "type": "object", - "properties": { - "major": { - "type": "integer" - }, - "minor": { - "type": "integer" - }, - "patch": { - "type": "integer" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "ProblemDetails": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - }, - "Link": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - }, - "V1CfsParameters": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled.\n", - "properties": { - "clone_url": { - "type": "string", - "description": "The clone url for the repository providing the configuration. (DEPRECATED)\n" - }, - "branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. Mutually exclusive with commit. (DEPRECATED)\n" - }, - "commit": { - "type": "string", - "description": "The commit id of the configuration that you want to\napply to the nodes. Mutually exclusive with branch. (DEPRECATED)\n" - }, - "playbook": { - "type": "string", - "description": "The name of the playbook to run for configuration. The file path must be specified\nrelative to the base directory of the config repo. (DEPRECATED)\n" - }, - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "V1GenericMetadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } + "servers": [ + { + "url": "https://api-gw-service-nmn.local/apis/bos", + "description": "The production BOS API server through a standard API gateway" }, - "additionalProperties": false - }, - "V1NodeList": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - }, - "V1PhaseCategoryStatus": { - "type": "object", - "description": "A list of the nodes in a given category within a phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase Category\n", - "example": "Succeeded", - "pattern": "^(?i)not_started|in_progress|succeeded|failed|excluded$" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } + { + "url": "https://cray-bos", + "description": "The service as exposed through Kubernetes DNS service mapping" } - }, - "V1PhaseStatus": { - "type": "object", - "description": "The phase's status. It is a list of all of the nodes in the phase and\nwhat category those nodes fall into within the phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase\n", - "example": "Boot", - "pattern": "^(?i)boot|configure|shutdown$" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { + ], + "components": { + "schemas": { + "AgeString": { "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } + "description": "Age in minutes (e.g. \"3m\"), hours (e.g. \"5h\"), days (e.g. \"10d\"), or weeks (e.g. \"2w\").", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 }, - "additionalProperties": false - }, - "categories": { - "type": "array", - "items": { - "type": "object", - "description": "A list of the nodes in a given category within a phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase Category\n", - "example": "Succeeded", - "pattern": "^(?i)not_started|in_progress|succeeded|failed|excluded$" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - }, - "errors": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - }, - "V1BootSetStatus": { - "type": "object", - "description": "The status for a Boot Set. It as a list of the phase statuses for the Boot Set.\n\n## Link Relationships\n\n* self : The session object\n* phase : A phase of the boot set\n", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "description": "Name of the Boot Set", - "example": "Boot-Set" - }, - "session": { - "type": "string", - "description": "Session ID", - "example": "Session-ID" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { + "BootInitrdPath": { "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 }, - "additionalProperties": false - }, - "phases": { - "type": "array", - "items": { - "type": "object", - "description": "The phase's status. It is a list of all of the nodes in the phase and\nwhat category those nodes fall into within the phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase\n", - "example": "Boot", - "pattern": "^(?i)boot|configure|shutdown$" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "categories": { - "type": "array", - "items": { - "type": "object", - "description": "A list of the nodes in a given category within a phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase Category\n", - "example": "Succeeded", - "pattern": "^(?i)not_started|in_progress|succeeded|failed|excluded$" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - }, - "errors": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - } - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "V1SessionStatus": { - "type": "object", - "description": "The status for a Boot Session. It is a list of all of the Boot Set Statuses in the session.\n## Link Relationships\n\n* self : The session object\n* boot sets: URL to access the Boot Set status\n", - "properties": { - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { + "BootKernelPath": { "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "BootManifestPath": { "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 }, - "additionalProperties": false - }, - "boot_sets": { - "description": "The boot sets in the Session\n", - "type": "array", - "items": { - "type": "string" + "BootKernelParameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 }, - "minItems": 1 - }, - "id": { - "type": "string", - "description": "Session ID" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "V1BootSet": { - "description": "A boot set defines a collection of nodes and the information about the\nboot artifacts and parameters to be sent to each node over the specified\nnetwork to enable these nodes to boot. When multiple boot sets are used\nin a session template, the boot_ordinal and shutdown_ordinal indicate\nthe order in which boot sets need to be acted upon. Boot sets sharing\nthe same ordinal number will be addressed at the same time.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "boot_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The boot ordinal. This will establish the order for boot set operations.\nBoot sets boot in order from the lowest to highest boot_ordinal.\n" - }, - "shutdown_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The shutdown ordinal. This will establish the order for boot set\nshutdown operations. Sets shutdown from low to high shutdown_ordinal.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "network": { - "type": "string", - "description": "The network over which the node will boot from.\nChoices: NMN -- Node Management Network\npattern: '^(?i)nmn$'\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" + "BootSetEtag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" + "BootSetName": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" + "BootSetRootfsProvider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - }, - "V1SessionTemplate": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which when combined with an\naction (i.e. boot, reconfigure, reboot, shutdown) will create a Kubernetes BOA job\nto complete the required tasks for the operation.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "cfs_url": { - "type": "string", - "description": "The url for the repository providing the configuration. DEPRECATED\n" - }, - "cfs_branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. DEPRECATED.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled.\n", - "properties": { - "clone_url": { + "BootSetRootfsProviderPassthrough": { "type": "string", - "description": "The clone url for the repository providing the configuration. (DEPRECATED)\n" - }, - "branch": { + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + }, + "BootSetType": { "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. Mutually exclusive with commit. (DEPRECATED)\n" - }, - "commit": { + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "CfsConfiguration": { "type": "string", - "description": "The commit id of the configuration that you want to\napply to the nodes. Mutually exclusive with branch. (DEPRECATED)\n" - }, - "playbook": { + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "EmptyString": { "type": "string", - "description": "The name of the playbook to run for configuration. The file path must be specified\nrelative to the base directory of the config repo. (DEPRECATED)\n" - }, - "configuration": { + "description": "An empty string value.", + "enum": [ + "" + ], + "maxLength": 0 + }, + "EmptyStringNullable": { "type": "string", - "description": "The name of configuration to be applied.\n" - } + "description": "An empty string value.", + "enum": [ + "" + ], + "nullable": true, + "maxLength": 0 }, - "additionalProperties": false - }, - "partition": { - "type": "string", - "description": "The machine partition to operate on.\n" - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set defines a collection of nodes and the information about the\nboot artifacts and parameters to be sent to each node over the specified\nnetwork to enable these nodes to boot. When multiple boot sets are used\nin a session template, the boot_ordinal and shutdown_ordinal indicate\nthe order in which boot sets need to be acted upon. Boot sets sharing\nthe same ordinal number will be addressed at the same time.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "boot_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The boot ordinal. This will establish the order for boot set operations.\nBoot sets boot in order from the lowest to highest boot_ordinal.\n" - }, - "shutdown_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The shutdown ordinal. This will establish the order for boot set\nshutdown operations. Sets shutdown from low to high shutdown_ordinal.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "network": { - "type": "string", - "description": "The network over which the node will boot from.\nChoices: NMN -- Node Management Network\npattern: '^(?i)nmn$'\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "name" - ], - "additionalProperties": false - }, - "V1Session": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "operation": { - "type": "string", - "description": "A Session represents an operation on a SessionTemplate. The creation of a session effectively results in the creation of a Kubernetes Boot Orchestration Agent (BOA) job to perform the duties required to complete the operation.\nOperation -- An operation to perform on nodes in this session.\n\n Boot Boot nodes that are off.\n\n Configure Reconfigure the nodes using the Configuration Framework\n Service (CFS).\n\n Reboot Gracefully power down nodes that are on and then power\n them back up.\n\n Shutdown Gracefully power down nodes that are on.\n", - "pattern": "^(?i)boot|configure|reboot|shutdown$" - }, - "templateUuid": { - "type": "string", - "description": "DEPRECATED - use templateName", - "example": "my-session-template", - "format": "string" - }, - "templateName": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "job": { - "type": "string", - "maxLength": 64, - "readOnly": true, - "description": "The identity of the Kubernetes job that is created to handle the session.\n", - "example": "boa-07877de1-09bb-4ca8-a4e5-943b1262dbf0" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "operation" - ], - "additionalProperties": false - }, - "V1NodeChangeList": { - "type": "object", - "description": "The information used to update the status of a node list. It moves nodes from\none category to another within a phase.\n", - "properties": { - "phase": { - "type": "string", - "example": "Boot" - }, - "source": { - "type": "string", - "example": "in_progress" - }, - "destination": { - "type": "string", - "example": "Succeeded" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "phase", - "source", - "destination", - "node_list" - ] - }, - "V1NodeErrorsList": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - }, - "V1UpdateRequestNodeChangeList": { - "description": "This is the payload sent during an update request. It contains\nupdates to which categories nodes are in.\n", - "type": "array", - "items": { - "type": "object", - "properties": { - "update_type": { - "description": "The type of update data", - "pattern": "NodeChangeList", - "type": "string" + "EnableCfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true }, - "phase": { - "description": "The phase that this data belongs to. If blank, it belongs to\nthe Boot Set itself, which only applies to the GenericMetadata type.\n", - "pattern": "(?i)shutdown|boot|configure", - "type": "string" + "HardwareComponentName": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 }, - "data": { - "type": "object", - "description": "The information used to update the status of a node list. It moves nodes from\none category to another within a phase.\n", - "properties": { - "phase": { - "type": "string", - "example": "Boot" - }, - "source": { - "type": "string", - "example": "in_progress" + "Healthz": { + "description": "Service health status", + "type": "object", + "properties": { + "dbStatus": { + "type": "string" + }, + "apiStatus": { + "type": "string" + } }, - "destination": { - "type": "string", - "example": "Succeeded" + "additionalProperties": false + }, + "Link": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "phase", - "source", - "destination", - "node_list" - ] - } - } - } - }, - "V1UpdateRequestNodeErrorsList": { - "description": "This is the payload sent during an update request. It contains\nupdates to which errors have occurred and which nodes encountered those errors\n", - "type": "array", - "items": { - "type": "object", - "properties": { - "update_type": { - "description": "The type of update data", - "pattern": "NodeErrorsList", - "type": "string" + "additionalProperties": false }, - "phase": { - "description": "The phase that this data belongs to. If blank, it belongs to\nthe Boot Set itself, which only applies to the GenericMetadata type.\n", - "pattern": "(?i)shutdown|boot|configure", - "type": "string" + "LinkList": { + "description": "List of links to other resources", + "type": "array", + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } }, - "data": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { + "LinkListReadOnly": { + "description": "List of links to other resources", "type": "array", + "readOnly": true, "items": { - "type": "string", - "example": [ + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "NodeList": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ "x3000c0s19b1n0", "x3000c0s19b2n0" - ] + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 } - } - } - } - } - }, - "V1UpdateRequestGenericMetadata": { - "description": "This is the payload sent during an update request. It contains\nupdates to metadata, specifically start and stop times\n", - "type": "array", - "items": { - "type": "object", - "properties": { - "update_type": { - "description": "The type of update data", - "pattern": "GenericMetadata", - "type": "string" }, - "phase": { - "description": "The phase that this data belongs to. If the phase is boot_set, it belongs to\nthe Boot Set itself, which only applies to the GenericMetadata type.\n", - "pattern": "(?i)shutdown|boot|configure|boot_set", - "type": "string" + "NodeGroupList": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } }, - "data": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 + "NodeRoleList": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 } - }, - "additionalProperties": false - } - } - } - }, - "V2CfsParameters": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "V2SessionTemplate": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } }, - "additionalProperties": false - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" + "ProblemDetails": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "V2SessionTemplateArray": { - "description": "An array of session templates.", - "type": "array", - "items": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true + "additionalProperties": false }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" + "SessionLimit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true + "SessionTemplateDescription": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false + "SessionTemplateName": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", + "TenantName": { + "type": "string", + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 + }, + "Version": { + "description": "Version data", "type": "object", "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { + "major": { "type": "string", - "description": "The name of configuration to be applied.\n" - } + "pattern": "^(0|[1-9][0-9]*)$" }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } + "minor": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "patch": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } + "additionalProperties": false }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", + "V2TenantName": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "V2CfsParameters": { "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } }, "additionalProperties": false - } - } - }, - "additionalProperties": false - } - }, - "V2SessionTemplateValidation": { - "description": "Message describing errors or incompleteness in a Session Template.\n", - "type": "string" - }, - "V2SessionCreate": { - "description": "A Session Creation object. A UUID name is generated if a name is not provided. The limit parameter is required if the session_limit_required option is true. If the reject_nids option is enabled, then Session creation will fail if a Session limit appears to contain a NID value.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session. The name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.", - "example": "session-20190728032600", - "minLength": 1, - "maxLength": 127, - "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\nAlternatively, the limit can be set to \"*\", which means no limit.\nThe limit parameter is required if the session_limit_required option is true. If the reject_nids option is enabled, then Session creation will fail if a Session limit appears to contain a NID value.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n", - "default": false - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n", - "default": false - } - }, - "required": [ - "operation", - "template_name" - ], - "additionalProperties": false - }, - "V2SessionStatus": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false - }, - "V2BootSet": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" + "V2SessionTemplate": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" + "V2SessionTemplateValidation": { + "description": "Message describing errors or incompleteness in a Session Template.\n", + "type": "string" }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - }, - "V2Session": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { + "V2SessionName": { "type": "string", - "description": "When the session completed.\n" - }, - "status": { + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "V2SessionOperation": { "type": "string", "enum": [ - "pending", - "running", - "complete" + "boot", + "reboot", + "shutdown" ], - "description": "The status of a session.\n" - }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "V2SessionArray": { - "description": "An array of sessions.", - "type": "array", - "items": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" + "V2SessionCreate": { + "description": "A Session Creation object. A UUID name is generated if a name is not provided. The limit parameter is\nrequired if the session_limit_required option is true.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n", + "default": false + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n", + "default": false + } }, - "status": { - "type": "string", - "enum": [ + "required": [ + "operation", + "template_name" + ], + "additionalProperties": false + }, + "V2SessionStatusLabel": { + "type": "string", + "enum": [ "pending", "running", "complete" - ], - "description": "The status of a session.\n" - }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "V2SessionExtendedStatusPhases": { - "type": "object", - "description": "Detailed information on the phases of a session.\n", - "properties": { - "percent_complete": { - "type": "number", - "description": "The percent of components currently in a completed/stable state\n" - }, - "percent_powering_on": { - "type": "number", - "description": "The percent of components currently in the powering-on phase\n" - }, - "percent_powering_off": { - "type": "number", - "description": "The percent of components currently in the powering-off phase\n" - }, - "percent_configuring": { - "type": "number", - "description": "The percent of components currently in the configuring phase\n" - } - }, - "additionalProperties": false - }, - "V2SessionExtendedStatusTiming": { - "type": "object", - "description": "Detailed information on the timing of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "duration": { - "type": "string", - "description": "The current duration of the on-going session or final duration of the completed session.\n" - } - }, - "additionalProperties": false - }, - "V2SessionExtendedStatus": { - "type": "object", - "description": "Detailed information on the status of a session.\n", - "properties": { - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "managed_components_count": { - "type": "integer", - "description": "The count of components currently managed by this session\n" - }, - "phases": { - "type": "object", - "description": "Detailed information on the phases of a session.\n", - "properties": { - "percent_complete": { - "type": "number", - "description": "The percent of components currently in a completed/stable state\n" - }, - "percent_powering_on": { - "type": "number", - "description": "The percent of components currently in the powering-on phase\n" - }, - "percent_powering_off": { - "type": "number", - "description": "The percent of components currently in the powering-off phase\n" - }, - "percent_configuring": { - "type": "number", - "description": "The percent of components currently in the configuring phase\n" - } - }, - "additionalProperties": false - }, - "percent_successful": { - "type": "number", - "description": "The percent of components currently in a successful state\n" - }, - "percent_failed": { - "type": "number", - "description": "The percent of components currently in a failed state\n" - }, - "percent_staged": { - "type": "number", - "description": "The percent of components currently still staged for this session\n" - }, - "error_summary": { - "type": "object", - "description": "A summary of the errors currently listed by all components\n" - }, - "timing": { - "type": "object", - "description": "Detailed information on the timing of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "duration": { - "type": "string", - "description": "The current duration of the on-going session or final duration of the completed session.\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "V2BootArtifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "V2ComponentActualState": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "V2ComponentDesiredState": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + ], + "description": "The status of a Session." }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "V2ComponentStagedState": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { + "V2SessionStartTime": { "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + "description": "When the Session was created.", + "maxLength": 127 }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "V2ComponentLastAction": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "V2ComponentEventStats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false - }, - "V2ComponentStatus": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } - }, - "additionalProperties": false - }, - "V2Component": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { + "V2SessionEndTime": { "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", + "V2SessionStatus": { "type": "object", + "description": "Information on the status of a Session.\n", "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } }, "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", + "V2BootSet": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", "type": "object", "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - }, - "V2ComponentArray": { - "description": "An array of component states.", - "type": "array", - "items": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 }, "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 }, - "initrd": { - "type": "string", - "description": "Initrd ID" + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "path", + "type" + ] }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." + "V2SessionTemplateArray": { + "description": "An array of Session Templates.", + "type": "array", + "items": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } - }, - "V2ComponentsFilter": { - "description": "Information for patching multiple components.", - "type": "object", - "properties": { - "ids": { - "type": "string", - "description": "A comma-separated list of component IDs" - }, - "session": { - "type": "string", - "description": "A session name. All components part of this session will be patched." - } - } - }, - "V2ComponentsUpdate": { - "description": "Information for patching multiple components.", - "type": "object", - "properties": { - "patch": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", + "V2Session": { + "description": "A Session object\n\n## Link Relationships\n\n* self : The Session object\n", "type": "object", "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { + "name": { "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "tenant": { "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "operation": { "type": "string", - "description": "Initrd ID" - } + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { + "template_name": { "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n" + }, + "components": { "type": "string", - "description": "Initrd ID" - } + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", + "additionalProperties": false, + "required": [ + "name", + "operation", + "template_name" + ] + }, + "V2SessionUpdate": { + "description": "A Session update object\n\n## Link Relationships\n\n* self : The Session object\n", "type": "object", "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "components": { "type": "string", - "description": "Initrd ID" - } + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } }, "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", + }, + "V2SessionArray": { + "description": "An array of Sessions.", + "type": "array", + "items": { + "description": "A Session object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n" + }, + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "operation", + "template_name" + ] + } + }, + "V2SessionExtendedStatusPhases": { "type": "object", + "description": "Detailed information on the phases of a Session.\n", "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } + "percent_complete": { + "type": "number", + "description": "The percent of Components currently in a completed/stable state\n" + }, + "percent_powering_on": { + "type": "number", + "description": "The percent of Components currently in the powering-on phase\n" + }, + "percent_powering_off": { + "type": "number", + "description": "The percent of Components currently in the powering-off phase\n" + }, + "percent_configuring": { + "type": "number", + "description": "The percent of Components currently in the configuring phase\n" + } }, "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", + }, + "V2SessionExtendedStatusTiming": { "type": "object", + "description": "Detailed information on the timing of a Session.\n", "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "duration": { + "type": "string", + "description": "The current duration of the ongoing Session or final duration of the completed Session.\n" + } }, "additionalProperties": false - }, - "status": { - "description": "Status information for the component", + }, + "V2SessionExtendedStatus": { "type": "object", + "description": "Detailed information on the status of a Session.\n", "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "managed_components_count": { + "type": "integer", + "description": "The count of Components currently managed by this Session\n" + }, + "phases": { + "type": "object", + "description": "Detailed information on the phases of a Session.\n", + "properties": { + "percent_complete": { + "type": "number", + "description": "The percent of Components currently in a completed/stable state\n" + }, + "percent_powering_on": { + "type": "number", + "description": "The percent of Components currently in the powering-on phase\n" + }, + "percent_powering_off": { + "type": "number", + "description": "The percent of Components currently in the powering-off phase\n" + }, + "percent_configuring": { + "type": "number", + "description": "The percent of Components currently in the configuring phase\n" + } + }, + "additionalProperties": false + }, + "percent_successful": { + "type": "number", + "description": "The percent of Components currently in a successful state\n" + }, + "percent_failed": { + "type": "number", + "description": "The percent of Components currently in a failed state\n" + }, + "percent_staged": { + "type": "number", + "description": "The percent of Components currently still staged for this Session\n" + }, + "error_summary": { + "type": "object", + "description": "A summary of the errors currently listed by all Components\n" + }, + "timing": { + "type": "object", + "description": "Detailed information on the timing of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "duration": { + "type": "string", + "description": "The current duration of the ongoing Session or final duration of the completed Session.\n" + } + }, + "additionalProperties": false + } }, "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } }, - "additionalProperties": false - }, - "filters": { - "description": "Information for patching multiple components.", - "type": "object", - "properties": { - "ids": { + "V2BootArtifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "V2ComponentBssToken": { "type": "string", - "description": "A comma-separated list of component IDs" - }, - "session": { + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "V2ComponentId": { "type": "string", - "description": "A session name. All components part of this session will be patched." - } - } - } - }, - "required": [ - "patch", - "filters" - ] - }, - "V2ApplyStagedComponents": { - "description": "A list of components that should have their staged session applied.\n", - "type": "object", - "properties": { - "xnames": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "V2ApplyStagedStatus": { - "description": "A list of components that should have their staged session applied.\n", - "type": "object", - "properties": { - "succeeded": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - }, - "failed": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - }, - "ignored": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "V2Options": { - "description": "Options for the boot orchestration service.\n", - "type": "object", - "properties": { - "cleanup_completed_session_ttl": { - "type": "string", - "description": "Delete complete sessions that are older than cleanup_completed_session_ttl (in hours). 0h disables cleanup behavior." - }, - "clear_stage": { - "type": "boolean", - "description": "Allows components staged information to be cleared when the requested staging action has been started. Defaults to false." - }, - "component_actual_state_ttl": { - "type": "string", - "description": "The maximum amount of time a component's actual state is considered valid (in hours). 0h disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically." - }, - "disable_components_on_completion": { - "type": "boolean", - "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS. If false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes." - }, - "discovery_frequency": { - "type": "integer", - "description": "How frequently the BOS discovery agent syncs new components from HSM. (in seconds)" - }, - "logging_level": { - "type": "string", - "description": "The logging level for all BOS services" - }, - "max_boot_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)" - }, - "max_power_on_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)" - }, - "max_power_off_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)" - }, - "polling_frequency": { - "type": "integer", - "description": "How frequently the BOS operators check component state for needed actions. (in seconds)" - }, - "default_retry_policy": { - "type": "integer", - "description": "The default maximum number attempts per node for failed actions.", - "example": 1 - }, - "max_component_batch_size": { - "type": "integer", - "description": "The maximum number of components that a BOS operator will process at once. 0 means no limit.", - "example": 1000, - "minimum": 0, - "maximum": 131071 - }, - "session_limit_required": { - "type": "boolean", - "description": "If true, Sessions cannot be created without specifying the limit parameter." - }, - "reject_nids": { - "type": "boolean", - "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started)." - } - }, - "additionalProperties": true - } - }, - "requestBodies": { - "V2sessionCreateRequest": { - "description": "The information to create a session", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "A Session Creation object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session. The name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.", - "example": "session-20190728032600", - "minLength": 1, - "maxLength": 127, - "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\nAlternatively, the limit can be set to \"*\", which means no limit.\nThe limit parameter is required if the session_limit_required option is true. If the reject_nids option is enabled, then Session creation will fail if a Session limit appears to contain a NID value.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n", - "default": false - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n", - "default": false + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "V2ComponentIdList": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 } - }, - "required": [ - "operation", - "template_name" - ], - "additionalProperties": false - } - } - } - }, - "V2componentUpdateRequest": { - "description": "The state for a single component", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { + }, + "V2ComponentLastUpdated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "V2ComponentActualState": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false + "additionalProperties": false }, "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 }, "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true } - }, - "additionalProperties": false }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { + "additionalProperties": false + }, + "V2ComponentDesiredState": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false + "additionalProperties": false }, "configuration": { - "type": "string", - "description": "A CFS configuration ID." + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 }, "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 }, "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true } - }, - "additionalProperties": false }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { + "additionalProperties": false + }, + "V2ComponentStagedState": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false + "additionalProperties": false }, "configuration": { - "type": "string", - "description": "A CFS configuration ID." + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 }, "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." + "type": "string" }, "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true } - }, - "additionalProperties": false }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { + "additionalProperties": false + }, + "V2ComponentLastAction": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true }, "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 }, "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" } - }, - "additionalProperties": false }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { + "additionalProperties": false + }, + "V2ComponentEventStats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 }, "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 }, "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 } - }, - "additionalProperties": false }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { + "additionalProperties": false + }, + "V2ComponentPhase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "V2ComponentStatus": { + "description": "Status information for the Component", + "type": "object", + "properties": { "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 }, "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true }, "status_override": { - "type": "string", - "description": "If set, this will override the status value." + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } - } - } - }, - "V2componentsPutRequest": { - "description": "The state for an array of components", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "An array of component states.", - "type": "array", - "items": { - "description": "The current and desired artifacts state for a component.\n", + "additionalProperties": false + }, + "V2Component": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", "type": "object", "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", "type": "object", "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } }, "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", "type": "object", "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } - } - } - } - }, - "V2componentsUpdateRequest": { - "description": "The state for an array of components", - "required": true, - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "description": "Information for patching multiple components.", - "type": "object", - "properties": { - "patch": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false + "additionalProperties": false }, "configuration": { - "type": "string", - "description": "A CFS configuration ID." + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 }, "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 }, "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true } - }, - "additionalProperties": false }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false + "additionalProperties": false }, "configuration": { - "type": "string", - "description": "A CFS configuration ID." + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 }, "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." + "type": "string" }, "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true } - }, - "additionalProperties": false }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true }, "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 }, "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" } - }, - "additionalProperties": false }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 }, "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 }, "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 } - }, - "additionalProperties": false }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 }, "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true }, "status_override": { - "type": "string", - "description": "If set, this will override the status value." + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false + "additionalProperties": false }, - "filters": { - "description": "Information for patching multiple components.", - "type": "object", - "properties": { - "ids": { - "type": "string", - "description": "A comma-separated list of component IDs" - }, - "session": { - "type": "string", - "description": "A session name. All components part of this session will be patched." - } - } + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 } - }, - "required": [ - "patch", - "filters" - ] }, - { - "description": "An array of component states.", - "type": "array", - "items": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { + "additionalProperties": false, + "minProperties": 1 + }, + "V2ComponentCliUpdate": { + "description": "Component attributes that can be updated using the CLI\n", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "V2ComponentWithId": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", "type": "object", "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { "type": "string", - "description": "Initrd ID" - } + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } }, "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", "type": "object", "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { "type": "string", - "description": "Initrd ID" - } + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } }, "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", "type": "object", "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { "type": "string", - "description": "Initrd ID" - } + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } }, "additionalProperties": false - }, - "last_action": { + }, + "last_action": { "description": "Information on the most recent action taken against the node.\n", "type": "object", "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } }, "additionalProperties": false - }, - "event_stats": { + }, + "event_stats": { "description": "Information on the most recent attempt to return the node to its desired state.\n", "type": "object", "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } }, "additionalProperties": false - }, - "status": { - "description": "Status information for the component", + }, + "status": { + "description": "Status information for the Component", "type": "object", "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } }, "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } - } - ] - } - } - } - }, - "V2optionsUpdateRequest": { - "description": "Service-wide options", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "Options for the boot orchestration service.\n", - "type": "object", - "properties": { - "cleanup_completed_session_ttl": { - "type": "string", - "description": "Delete complete sessions that are older than cleanup_completed_session_ttl (in hours). 0h disables cleanup behavior." - }, - "clear_stage": { - "type": "boolean", - "description": "Allows components staged information to be cleared when the requested staging action has been started. Defaults to false." - }, - "component_actual_state_ttl": { - "type": "string", - "description": "The maximum amount of time a component's actual state is considered valid (in hours). 0h disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically." - }, - "disable_components_on_completion": { - "type": "boolean", - "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS. If false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes." - }, - "discovery_frequency": { - "type": "integer", - "description": "How frequently the BOS discovery agent syncs new components from HSM. (in seconds)" - }, - "logging_level": { - "type": "string", - "description": "The logging level for all BOS services" - }, - "max_boot_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)" - }, - "max_power_on_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)" - }, - "max_power_off_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)" - }, - "polling_frequency": { - "type": "integer", - "description": "How frequently the BOS operators check component state for needed actions. (in seconds)" - }, - "default_retry_policy": { - "type": "integer", - "description": "The default maximum number attempts per node for failed actions.", - "example": 1 - }, - "max_component_batch_size": { - "type": "integer", - "description": "The maximum number of components that a BOS operator will process at once. 0 means no limit.", - "example": 1000, - "minimum": 0, - "maximum": 131071 - }, - "reject_nids": { - "type": "boolean", - "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started)." - }, - "session_limit_required": { - "type": "boolean", - "description": "If true, Sessions cannot be created without specifying the limit parameter." - } - }, - "additionalProperties": true - } - } - } - }, - "V2sessionUpdateRequest": { - "description": "The state for a single session", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." }, "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - } - }, - "V2applyStagedRequest": { - "description": "A list of xnames that should have their staged session applied.", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "A list of components that should have their staged session applied.\n", - "type": "object", - "properties": { - "xnames": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - } - }, - "responses": { - "ServiceHealth": { - "description": "Service Health information", - "content": { - "application/json": { - "schema": { - "description": "Service health status", - "type": "object", - "properties": { - "dbStatus": { - "type": "string" - }, - "apiStatus": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "Version": { - "description": "Get version details\nThe versioning system uses [semver](https://semver.org/).\n## Link Relationships\n* self : Link to itself\n* versions : Link back to the versions resource\n", - "content": { - "application/json": { - "schema": { - "description": "Version data", - "type": "object", - "properties": { - "major": { - "type": "integer" - }, - "minor": { - "type": "integer" - }, - "patch": { - "type": "integer" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - }, - "ResourceDeleted": { - "description": "The resource was deleted." - }, - "V1SessionDetails": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "operation": { - "type": "string", - "description": "A Session represents an operation on a SessionTemplate. The creation of a session effectively results in the creation of a Kubernetes Boot Orchestration Agent (BOA) job to perform the duties required to complete the operation.\nOperation -- An operation to perform on nodes in this session.\n\n Boot Boot nodes that are off.\n\n Configure Reconfigure the nodes using the Configuration Framework\n Service (CFS).\n\n Reboot Gracefully power down nodes that are on and then power\n them back up.\n\n Shutdown Gracefully power down nodes that are on.\n", - "pattern": "^(?i)boot|configure|reboot|shutdown$" - }, - "templateUuid": { - "type": "string", - "description": "DEPRECATED - use templateName", - "example": "my-session-template", - "format": "string" - }, - "templateName": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "job": { - "type": "string", - "maxLength": 64, - "readOnly": true, - "description": "The identity of the Kubernetes job that is created to handle the session.\n", - "example": "boa-07877de1-09bb-4ca8-a4e5-943b1262dbf0" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 }, - "additionalProperties": false - } - } - }, - "required": [ - "operation" - ], - "additionalProperties": false - } - } - } - }, - "V1SessionStatus": { - "description": "A list of Boot Set Statuses and metadata", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status for a Boot Session. It is a list of all of the Boot Set Statuses in the session.\n## Link Relationships\n\n* self : The session object\n* boot sets: URL to access the Boot Set status\n", - "properties": { - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "boot_sets": { - "description": "The boot sets in the Session\n", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "id": { - "type": "string", - "description": "Session ID" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { + "session": { "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "V1SessionTemplateDetails": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which when combined with an\naction (i.e. boot, reconfigure, reboot, shutdown) will create a Kubernetes BOA job\nto complete the required tasks for the operation.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "cfs_url": { - "type": "string", - "description": "The url for the repository providing the configuration. DEPRECATED\n" - }, - "cfs_branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. DEPRECATED.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled.\n", - "properties": { - "clone_url": { - "type": "string", - "description": "The clone url for the repository providing the configuration. (DEPRECATED)\n" - }, - "branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. Mutually exclusive with commit. (DEPRECATED)\n" - }, - "commit": { - "type": "string", - "description": "The commit id of the configuration that you want to\napply to the nodes. Mutually exclusive with branch. (DEPRECATED)\n" - }, - "playbook": { - "type": "string", - "description": "The name of the playbook to run for configuration. The file path must be specified\nrelative to the base directory of the config repo. (DEPRECATED)\n" }, - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "partition": { - "type": "string", - "description": "The machine partition to operate on.\n" - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set defines a collection of nodes and the information about the\nboot artifacts and parameters to be sent to each node over the specified\nnetwork to enable these nodes to boot. When multiple boot sets are used\nin a session template, the boot_ordinal and shutdown_ordinal indicate\nthe order in which boot sets need to be acted upon. Boot sets sharing\nthe same ordinal number will be addressed at the same time.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "boot_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The boot ordinal. This will establish the order for boot set operations.\nBoot sets boot in order from the lowest to highest boot_ordinal.\n" - }, - "shutdown_ordinal": { + "retry_policy": { "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, "minimum": 0, - "description": "The shutdown ordinal. This will establish the order for boot set\nshutdown operations. Sets shutdown from low to high shutdown_ordinal.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "network": { - "type": "string", - "description": "The network over which the node will boot from.\nChoices: NMN -- Node Management Network\npattern: '^(?i)nmn$'\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "name" - ], - "additionalProperties": false - } - } - } - }, - "V2SessionTemplateDetails": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" + "maximum": 1048576 } - }, - "additionalProperties": false }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", + "additionalProperties": false, + "required": [ + "id" + ] + }, + "V2ComponentArray": { + "description": "An array of Component states.", + "type": "array", + "items": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", "type": "object", "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { + "id": { "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 }, - "minItems": 1, - "description": "The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if it contains a boot set with a node list that appears to contain a NID.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } }, "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } + "minProperties": 1 } - }, - "additionalProperties": false - } - } - } - }, - "V2SessionTemplateDetailsArray": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "description": "An array of session templates.", - "type": "array", - "items": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { + }, + "V2ComponentArrayWithIds": { + "description": "An array of Component states with associated Ids.", + "type": "array", + "items": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if it contains a boot set with a node list that appears to contain a NID.\n" + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" + "session": { + "type": "string" }, - "href": { - "type": "string" + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - } - }, - "V2SessionTemplateValidation": { - "description": "Session template validity details", - "content": { - "application/json": { - "schema": { - "description": "Message describing errors or incompleteness in a Session Template.\n", - "type": "string" - } - } - } - }, - "V2SessionDetails": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "id" + ] } - }, - "additionalProperties": false - } - } - } - }, - "V2SessionDetailsArray": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "An array of sessions.", - "type": "array", - "items": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", + }, + "V2ComponentsFilter": { + "description": "Information for patching multiple Components by listing their IDs or\nsession. Only one of the two may be specified.\n", "type": "object", "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "error": { + "ids": { "type": "string", - "description": "Error which prevented the session from running\n" - } + "description": "A comma-separated list of Component IDs.", + "minLength": 1, + "maxLength": 65535 }, - "additionalProperties": false - } + "session": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + } }, + "minProperties": 1, + "maxProperties": 1, "additionalProperties": false - } - } - } - } - }, - "V2SessionExtendedStatus": { - "description": "Session status details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "Detailed information on the status of a session.\n", - "properties": { - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "managed_components_count": { - "type": "integer", - "description": "The count of components currently managed by this session\n" - }, - "phases": { - "type": "object", - "description": "Detailed information on the phases of a session.\n", - "properties": { - "percent_complete": { - "type": "number", - "description": "The percent of components currently in a completed/stable state\n" - }, - "percent_powering_on": { - "type": "number", - "description": "The percent of components currently in the powering-on phase\n" - }, - "percent_powering_off": { - "type": "number", - "description": "The percent of components currently in the powering-off phase\n" - }, - "percent_configuring": { - "type": "number", - "description": "The percent of components currently in the configuring phase\n" - } - }, - "additionalProperties": false - }, - "percent_successful": { - "type": "number", - "description": "The percent of components currently in a successful state\n" - }, - "percent_failed": { - "type": "number", - "description": "The percent of components currently in a failed state\n" - }, - "percent_staged": { - "type": "number", - "description": "The percent of components currently still staged for this session\n" - }, - "error_summary": { - "type": "object", - "description": "A summary of the errors currently listed by all components\n" - }, - "timing": { - "type": "object", - "description": "Detailed information on the timing of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "duration": { - "type": "string", - "description": "The current duration of the on-going session or final duration of the completed session.\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - } - }, - "V2componentDetails": { - "description": "A single component state", - "content": { - "application/json": { - "schema": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + }, + "V2ComponentsUpdate": { + "description": "Information for patching multiple Components.", + "type": "object", + "properties": { + "patch": { + "description": "Component attributes that can be updated using the CLI\n", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" + "additionalProperties": false, + "minProperties": 1 }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "filters": { + "description": "Information for patching multiple Components by listing their IDs or\nsession. Only one of the two may be specified.\n", + "type": "object", + "properties": { + "ids": { + "type": "string", + "description": "A comma-separated list of Component IDs.", + "minLength": 1, + "maxLength": 65535 + }, + "session": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + } }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": false } - }, - "additionalProperties": false }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" + "required": [ + "patch", + "filters" + ], + "additionalProperties": false + }, + "V2ApplyStagedComponents": { + "description": "A list of Components that should have their staged Session applied.\n", + "type": "object", + "properties": { + "xnames": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true } - }, - "additionalProperties": false }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." + "additionalProperties": false + }, + "V2ApplyStagedStatus": { + "description": "Mapping from Component staged Session statuses to Components with that status.\n", + "type": "object", + "properties": { + "succeeded": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } }, "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." + "ignored": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } - } - } - }, - "V2componentDetailsArray": { - "description": "A collection of component states", - "content": { - "application/json": { - "schema": { - "description": "An array of component states.", - "type": "array", - "items": { - "description": "The current and desired artifacts state for a component.\n", + "additionalProperties": false + }, + "V2Options": { + "description": "Options for the Boot Orchestration Service.\n", "type": "object", "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { + "cleanup_completed_session_ttl": { "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "description": "Delete complete Sessions that are older than cleanup_completed_session_ttl (in minutes, hours, days, or weeks).\n0 disables cleanup behavior.\n", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "clear_stage": { + "type": "boolean", + "description": "Allows a Component's staged information to be cleared when the requested staging action has been started. Defaults to false." }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { + "component_actual_state_ttl": { "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "description": "The maximum amount of time a Component's actual state is considered valid (in minutes, hours, days, or weeks).\n0 disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically.\n", + "example": "6h", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { + "disable_components_on_completion": { "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } + "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS.\nIf false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes.\n" }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { + "discovery_frequency": { + "type": "integer", + "description": "How frequently the BOS discovery agent syncs new Components from HSM (in seconds)", + "minimum": 0, + "maximum": 33554432 + }, + "logging_level": { + "type": "string", + "description": "The logging level for all BOS services", + "pattern": "^([dD][eE][bB][uU][gG]|[iI][nN][fF][oO]|[wW][aA][rR][nN][iI][nN][gG]|[eE][rR][rR][oO][rR]|[cC][rR][iI][tT][iI][cC][aA][lL])$" + }, + "max_boot_wait_time": { "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { + "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_on_wait_time": { "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { + "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_off_wait_time": { "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } + "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)", + "minimum": 0, + "maximum": 1048576 }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } + "polling_frequency": { + "type": "integer", + "description": "How frequently the BOS operators check Component state for needed actions (in seconds)", + "minimum": 0, + "maximum": 1048576 }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } - } - } - } - }, - "V2applyStagedResponse": { - "description": "A list of xnames that should have their staged session applied.", - "content": { - "application/json": { - "schema": { - "description": "A list of components that should have their staged session applied.\n", - "type": "object", - "properties": { - "succeeded": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - }, - "failed": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - }, - "ignored": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - } - } - }, - "V2options": { - "description": "A collection of service-wide options", - "content": { - "application/json": { - "schema": { - "description": "Options for the boot orchestration service.\n", - "type": "object", - "properties": { - "cleanup_completed_session_ttl": { - "type": "string", - "description": "Delete complete sessions that are older than cleanup_completed_session_ttl (in hours). 0h disables cleanup behavior." - }, - "clear_stage": { - "type": "boolean", - "description": "Allows components staged information to be cleared when the requested staging action has been started. Defaults to false." - }, - "component_actual_state_ttl": { - "type": "string", - "description": "The maximum amount of time a component's actual state is considered valid (in hours). 0h disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically." - }, - "disable_components_on_completion": { - "type": "boolean", - "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS. If false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes." - }, - "discovery_frequency": { - "type": "integer", - "description": "How frequently the BOS discovery agent syncs new components from HSM. (in seconds)" - }, - "logging_level": { - "type": "string", - "description": "The logging level for all BOS services" - }, - "max_boot_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)" - }, - "max_power_on_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)" - }, - "max_power_off_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)" - }, - "polling_frequency": { - "type": "integer", - "description": "How frequently the BOS operators check component state for needed actions. (in seconds)" - }, - "default_retry_policy": { - "type": "integer", - "description": "The default maximum number attempts per node for failed actions.", - "example": 1 - }, - "max_component_batch_size": { - "type": "integer", - "description": "The maximum number of components that a BOS operator will process at once. 0 means no limit.", - "example": 1000, - "minimum": 0, - "maximum": 131071 - }, - "reject_nids": { - "type": "boolean", - "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started)." + "default_retry_policy": { + "type": "integer", + "description": "The default maximum number attempts per node for failed actions.", + "example": 1, + "minimum": 0, + "maximum": 1048576 + }, + "max_component_batch_size": { + "type": "integer", + "description": "The maximum number of Components that a BOS operator will process at once. 0 means no limit.", + "example": 1000, + "minimum": 0, + "maximum": 131071 + }, + "reject_nids": { + "type": "boolean", + "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started).\n" + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, Sessions cannot be created without specifying the limit parameter." + } }, - "session_limit_required": { - "type": "boolean", - "description": "If true, Sessions cannot be created without specifying the limit parameter." - } - }, - "additionalProperties": true + "additionalProperties": true, + "minProperties": 1, + "maxProperties": 1024 } - } - } - }, - "BadRequest": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "ResourceNotFound": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "ServiceUnavailable": { - "description": "Service Unavailable", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "InternalError": { - "description": "An Internal Server Error occurred handling the request.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "paths": { - "/": { - "get": { - "summary": "Get API versions", - "description": "Return list of versions currently running.", - "tags": [ - "version" - ], - "x-openapi-router-controller": "bos.server.controllers.base", - "responses": { - "200": { - "description": "Get version details\nThe versioning system uses [semver](https://semver.org/).\n## Link Relationships\n* self : Link to itself\n* versions : Link back to the versions resource\n", - "content": { - "application/json": { - "schema": { - "description": "Version data", - "type": "object", - "properties": { - "major": { - "type": "integer" - }, - "minor": { - "type": "integer" - }, - "patch": { - "type": "integer" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v1": { - "get": { - "summary": "Get API version", - "tags": [ - "version" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.base", - "operationId": "v1_get", - "responses": { - "200": { - "description": "Get version details\nThe versioning system uses [semver](https://semver.org/).\n## Link Relationships\n* self : Link to itself\n* versions : Link back to the versions resource\n", - "content": { - "application/json": { - "schema": { - "description": "Version data", - "type": "object", - "properties": { - "major": { - "type": "integer" - }, - "minor": { - "type": "integer" - }, - "patch": { - "type": "integer" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - }, - "500": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v1/healthz": { - "get": { - "summary": "Get service health details", - "tags": [ - "healthz" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.healthz", - "operationId": "v1_get_healthz", - "description": "Get bos health details.", - "responses": { - "200": { - "description": "Service Health information", - "content": { - "application/json": { - "schema": { - "description": "Service health status", - "type": "object", - "properties": { - "dbStatus": { - "type": "string" - }, - "apiStatus": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "500": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "503": { - "description": "Service Unavailable", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v1/sessiontemplate": { - "post": { - "summary": "Create session template", - "tags": [ - "sessiontemplate" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.sessiontemplate", - "operationId": "create_v1_sessiontemplate", - "description": "Create a new session template.", - "requestBody": { - "description": "A JSON object for creating a session template", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which when combined with an\naction (i.e. boot, reconfigure, reboot, shutdown) will create a Kubernetes BOA job\nto complete the required tasks for the operation.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "cfs_url": { - "type": "string", - "description": "The url for the repository providing the configuration. DEPRECATED\n" - }, - "cfs_branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. DEPRECATED.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled.\n", - "properties": { - "clone_url": { - "type": "string", - "description": "The clone url for the repository providing the configuration. (DEPRECATED)\n" - }, - "branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. Mutually exclusive with commit. (DEPRECATED)\n" - }, - "commit": { - "type": "string", - "description": "The commit id of the configuration that you want to\napply to the nodes. Mutually exclusive with branch. (DEPRECATED)\n" - }, - "playbook": { - "type": "string", - "description": "The name of the playbook to run for configuration. The file path must be specified\nrelative to the base directory of the config repo. (DEPRECATED)\n" - }, - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "partition": { - "type": "string", - "description": "The machine partition to operate on.\n" - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set defines a collection of nodes and the information about the\nboot artifacts and parameters to be sent to each node over the specified\nnetwork to enable these nodes to boot. When multiple boot sets are used\nin a session template, the boot_ordinal and shutdown_ordinal indicate\nthe order in which boot sets need to be acted upon. Boot sets sharing\nthe same ordinal number will be addressed at the same time.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "boot_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The boot ordinal. This will establish the order for boot set operations.\nBoot sets boot in order from the lowest to highest boot_ordinal.\n" - }, - "shutdown_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The shutdown ordinal. This will establish the order for boot set\nshutdown operations. Sets shutdown from low to high shutdown_ordinal.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "network": { - "type": "string", - "description": "The network over which the node will boot from.\nChoices: NMN -- Node Management Network\npattern: '^(?i)nmn$'\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "name" - ], - "additionalProperties": false - } - } - } - }, - "responses": { - "200": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which when combined with an\naction (i.e. boot, reconfigure, reboot, shutdown) will create a Kubernetes BOA job\nto complete the required tasks for the operation.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "cfs_url": { - "type": "string", - "description": "The url for the repository providing the configuration. DEPRECATED\n" - }, - "cfs_branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. DEPRECATED.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled.\n", - "properties": { - "clone_url": { - "type": "string", - "description": "The clone url for the repository providing the configuration. (DEPRECATED)\n" - }, - "branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. Mutually exclusive with commit. (DEPRECATED)\n" - }, - "commit": { - "type": "string", - "description": "The commit id of the configuration that you want to\napply to the nodes. Mutually exclusive with branch. (DEPRECATED)\n" - }, - "playbook": { - "type": "string", - "description": "The name of the playbook to run for configuration. The file path must be specified\nrelative to the base directory of the config repo. (DEPRECATED)\n" - }, - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "partition": { - "type": "string", - "description": "The machine partition to operate on.\n" - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set defines a collection of nodes and the information about the\nboot artifacts and parameters to be sent to each node over the specified\nnetwork to enable these nodes to boot. When multiple boot sets are used\nin a session template, the boot_ordinal and shutdown_ordinal indicate\nthe order in which boot sets need to be acted upon. Boot sets sharing\nthe same ordinal number will be addressed at the same time.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "boot_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The boot ordinal. This will establish the order for boot set operations.\nBoot sets boot in order from the lowest to highest boot_ordinal.\n" - }, - "shutdown_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The shutdown ordinal. This will establish the order for boot set\nshutdown operations. Sets shutdown from low to high shutdown_ordinal.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "network": { - "type": "string", - "description": "The network over which the node will boot from.\nChoices: NMN -- Node Management Network\npattern: '^(?i)nmn$'\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "name" - ], - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "get": { - "summary": "List session templates", - "description": "List all session templates. Session templates are\nuniquely identified by the name.\n", - "tags": [ - "sessiontemplate" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.sessiontemplate", - "operationId": "get_v1_sessiontemplates", - "responses": { - "200": { - "description": "A collection of SessionTemplates", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which when combined with an\naction (i.e. boot, reconfigure, reboot, shutdown) will create a Kubernetes BOA job\nto complete the required tasks for the operation.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "cfs_url": { - "type": "string", - "description": "The url for the repository providing the configuration. DEPRECATED\n" - }, - "cfs_branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. DEPRECATED.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled.\n", - "properties": { - "clone_url": { - "type": "string", - "description": "The clone url for the repository providing the configuration. (DEPRECATED)\n" - }, - "branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. Mutually exclusive with commit. (DEPRECATED)\n" - }, - "commit": { - "type": "string", - "description": "The commit id of the configuration that you want to\napply to the nodes. Mutually exclusive with branch. (DEPRECATED)\n" - }, - "playbook": { - "type": "string", - "description": "The name of the playbook to run for configuration. The file path must be specified\nrelative to the base directory of the config repo. (DEPRECATED)\n" - }, - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "partition": { - "type": "string", - "description": "The machine partition to operate on.\n" - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set defines a collection of nodes and the information about the\nboot artifacts and parameters to be sent to each node over the specified\nnetwork to enable these nodes to boot. When multiple boot sets are used\nin a session template, the boot_ordinal and shutdown_ordinal indicate\nthe order in which boot sets need to be acted upon. Boot sets sharing\nthe same ordinal number will be addressed at the same time.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "boot_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The boot ordinal. This will establish the order for boot set operations.\nBoot sets boot in order from the lowest to highest boot_ordinal.\n" - }, - "shutdown_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The shutdown ordinal. This will establish the order for boot set\nshutdown operations. Sets shutdown from low to high shutdown_ordinal.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "network": { - "type": "string", - "description": "The network over which the node will boot from.\nChoices: NMN -- Node Management Network\npattern: '^(?i)nmn$'\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "name" - ], - "additionalProperties": false - } - } - } - } - } - } - } - }, - "/v1/sessiontemplate/{session_template_id}": { - "parameters": [ - { - "name": "session_template_id", - "in": "path", - "description": "Session Template ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "summary": "Get session template by id", - "description": "Get session template by session_template_id.\nThe session_template_id corresponds to the *name*\nof the session template.\n", - "tags": [ - "sessiontemplate" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.sessiontemplate", - "operationId": "get_v1_sessiontemplate", - "responses": { - "200": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which when combined with an\naction (i.e. boot, reconfigure, reboot, shutdown) will create a Kubernetes BOA job\nto complete the required tasks for the operation.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "cfs_url": { - "type": "string", - "description": "The url for the repository providing the configuration. DEPRECATED\n" - }, - "cfs_branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. DEPRECATED.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled.\n", - "properties": { - "clone_url": { - "type": "string", - "description": "The clone url for the repository providing the configuration. (DEPRECATED)\n" - }, - "branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. Mutually exclusive with commit. (DEPRECATED)\n" - }, - "commit": { - "type": "string", - "description": "The commit id of the configuration that you want to\napply to the nodes. Mutually exclusive with branch. (DEPRECATED)\n" - }, - "playbook": { - "type": "string", - "description": "The name of the playbook to run for configuration. The file path must be specified\nrelative to the base directory of the config repo. (DEPRECATED)\n" - }, - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "partition": { - "type": "string", - "description": "The machine partition to operate on.\n" - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set defines a collection of nodes and the information about the\nboot artifacts and parameters to be sent to each node over the specified\nnetwork to enable these nodes to boot. When multiple boot sets are used\nin a session template, the boot_ordinal and shutdown_ordinal indicate\nthe order in which boot sets need to be acted upon. Boot sets sharing\nthe same ordinal number will be addressed at the same time.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "boot_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The boot ordinal. This will establish the order for boot set operations.\nBoot sets boot in order from the lowest to highest boot_ordinal.\n" - }, - "shutdown_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The shutdown ordinal. This will establish the order for boot set\nshutdown operations. Sets shutdown from low to high shutdown_ordinal.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "network": { - "type": "string", - "description": "The network over which the node will boot from.\nChoices: NMN -- Node Management Network\npattern: '^(?i)nmn$'\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "name" - ], - "additionalProperties": false - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "delete": { - "summary": "Delete a session template", - "description": "Delete a session template.", - "tags": [ - "sessiontemplate" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.sessiontemplate", - "operationId": "delete_v1_sessiontemplate", - "responses": { - "204": { - "description": "The resource was deleted." - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v1/sessiontemplatetemplate": { - "get": { - "summary": "Get an example session template.", - "description": "Returns a skeleton of a session template, which can be\nused as a starting point for users creating their own\nsession templates.\n", - "tags": [ - "sessiontemplate" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.sessiontemplate", - "operationId": "get_v1_sessiontemplatetemplate", - "responses": { - "200": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which when combined with an\naction (i.e. boot, reconfigure, reboot, shutdown) will create a Kubernetes BOA job\nto complete the required tasks for the operation.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "cfs_url": { - "type": "string", - "description": "The url for the repository providing the configuration. DEPRECATED\n" - }, - "cfs_branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. DEPRECATED.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled.\n", - "properties": { - "clone_url": { - "type": "string", - "description": "The clone url for the repository providing the configuration. (DEPRECATED)\n" - }, - "branch": { - "type": "string", - "description": "The name of the branch containing the configuration that you want to\napply to the nodes. Mutually exclusive with commit. (DEPRECATED)\n" - }, - "commit": { - "type": "string", - "description": "The commit id of the configuration that you want to\napply to the nodes. Mutually exclusive with branch. (DEPRECATED)\n" - }, - "playbook": { - "type": "string", - "description": "The name of the playbook to run for configuration. The file path must be specified\nrelative to the base directory of the config repo. (DEPRECATED)\n" - }, - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "partition": { - "type": "string", - "description": "The machine partition to operate on.\n" - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set defines a collection of nodes and the information about the\nboot artifacts and parameters to be sent to each node over the specified\nnetwork to enable these nodes to boot. When multiple boot sets are used\nin a session template, the boot_ordinal and shutdown_ordinal indicate\nthe order in which boot sets need to be acted upon. Boot sets sharing\nthe same ordinal number will be addressed at the same time.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "boot_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The boot ordinal. This will establish the order for boot set operations.\nBoot sets boot in order from the lowest to highest boot_ordinal.\n" - }, - "shutdown_ordinal": { - "type": "integer", - "minimum": 0, - "description": "The shutdown ordinal. This will establish the order for boot set\nshutdown operations. Sets shutdown from low to high shutdown_ordinal.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "network": { - "type": "string", - "description": "The network over which the node will boot from.\nChoices: NMN -- Node Management Network\npattern: '^(?i)nmn$'\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list. This is an explicit mapping against hardware xnames.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "name" - ], - "additionalProperties": false - } - } - } - } - } - } - }, - "/v1/session": { - "post": { - "summary": "Create a session", - "description": "The creation of a session performs the operation\nspecified in the SessionCreateRequest\non the boot set(s) defined in the session template.\n", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.session", - "operationId": "create_v1_session", - "requestBody": { - "description": "A JSON object for creating a Session", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "operation": { - "type": "string", - "description": "A Session represents an operation on a SessionTemplate. The creation of a session effectively results in the creation of a Kubernetes Boot Orchestration Agent (BOA) job to perform the duties required to complete the operation.\nOperation -- An operation to perform on nodes in this session.\n\n Boot Boot nodes that are off.\n\n Configure Reconfigure the nodes using the Configuration Framework\n Service (CFS).\n\n Reboot Gracefully power down nodes that are on and then power\n them back up.\n\n Shutdown Gracefully power down nodes that are on.\n", - "pattern": "^(?i)boot|configure|reboot|shutdown$" - }, - "templateUuid": { - "type": "string", - "description": "DEPRECATED - use templateName", - "example": "my-session-template", - "format": "string" - }, - "templateName": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "job": { - "type": "string", - "maxLength": 64, - "readOnly": true, - "description": "The identity of the Kubernetes job that is created to handle the session.\n", - "example": "boa-07877de1-09bb-4ca8-a4e5-943b1262dbf0" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "operation" - ], - "additionalProperties": false - } - } - } - }, - "responses": { - "200": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "operation": { - "type": "string", - "description": "A Session represents an operation on a SessionTemplate. The creation of a session effectively results in the creation of a Kubernetes Boot Orchestration Agent (BOA) job to perform the duties required to complete the operation.\nOperation -- An operation to perform on nodes in this session.\n\n Boot Boot nodes that are off.\n\n Configure Reconfigure the nodes using the Configuration Framework\n Service (CFS).\n\n Reboot Gracefully power down nodes that are on and then power\n them back up.\n\n Shutdown Gracefully power down nodes that are on.\n", - "pattern": "^(?i)boot|configure|reboot|shutdown$" - }, - "templateUuid": { - "type": "string", - "description": "DEPRECATED - use templateName", - "example": "my-session-template", - "format": "string" - }, - "templateName": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "job": { - "type": "string", - "maxLength": 64, - "readOnly": true, - "description": "The identity of the Kubernetes job that is created to handle the session.\n", - "example": "boa-07877de1-09bb-4ca8-a4e5-943b1262dbf0" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "operation" - ], - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "get": { - "summary": "List sessions", - "description": "List all sessions, including those in progress and those complete.\n", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.session", - "operationId": "get_v1_sessions", - "responses": { - "200": { - "description": "A collection of Sessions", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "operation": { - "type": "string", - "description": "A Session represents an operation on a SessionTemplate. The creation of a session effectively results in the creation of a Kubernetes Boot Orchestration Agent (BOA) job to perform the duties required to complete the operation.\nOperation -- An operation to perform on nodes in this session.\n\n Boot Boot nodes that are off.\n\n Configure Reconfigure the nodes using the Configuration Framework\n Service (CFS).\n\n Reboot Gracefully power down nodes that are on and then power\n them back up.\n\n Shutdown Gracefully power down nodes that are on.\n", - "pattern": "^(?i)boot|configure|reboot|shutdown$" - }, - "templateUuid": { - "type": "string", - "description": "DEPRECATED - use templateName", - "example": "my-session-template", - "format": "string" - }, - "templateName": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "job": { - "type": "string", - "maxLength": 64, - "readOnly": true, - "description": "The identity of the Kubernetes job that is created to handle the session.\n", - "example": "boa-07877de1-09bb-4ca8-a4e5-943b1262dbf0" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "operation" - ], - "additionalProperties": false - } - } - } - } - } - } - } - }, - "/v1/session/{session_id}": { - "get": { - "summary": "Get session details by id", - "description": "Get session details by session_id.", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.session", - "operationId": "get_v1_session", - "responses": { - "200": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "operation": { - "type": "string", - "description": "A Session represents an operation on a SessionTemplate. The creation of a session effectively results in the creation of a Kubernetes Boot Orchestration Agent (BOA) job to perform the duties required to complete the operation.\nOperation -- An operation to perform on nodes in this session.\n\n Boot Boot nodes that are off.\n\n Configure Reconfigure the nodes using the Configuration Framework\n Service (CFS).\n\n Reboot Gracefully power down nodes that are on and then power\n them back up.\n\n Shutdown Gracefully power down nodes that are on.\n", - "pattern": "^(?i)boot|configure|reboot|shutdown$" - }, - "templateUuid": { - "type": "string", - "description": "DEPRECATED - use templateName", - "example": "my-session-template", - "format": "string" - }, - "templateName": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "job": { - "type": "string", - "maxLength": 64, - "readOnly": true, - "description": "The identity of the Kubernetes job that is created to handle the session.\n", - "example": "boa-07877de1-09bb-4ca8-a4e5-943b1262dbf0" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "required": [ - "operation" - ], - "additionalProperties": false - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "delete": { - "summary": "Delete session by id", - "description": "Delete session by session_id.", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.session", - "operationId": "delete_v1_session", - "responses": { - "204": { - "description": "The resource was deleted." - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/v1/session/{session_id}/status": { - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "summary": "A list of the statuses for the different boot sets.", - "description": "A list of the statuses for the different boot sets.\n", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "get_v1_session_status", - "responses": { - "200": { - "description": "A list of Boot Set Statuses and metadata", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status for a Boot Session. It is a list of all of the Boot Set Statuses in the session.\n## Link Relationships\n\n* self : The session object\n* boot sets: URL to access the Boot Set status\n", - "properties": { - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "boot_sets": { - "description": "The boot sets in the Session\n", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "id": { - "type": "string", - "description": "Session ID" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "post": { - "summary": "Create the initial session status", - "description": "Creates the initial session status.\n", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "create_v1_session_status", - "requestBody": { - "description": "A JSON object for creating the status for a session", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status for a Boot Session. It is a list of all of the Boot Set Statuses in the session.\n## Link Relationships\n\n* self : The session object\n* boot sets: URL to access the Boot Set status\n", - "properties": { - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "boot_sets": { - "description": "The boot sets in the Session\n", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "id": { - "type": "string", - "description": "Session ID" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "responses": { - "204": { - "description": "A list of Boot Set Statuses and metadata", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status for a Boot Session. It is a list of all of the Boot Set Statuses in the session.\n## Link Relationships\n\n* self : The session object\n* boot sets: URL to access the Boot Set status\n", - "properties": { - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "boot_sets": { - "description": "The boot sets in the Session\n", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "id": { - "type": "string", - "description": "Session ID" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "patch": { - "summary": "Update the session status", - "description": "Update the session status. You can update the start or stop times.\n", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "update_v1_session_status", - "requestBody": { - "description": "A JSON object for updating the status for a session", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - } - } - } - }, - "responses": { - "200": { - "description": "A list of Boot Set Statuses and metadata", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status for a Boot Session. It is a list of all of the Boot Set Statuses in the session.\n## Link Relationships\n\n* self : The session object\n* boot sets: URL to access the Boot Set status\n", - "properties": { - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "boot_sets": { - "description": "The boot sets in the Session\n", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "id": { - "type": "string", - "description": "Session ID" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "404": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "delete": { - "summary": "Delete the session status", - "description": "Deletes an existing Session status\n", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "delete_v1_session_status", - "responses": { - "204": { - "description": "The resource was deleted." - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v1/session/{session_id}/status/{boot_set_name}": { - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "boot_set_name", - "in": "path", - "description": "Boot set name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "summary": "Get the status for a boot set.", - "description": "Get the status for a boot set.", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "get_v1_session_status_by_bootset", - "responses": { - "200": { - "description": "A list of the Phase Statuses for the Boot Set and metadata", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status for a Boot Set. It as a list of the phase statuses for the Boot Set.\n\n## Link Relationships\n\n* self : The session object\n* phase : A phase of the boot set\n", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "description": "Name of the Boot Set", - "example": "Boot-Set" - }, - "session": { - "type": "string", - "description": "Session ID", - "example": "Session-ID" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "phases": { - "type": "array", - "items": { - "type": "object", - "description": "The phase's status. It is a list of all of the nodes in the phase and\nwhat category those nodes fall into within the phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase\n", - "example": "Boot", - "pattern": "^(?i)boot|configure|shutdown$" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "categories": { - "type": "array", - "items": { - "type": "object", - "description": "A list of the nodes in a given category within a phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase Category\n", - "example": "Succeeded", - "pattern": "^(?i)not_started|in_progress|succeeded|failed|excluded$" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - }, - "errors": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - } - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "post": { - "summary": "Create a Boot Set Status", - "description": "Create a status for a Boot Set\n", - "tags": [ - "session", - "status" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "create_v1_boot_set_status", - "requestBody": { - "description": "A JSON object for creating a status for a Boot Set", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status for a Boot Set. It as a list of the phase statuses for the Boot Set.\n\n## Link Relationships\n\n* self : The session object\n* phase : A phase of the boot set\n", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "description": "Name of the Boot Set", - "example": "Boot-Set" - }, - "session": { - "type": "string", - "description": "Session ID", - "example": "Session-ID" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "phases": { - "type": "array", - "items": { - "type": "object", - "description": "The phase's status. It is a list of all of the nodes in the phase and\nwhat category those nodes fall into within the phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase\n", - "example": "Boot", - "pattern": "^(?i)boot|configure|shutdown$" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "categories": { - "type": "array", - "items": { - "type": "object", - "description": "A list of the nodes in a given category within a phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase Category\n", - "example": "Succeeded", - "pattern": "^(?i)not_started|in_progress|succeeded|failed|excluded$" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - }, - "errors": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - } - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "responses": { - "201": { - "description": "The created Boot Set status", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status for a Boot Set. It as a list of the phase statuses for the Boot Set.\n\n## Link Relationships\n\n* self : The session object\n* phase : A phase of the boot set\n", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "description": "Name of the Boot Set", - "example": "Boot-Set" - }, - "session": { - "type": "string", - "description": "Session ID", - "example": "Session-ID" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "phases": { - "type": "array", - "items": { - "type": "object", - "description": "The phase's status. It is a list of all of the nodes in the phase and\nwhat category those nodes fall into within the phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase\n", - "example": "Boot", - "pattern": "^(?i)boot|configure|shutdown$" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "categories": { - "type": "array", - "items": { - "type": "object", - "description": "A list of the nodes in a given category within a phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase Category\n", - "example": "Succeeded", - "pattern": "^(?i)not_started|in_progress|succeeded|failed|excluded$" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - }, - "errors": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - } - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - } - } - }, - "patch": { - "summary": "Update the status.", - "description": "This will change the status for one or more nodes within\nthe boot set.\n", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "update_v1_session_status_by_bootset", - "requestBody": { - "description": "A JSON object for updating the status for a session", - "required": true, - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "description": "This is the payload sent during an update request. It contains\nupdates to which categories nodes are in.\n", - "type": "array", - "items": { - "type": "object", - "properties": { - "update_type": { - "description": "The type of update data", - "pattern": "NodeChangeList", - "type": "string" - }, - "phase": { - "description": "The phase that this data belongs to. If blank, it belongs to\nthe Boot Set itself, which only applies to the GenericMetadata type.\n", - "pattern": "(?i)shutdown|boot|configure", - "type": "string" - }, - "data": { - "type": "object", - "description": "The information used to update the status of a node list. It moves nodes from\none category to another within a phase.\n", - "properties": { - "phase": { - "type": "string", - "example": "Boot" - }, - "source": { - "type": "string", - "example": "in_progress" - }, - "destination": { - "type": "string", - "example": "Succeeded" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "phase", - "source", - "destination", - "node_list" - ] - } - } - } - }, - { - "description": "This is the payload sent during an update request. It contains\nupdates to which errors have occurred and which nodes encountered those errors\n", - "type": "array", - "items": { - "type": "object", - "properties": { - "update_type": { - "description": "The type of update data", - "pattern": "NodeErrorsList", - "type": "string" - }, - "phase": { - "description": "The phase that this data belongs to. If blank, it belongs to\nthe Boot Set itself, which only applies to the GenericMetadata type.\n", - "pattern": "(?i)shutdown|boot|configure", - "type": "string" - }, - "data": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - } - }, - { - "description": "This is the payload sent during an update request. It contains\nupdates to metadata, specifically start and stop times\n", - "type": "array", - "items": { - "type": "object", - "properties": { - "update_type": { - "description": "The type of update data", - "pattern": "GenericMetadata", - "type": "string" - }, - "phase": { - "description": "The phase that this data belongs to. If the phase is boot_set, it belongs to\nthe Boot Set itself, which only applies to the GenericMetadata type.\n", - "pattern": "(?i)shutdown|boot|configure|boot_set", - "type": "string" - }, - "data": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - } - } - } - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "A list of Boot Set Statuses and metadata", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The status for a Boot Set. It as a list of the phase statuses for the Boot Set.\n\n## Link Relationships\n\n* self : The session object\n* phase : A phase of the boot set\n", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "description": "Name of the Boot Set", - "example": "Boot-Set" - }, - "session": { - "type": "string", - "description": "Session ID", - "example": "Session-ID" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "phases": { - "type": "array", - "items": { - "type": "object", - "description": "The phase's status. It is a list of all of the nodes in the phase and\nwhat category those nodes fall into within the phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase\n", - "example": "Boot", - "pattern": "^(?i)boot|configure|shutdown$" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "categories": { - "type": "array", - "items": { - "type": "object", - "description": "A list of the nodes in a given category within a phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase Category\n", - "example": "Succeeded", - "pattern": "^(?i)not_started|in_progress|succeeded|failed|excluded$" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - }, - "errors": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - } - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "delete": { - "summary": "Delete the Boot Set status", - "description": "Deletes an existing Boot Set status\n", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "delete_v1_boot_set_status", - "responses": { - "204": { - "description": "The resource was deleted." - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v1/session/{session_id}/status/{boot_set_name}/{phase_name}": { - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "boot_set_name", - "in": "path", - "description": "Boot set name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "phase_name", - "in": "path", - "description": "The phase name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "summary": "Get the status for a specific boot set and phase.", - "description": "Get the status for a specific boot set and phase.", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "get_v1_session_status_by_bootset_and_phase", - "responses": { - "200": { - "description": "A list of the nodes in the Phase and Category", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "The phase's status. It is a list of all of the nodes in the phase and\nwhat category those nodes fall into within the phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase\n", - "example": "Boot", - "pattern": "^(?i)boot|configure|shutdown$" - }, - "metadata": { - "type": "object", - "description": "The status metadata\n", - "properties": { - "start_time": { - "type": "string", - "description": "The start time\n", - "example": "2020-04-24T12:00" - }, - "stop_time": { - "type": "string", - "description": "The stop time\n", - "example": "2020-04-24T12:00" - }, - "complete": { - "type": "boolean", - "description": "Is the object's status complete\n", - "example": true - }, - "in_progress": { - "type": "boolean", - "description": "Is the object still doing something\n", - "example": false - }, - "error_count": { - "type": "integer", - "description": "How many errors were encountered\n", - "example": 0 - } - }, - "additionalProperties": false - }, - "categories": { - "type": "array", - "items": { - "type": "object", - "description": "A list of the nodes in a given category within a phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase Category\n", - "example": "Succeeded", - "pattern": "^(?i)not_started|in_progress|succeeded|failed|excluded$" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - }, - "errors": { - "type": "object", - "description": "Categorizing nodes into failures by the type of error they have.\nThis is an additive characterization. Nodes will be added to existing errors.\nThis does not overwrite previously existing errors.\n", - "additionalProperties": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v1/session/{session_id}/status/{boot_set_name}/{phase_name}/{category_name}": { - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "boot_set_name", - "in": "path", - "description": "Boot set name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "phase_name", - "in": "path", - "description": "The phase name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "category_name", - "in": "path", - "description": "The category name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "summary": "Get the status for a specific boot set, phase, and category.", - "description": "Get the status for a specific boot set, phase, and category.", - "tags": [ - "session" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.status", - "operationId": "get_v1_session_status_by_bootset_and_phase_and_category", - "responses": { - "200": { - "description": "A list of the nodes in the Phase and Category", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A list of the nodes in a given category within a phase.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the Phase Category\n", - "example": "Succeeded", - "pattern": "^(?i)not_started|in_progress|succeeded|failed|excluded$" - }, - "node_list": { - "type": "array", - "items": { - "type": "string", - "example": [ - "x3000c0s19b1n0", - "x3000c0s19b2n0" - ] - } - } - } - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v1/version": { - "get": { - "summary": "Get API version", - "tags": [ - "version" - ], - "x-openapi-router-controller": "bos.server.controllers.v1.base", - "operationId": "v1_get_version", - "responses": { - "200": { - "description": "Get version details\nThe versioning system uses [semver](https://semver.org/).\n## Link Relationships\n* self : Link to itself\n* versions : Link back to the versions resource\n", - "content": { - "application/json": { - "schema": { - "description": "Version data", - "type": "object", - "properties": { - "major": { - "type": "integer" - }, - "minor": { - "type": "integer" - }, - "patch": { - "type": "integer" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - }, - "500": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v2": { - "get": { - "summary": "Get API version", - "tags": [ - "v2", - "version" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.base", - "operationId": "get_v2", - "responses": { - "200": { - "description": "Get version details\nThe versioning system uses [semver](https://semver.org/).\n## Link Relationships\n* self : Link to itself\n* versions : Link back to the versions resource\n", - "content": { - "application/json": { - "schema": { - "description": "Version data", - "type": "object", - "properties": { - "major": { - "type": "integer" - }, - "minor": { - "type": "integer" - }, - "patch": { - "type": "integer" - }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - }, - "500": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v2/healthz": { - "get": { - "summary": "Get service health details", - "tags": [ - "v2", - "healthz" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.healthz", - "operationId": "get_v2_healthz", - "description": "Get bos health details.", - "responses": { - "200": { - "description": "Service Health information", - "content": { - "application/json": { - "schema": { - "description": "Service health status", - "type": "object", - "properties": { - "dbStatus": { - "type": "string" - }, - "apiStatus": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "500": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "503": { - "description": "Service Unavailable", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v2/sessiontemplates": { - "get": { - "summary": "List session templates", - "description": "List all session templates. Session templates are\nuniquely identified by the name.\n", - "tags": [ - "v2", - "sessiontemplates" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", - "operationId": "get_v2_sessiontemplates", - "responses": { - "200": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "description": "An array of session templates.", - "type": "array", - "items": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if it contains a boot set with a node list that appears to contain a NID.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - } - } - } - } - }, - "/v2/sessiontemplatesvalid/{session_template_id}": { - "parameters": [ - { - "name": "session_template_id", - "in": "path", - "description": "Session Template ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "summary": "Validate the session template by id", - "description": "Validate session template by session_template_id.\nThe session_template_id corresponds to the *name*\nof the session template.\n", - "tags": [ - "v2", - "sessiontemplatess" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", - "operationId": "validate_v2_sessiontemplate", - "responses": { - "200": { - "description": "Session template validity details", - "content": { - "application/json": { - "schema": { - "description": "Message describing errors or incompleteness in a Session Template.\n", - "type": "string" - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v2/sessiontemplates/{session_template_id}": { - "parameters": [ - { - "name": "session_template_id", - "in": "path", - "description": "Session Template ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "summary": "Get session template by id", - "description": "Get session template by session_template_id.\nThe session_template_id corresponds to the *name*\nof the session template.\n", - "tags": [ - "v2", - "sessiontemplatess" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", - "operationId": "get_v2_sessiontemplate", - "responses": { - "200": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if it contains a boot set with a node list that appears to contain a NID.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "put": { - "summary": "Create session template", - "tags": [ - "v2", - "sessiontemplates" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", - "operationId": "put_v2_sessiontemplate", - "description": "Create a new session template.", - "requestBody": { - "description": "A JSON object for creating a session template", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if it contains a boot set with a node list that appears to contain a NID.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - }, - "responses": { - "200": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if it contains a boot set with a node list that appears to contain a NID.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "patch": { - "summary": "Update a session template", - "tags": [ - "v2", - "sessiontemplates" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", - "operationId": "patch_v2_sessiontemplate", - "requestBody": { - "description": "A JSON object for updating a session template", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if it contains a boot set with a node list that appears to contain a NID.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - }, - "responses": { - "200": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if it contains a boot set with a node list that appears to contain a NID.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "delete": { - "summary": "Delete a session template", - "description": "Delete a session template.", - "tags": [ - "v2", - "sessiontemplates" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", - "operationId": "delete_v2_sessiontemplate", - "responses": { - "204": { - "description": "The resource was deleted." - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v2/sessiontemplatetemplate": { - "get": { - "summary": "Get an example session template.", - "description": "Returns a skeleton of a session template, which can be\nused as a starting point for users creating their own\nsession templates.\n", - "tags": [ - "v2", - "sessiontemplates" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", - "operationId": "get_v2_sessiontemplatetemplate", - "responses": { - "200": { - "description": "Session template details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "A Session Template object represents a collection of resources and metadata.\nA session template is used to create a Session which applies the data to\ngroup of components.\n\nA Session Template can be created from a JSON structure. It will return\na SessionTemplate name if successful.\nThis name is required when creating a Session.\n\n## Link Relationships\n\n* self : The session object\n", - "properties": { - "name": { - "type": "string", - "description": "Name of the SessionTemplate. The length of the name is restricted to 45 characters.", - "example": "cle-1.0.0", - "minLength": 1, - "maxLength": 45, - "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*", - "readOnly": true - }, - "description": { - "type": "string", - "description": "An optional description for the session template.\n" - }, - "enable_cfs": { - "type": "boolean", - "description": "Whether to enable the Configuration Framework Service (CFS).\nChoices: true/false\n", - "default": true - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "boot_sets": { - "type": "object", - "additionalProperties": { - "description": "A boot set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The Boot Set name.\n" - }, - "path": { - "type": "string", - "description": "A path identifying the metadata describing the components of the boot image. This could be a URI, URL, etc.\nIt will be processed based on the type attribute.\n" - }, - "cfs": { - "type": "object", - "description": "CFS Parameters is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a boot set.\n", - "properties": { - "configuration": { - "type": "string", - "description": "The name of configuration to be applied.\n" - } - }, - "additionalProperties": false - }, - "type": { - "type": "string", - "description": "The mime type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n" - }, - "etag": { - "type": "string", - "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.\n" - }, - "kernel_parameters": { - "type": "string", - "description": "The kernel parameters to use to boot the nodes.\n" - }, - "node_list": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node list of hardware xnames. If the reject_nids option is enabled, then Session Template creation or validation will fail if it contains a boot set with a node list that appears to contain a NID.\n" - }, - "node_roles_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node roles list. Allows actions against nodes with associated roles. Roles are defined in SMD.\n" - }, - "node_groups": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "The node groups list. Allows actions against associated nodes by logical groupings. Logical groups are user-defined groups in SMD.\n" - }, - "rootfs_provider": { - "type": "string", - "description": "The root file system provider.\n" - }, - "rootfs_provider_passthrough": { - "type": "string", - "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n" - } - }, - "additionalProperties": false, - "required": [ - "path", - "type" - ] - } - }, - "links": { - "type": "array", - "readOnly": true, - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v2/sessions": { - "post": { - "summary": "Create a session", - "description": "The creation of a session performs the operation\nspecified in the SessionCreateRequest\non the boot set(s) defined in the session template.\n", - "tags": [ - "v2", - "sessions" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessions", - "operationId": "post_v2_session", - "requestBody": { - "description": "The information to create a session", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "A Session Creation object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session. The name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.", - "example": "session-20190728032600", - "minLength": 1, - "maxLength": 127, - "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n", - "default": false - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n", - "default": false - } - }, - "required": [ - "operation", - "template_name" - ], - "additionalProperties": false - } - } - } - }, - "responses": { - "201": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "get": { - "summary": "List sessions", - "description": "List all sessions, including those in progress and those complete.\n", - "tags": [ - "v2", - "sessions" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessions", - "operationId": "get_v2_sessions", - "parameters": [ - { - "name": "min_age", - "schema": { - "type": "string" - }, - "in": "query", - "description": "Return only sessions older than the given age. Age is given in the format \"1d\" or \"6h\"" - }, - { - "name": "max_age", - "schema": { - "type": "string" - }, - "in": "query", - "description": "Return only sessions younger than the given age. Age is given in the format \"1d\" or \"6h\"" - }, - { - "name": "status", - "schema": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ] - }, - "in": "query", - "description": "Return only sessions with the given status." - } - ], - "responses": { - "200": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "An array of sessions.", - "type": "array", - "items": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete multiple sessions.", - "tags": [ - "v2", - "sessions" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessions", - "operationId": "delete_v2_sessions", - "parameters": [ - { - "name": "min_age", - "schema": { - "type": "string" - }, - "in": "query", - "description": "Return only sessions older than the given age. Age is given in the format \"1d\" or \"6h\"" - }, - { - "name": "max_age", - "schema": { - "type": "string" - }, - "in": "query", - "description": "Return only sessions younger than the given age. Age is given in the format \"1d\" or \"6h\"" - }, - { - "name": "status", - "schema": { - "enum": [ - "pending", - "running", - "complete" - ], - "type": "string" - }, - "in": "query", - "description": "Return only sessions with the given status." - } - ], - "description": "Delete multiple sessions. If filters are provided, only sessions matching all filters will be deleted. By default only completed sessions will be deleted.", - "responses": { - "204": { - "description": "The resource was deleted." - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - } - }, - "/v2/sessions/{session_id}": { - "get": { - "summary": "Get session details by id", - "description": "Get session details by session_id.", - "tags": [ - "v2", - "sessions" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessions", - "operationId": "get_v2_session", - "responses": { - "200": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "patch": { - "summary": "Update a single session", - "tags": [ - "v2", - "sessions" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessions", - "description": "Update the state for a given session in the BOS database", - "operationId": "patch_v2_session", - "requestBody": { - "description": "The state for a single session", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - } - }, - "responses": { - "200": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "delete": { - "summary": "Delete session by id", - "description": "Delete session by session_id.", - "tags": [ - "v2", - "sessions" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessions", - "operationId": "delete_v2_session", - "responses": { - "204": { - "description": "The resource was deleted." - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" - } - }, - "additionalProperties": false - } - } - } - } - } - }, - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/v2/sessions/{session_id}/status": { - "get": { - "summary": "Get session extended status information by id", - "description": "Get session extended status information by id", - "tags": [ - "v2", - "sessions" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessions", - "operationId": "get_v2_session_status", - "responses": { - "200": { - "description": "Session status details", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "Detailed information on the status of a session.\n", - "properties": { - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "managed_components_count": { - "type": "integer", - "description": "The count of components currently managed by this session\n" - }, - "phases": { - "type": "object", - "description": "Detailed information on the phases of a session.\n", - "properties": { - "percent_complete": { - "type": "number", - "description": "The percent of components currently in a completed/stable state\n" - }, - "percent_powering_on": { - "type": "number", - "description": "The percent of components currently in the powering-on phase\n" - }, - "percent_powering_off": { - "type": "number", - "description": "The percent of components currently in the powering-off phase\n" - }, - "percent_configuring": { - "type": "number", - "description": "The percent of components currently in the configuring phase\n" - } - }, - "additionalProperties": false - }, - "percent_successful": { - "type": "number", - "description": "The percent of components currently in a successful state\n" - }, - "percent_failed": { - "type": "number", - "description": "The percent of components currently in a failed state\n" - }, - "percent_staged": { - "type": "number", - "description": "The percent of components currently still staged for this session\n" - }, - "error_summary": { - "type": "object", - "description": "A summary of the errors currently listed by all components\n" - }, - "timing": { - "type": "object", - "description": "Detailed information on the timing of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "duration": { - "type": "string", - "description": "The current duration of the on-going session or final duration of the completed session.\n" + }, + "requestBodies": { + "V2sessionCreateRequest": { + "description": "The information to create a Session", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "A Session Creation object. A UUID name is generated if a name is not provided. The limit parameter is\nrequired if the session_limit_required option is true.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n", + "default": false + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n", + "default": false + } + }, + "required": [ + "operation", + "template_name" + ], + "additionalProperties": false } - }, - "additionalProperties": false } - }, - "additionalProperties": false } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + }, + "V2componentUpdateRequest": { + "description": "The state for a single Component", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Component attributes that can be updated using the CLI\n", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } } - }, - "additionalProperties": false } - } - } - } - } - }, - "post": { - "summary": "Saves the current session to database", - "tags": [ - "v2", - "sessions", - "cli_ignore" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.sessions", - "description": "Saves the current session to database. For use at session completion.", - "operationId": "save_v2_session_status", - "responses": { - "200": { - "description": "Session details", - "content": { - "application/json": { - "schema": { - "description": "A Session object\n\n## Link Relationships\n\n* self : The session object\n", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the session.\n" - }, - "operation": { - "type": "string", - "enum": [ - "boot", - "reboot", - "shutdown" - ], - "description": "A Session represents a desired state that is being applied to a group of components. Sessions run until all components it manages have either been disabled due to completion, or until all components are managed by other newer sessions.\nOperation -- An operation to perform on nodes in this session.\n Boot Applies the template to the components and boots/reboots if necessary.\n Reboot Applies the template to the components guarantees a reboot.\n Shutdown Power down nodes that are on.\n" - }, - "template_name": { - "type": "string", - "description": "The name of the Session Template", - "example": "my-session-template", - "format": "string" - }, - "limit": { - "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" - }, - "stage": { - "type": "boolean", - "description": "Set to stage a session which will not immediately change the state of any components. The \"applystaged\" endpoint can be called at a later time to trigger the start of this session.\n" - }, - "include_disabled": { - "type": "boolean", - "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" - }, - "components": { - "type": "string", - "description": "A comma-separated list of nodes, representing the initial list of nodes the session should operate against. The list will remain even if other sessions have taken over management of the nodes.\n" - }, - "status": { - "type": "object", - "description": "Information on the status of a session.\n", - "properties": { - "start_time": { - "type": "string", - "description": "When the session was created.\n" - }, - "end_time": { - "type": "string", - "description": "When the session completed.\n" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "running", - "complete" - ], - "description": "The status of a session.\n" - }, - "error": { - "type": "string", - "description": "Error which prevented the session from running\n" + }, + "V2componentsPutRequest": { + "description": "The state for an array of Components", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "An array of Component states with associated Ids.", + "type": "array", + "items": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + } } - }, - "additionalProperties": false } - }, - "additionalProperties": false } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + }, + "V2componentsUpdateRequestArray": { + "description": "An array of Component states", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "An array of Component states with associated Ids.", + "type": "array", + "items": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + } + } } - }, - "additionalProperties": false } - } - } - } - } - }, - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/v2/components": { - "get": { - "summary": "Retrieve the state of a collection of components", - "tags": [ - "v2", - "components" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.components", - "description": "Retrieve the full collection of components in the form of a ComponentArray. Full results can also be filtered by query parameters. Only the first filter parameter of each type is used and the parameters are applied in an AND fashion. If the collection is empty or the filters have no match, an empty array is returned.", - "operationId": "get_v2_components", - "parameters": [ - { - "name": "ids", - "schema": { - "type": "string" - }, - "in": "query", - "description": "Retrieve the components with the given id (e.g. xname for hardware components). Can be chained for selecting groups of components." - }, - { - "name": "session", - "schema": { - "type": "string" - }, - "in": "query", - "description": "Retrieve the components with the given session id." - }, - { - "name": "staged_session", - "schema": { - "type": "string" - }, - "in": "query", - "description": "Retrieve the components with the given staged session id." - }, - { - "name": "enabled", - "schema": { - "type": "boolean" }, - "in": "query", - "description": "Retrieve the components with the \"enabled\" state." - }, - { - "name": "phase", - "schema": { - "type": "string" - }, - "in": "query", - "description": "Retrieve the components in the given phase." - }, - { - "name": "status", - "schema": { - "type": "string" - }, - "in": "query", - "description": "Retrieve the components with the given status." - } - ], - "responses": { - "200": { - "description": "A collection of component states", - "content": { - "application/json": { - "schema": { - "description": "An array of component states.", - "type": "array", - "items": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", + "V2componentsUpdateRequestFilter": { + "description": "A Component state and filter", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Information for patching multiple Components.", "type": "object", "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + "patch": { + "description": "Component attributes that can be updated using the CLI\n", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "filters": { + "description": "Information for patching multiple Components by listing their IDs or\nsession. Only one of the two may be specified.\n", + "type": "object", + "properties": { + "ids": { + "type": "string", + "description": "A comma-separated list of Component IDs.", + "minLength": 1, + "maxLength": 65535 + }, + "session": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + } + }, + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": false + } }, + "required": [ + "patch", + "filters" + ], "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + } } - }, - "additionalProperties": false } - } - } - } - } - }, - "put": { - "summary": "Add or Replace a collection of components", - "tags": [ - "v2", - "components", - "cli_ignore" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.components", - "description": "Update the state for a collection of components in the BOS database", - "operationId": "put_v2_components", - "requestBody": { - "description": "The state for an array of components", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "An array of component states.", - "type": "array", - "items": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + }, + "V2optionsUpdateRequest": { + "description": "Service-wide options", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Options for the Boot Orchestration Service.\n", + "type": "object", + "properties": { + "cleanup_completed_session_ttl": { + "type": "string", + "description": "Delete complete Sessions that are older than cleanup_completed_session_ttl (in minutes, hours, days, or weeks).\n0 disables cleanup behavior.\n", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "clear_stage": { + "type": "boolean", + "description": "Allows a Component's staged information to be cleared when the requested staging action has been started. Defaults to false." + }, + "component_actual_state_ttl": { + "type": "string", + "description": "The maximum amount of time a Component's actual state is considered valid (in minutes, hours, days, or weeks).\n0 disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically.\n", + "example": "6h", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "disable_components_on_completion": { + "type": "boolean", + "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS.\nIf false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes.\n" + }, + "discovery_frequency": { + "type": "integer", + "description": "How frequently the BOS discovery agent syncs new Components from HSM (in seconds)", + "minimum": 0, + "maximum": 33554432 + }, + "logging_level": { + "type": "string", + "description": "The logging level for all BOS services", + "pattern": "^([dD][eE][bB][uU][gG]|[iI][nN][fF][oO]|[wW][aA][rR][nN][iI][nN][gG]|[eE][rR][rR][oO][rR]|[cC][rR][iI][tT][iI][cC][aA][lL])$" + }, + "max_boot_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_on_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_off_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "polling_frequency": { + "type": "integer", + "description": "How frequently the BOS operators check Component state for needed actions (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "default_retry_policy": { + "type": "integer", + "description": "The default maximum number attempts per node for failed actions.", + "example": 1, + "minimum": 0, + "maximum": 1048576 + }, + "max_component_batch_size": { + "type": "integer", + "description": "The maximum number of Components that a BOS operator will process at once. 0 means no limit.", + "example": 1000, + "minimum": 0, + "maximum": 131071 + }, + "reject_nids": { + "type": "boolean", + "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started).\n" + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, Sessions cannot be created without specifying the limit parameter." + } }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" + "additionalProperties": true, + "minProperties": 1, + "maxProperties": 1024 } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." + } + } + }, + "V2sessionUpdateRequest": { + "description": "The state for a single Session", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "A Session update object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." + } + } + }, + "V2applyStagedRequest": { + "description": "A list of xnames that should have their staged Session applied.", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "A list of Components that should have their staged Session applied.\n", + "type": "object", + "properties": { + "xnames": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } + } + }, + "additionalProperties": false } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 } - }, - "additionalProperties": false } - } } - } }, "responses": { - "200": { - "description": "A collection of component states", - "content": { - "application/json": { - "schema": { - "description": "An array of component states.", - "type": "array", - "items": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", + "ResourceDeleted": { + "description": "The resource was deleted." + }, + "ServiceHealth": { + "description": "Service Health information", + "content": { + "application/json": { + "schema": { + "description": "Service health status", "type": "object", "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + "dbStatus": { + "type": "string" + }, + "apiStatus": { + "type": "string" + } }, "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", + } + } + } + }, + "Version": { + "description": "Get version details\nThe versioning system uses [semver](https://semver.org/).\n## Link Relationships\n* self : Link to itself\n* versions : Link back to the versions resource\n", + "content": { + "application/json": { + "schema": { + "description": "Version data", "type": "object", "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + "major": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "minor": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "patch": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } }, "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", + } + } + } + }, + "V2SessionTemplateDetails": { + "description": "Session Template details", + "content": { + "application/json": { + "schema": { "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] + } + } + } + }, + "V2SessionTemplateDetailsArray": { + "description": "Session Template details array", + "content": { + "application/json": { + "schema": { + "description": "An array of Session Templates.", + "type": "array", + "items": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] + } + } + } + } + }, + "V2SessionTemplateValidation": { + "description": "Session Template validity details", + "content": { + "application/json": { + "schema": { + "description": "Message describing errors or incompleteness in a Session Template.\n", + "type": "string" + } + } + } + }, + "V2SessionDetails": { + "description": "Session details", + "content": { + "application/json": { + "schema": { + "description": "A Session object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n" + }, + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "operation", + "template_name" + ] + } + } + } + }, + "V2SessionDetailsArray": { + "description": "Session details array", + "content": { + "application/json": { + "schema": { + "description": "An array of Sessions.", + "type": "array", + "items": { + "description": "A Session object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n" + }, + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "operation", + "template_name" + ] + } + } + } + } + }, + "V2SessionExtendedStatus": { + "description": "Session status details", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Detailed information on the status of a Session.\n", + "properties": { + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "managed_components_count": { + "type": "integer", + "description": "The count of Components currently managed by this Session\n" + }, + "phases": { + "type": "object", + "description": "Detailed information on the phases of a Session.\n", + "properties": { + "percent_complete": { + "type": "number", + "description": "The percent of Components currently in a completed/stable state\n" + }, + "percent_powering_on": { + "type": "number", + "description": "The percent of Components currently in the powering-on phase\n" + }, + "percent_powering_off": { + "type": "number", + "description": "The percent of Components currently in the powering-off phase\n" + }, + "percent_configuring": { + "type": "number", + "description": "The percent of Components currently in the configuring phase\n" + } + }, + "additionalProperties": false + }, + "percent_successful": { + "type": "number", + "description": "The percent of Components currently in a successful state\n" + }, + "percent_failed": { + "type": "number", + "description": "The percent of Components currently in a failed state\n" + }, + "percent_staged": { + "type": "number", + "description": "The percent of Components currently still staged for this Session\n" + }, + "error_summary": { + "type": "object", + "description": "A summary of the errors currently listed by all Components\n" + }, + "timing": { + "type": "object", + "description": "Detailed information on the timing of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "duration": { + "type": "string", + "description": "The current duration of the ongoing Session or final duration of the completed Session.\n" + } + }, + "additionalProperties": false + } }, "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } + } + } } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + }, + "V2componentDetails": { + "description": "A single Component state", + "content": { + "application/json": { + "schema": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } + }, + "V2componentDetailsArray": { + "description": "A collection of Component states", + "content": { + "application/json": { + "schema": { + "description": "An array of Component states.", + "type": "array", + "items": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } + } + }, + "V2applyStagedResponse": { + "description": "A list of xnames that should have their staged Session applied.", + "content": { + "application/json": { + "schema": { + "description": "Mapping from Component staged Session statuses to Components with that status.\n", + "type": "object", + "properties": { + "succeeded": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } + }, + "failed": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } + }, + "ignored": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } + } + }, + "additionalProperties": false + } } - }, - "additionalProperties": false } - } - } - } - } - }, - "patch": { - "summary": "Update a collection of components", - "tags": [ - "v2", - "components", - "cli_ignore" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.components", - "description": "Update the state for a collection of components in the BOS database", - "operationId": "patch_v2_components", - "requestBody": { - "description": "The state for an array of components", - "required": true, - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "description": "Information for patching multiple components.", - "type": "object", - "properties": { - "patch": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", + }, + "V2options": { + "description": "A collection of service-wide options", + "content": { + "application/json": { + "schema": { + "description": "Options for the Boot Orchestration Service.\n", "type": "object", "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { + "cleanup_completed_session_ttl": { "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { + "description": "Delete complete Sessions that are older than cleanup_completed_session_ttl (in minutes, hours, days, or weeks).\n0 disables cleanup behavior.\n", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "clear_stage": { + "type": "boolean", + "description": "Allows a Component's staged information to be cleared when the requested staging action has been started. Defaults to false." + }, + "component_actual_state_ttl": { "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "description": "The maximum amount of time a Component's actual state is considered valid (in minutes, hours, days, or weeks).\n0 disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically.\n", + "example": "6h", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "disable_components_on_completion": { + "type": "boolean", + "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS.\nIf false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes.\n" + }, + "discovery_frequency": { + "type": "integer", + "description": "How frequently the BOS discovery agent syncs new Components from HSM (in seconds)", + "minimum": 0, + "maximum": 33554432 + }, + "logging_level": { "type": "string", - "description": "Initrd ID" - } + "description": "The logging level for all BOS services", + "pattern": "^([dD][eE][bB][uU][gG]|[iI][nN][fF][oO]|[wW][aA][rR][nN][iI][nN][gG]|[eE][rR][rR][oO][rR]|[cC][rR][iI][tT][iI][cC][aA][lL])$" }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "max_boot_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_on_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_off_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "polling_frequency": { + "type": "integer", + "description": "How frequently the BOS operators check Component state for needed actions (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "default_retry_policy": { + "type": "integer", + "description": "The default maximum number attempts per node for failed actions.", + "example": 1, + "minimum": 0, + "maximum": 1048576 + }, + "max_component_batch_size": { + "type": "integer", + "description": "The maximum number of Components that a BOS operator will process at once. 0 means no limit.", + "example": 1000, + "minimum": 0, + "maximum": 131071 + }, + "reject_nids": { + "type": "boolean", + "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started).\n" + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, Sessions cannot be created without specifying the limit parameter." + } }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", + "additionalProperties": true, + "minProperties": 1, + "maxProperties": 1024 + } + } + } + }, + "AlreadyExists": { + "description": "The resource to be created already exists", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", "type": "object", "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", "type": "string", - "description": "Initrd ID" - } + "format": "uri", + "default": "about:blank" }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } }, "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", + } + } + } + }, + "BadRequest": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", "type": "object", "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + "format": "uri", + "default": "about:blank" }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } }, "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", + } + } + } + }, + "BadRequestOrMultiTenancyNotSupported": { + "description": "Multi-tenancy is not supported for this request.\nIf no tenant was specified, then the request was bad for another reason.\n", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", "type": "object", "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } }, "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", + } + } + } + }, + "MultiTenancyNotSupported": { + "description": "Multi-tenancy is not supported for this BOS request.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", "type": "object", "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } }, "additionalProperties": false - }, - "status": { - "description": "Status information for the component", + } + } + } + }, + "ResourceNotFound": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", "type": "object", "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } }, "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - }, - "filters": { - "description": "Information for patching multiple components.", - "type": "object", - "properties": { - "ids": { - "type": "string", - "description": "A comma-separated list of component IDs" - }, - "session": { - "type": "string", - "description": "A session name. All components part of this session will be patched." - } } - } - }, - "required": [ - "patch", - "filters" - ] - }, - { - "description": "An array of component states.", - "type": "array", - "items": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" + } + } + }, + "UpdateConflict": { + "description": "The update was not allowed due to a conflict.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 }, - "initrd": { - "type": "string", - "description": "Initrd ID" + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" + "additionalProperties": false + } + } + } + }, + "ServiceUnavailable": { + "description": "Service Unavailable", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 }, - "initrd": { - "type": "string", - "description": "Initrd ID" + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" + "additionalProperties": false + } + } + } + }, + "InternalError": { + "description": "An Internal Server Error occurred handling the request.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 }, - "initrd": { - "type": "string", - "description": "Initrd ID" + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } + } + }, + "parameters": { + "TemplateIdPathParam": { + "name": "session_template_id", + "in": "path", + "description": "Session Template name", + "required": true, + "schema": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + } + }, + "V2ComponentIdPathParam": { + "name": "component_id", + "in": "path", + "description": "Component ID. e.g. xname for hardware Components", + "required": true, + "schema": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } + }, + "V2SessionIdPathParam": { + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + } + }, + "V2SessionsMaxAgeQueryParam": { + "name": "max_age", + "schema": { + "type": "string", + "description": "Age in minutes (e.g. \"3m\"), hours (e.g. \"5h\"), days (e.g. \"10d\"), or weeks (e.g. \"2w\").", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "in": "query", + "description": "Only include Sessions younger than the given age. Age is given in the format \"1d\" or \"6h\"" + }, + "V2SessionsMinAgeQueryParam": { + "name": "min_age", + "schema": { + "type": "string", + "description": "Age in minutes (e.g. \"3m\"), hours (e.g. \"5h\"), days (e.g. \"10d\"), or weeks (e.g. \"2w\").", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "in": "query", + "description": "Only include Sessions older than the given age. Age is given in the format \"1d\" or \"6h\"" + }, + "V2SessionsStatusQueryParam": { + "name": "status", + "schema": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "in": "query", + "description": "Only include Sessions with the given status." + }, + "V2TenantHeaderParam": { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { + "type": "string", + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 + } + } + } + }, + "paths": { + "/": { + "get": { + "summary": "Get API versions", + "description": "Return list of versions currently running.", + "tags": [ + "version" + ], + "x-openapi-router-controller": "bos.server.controllers.base", + "operationId": "root_get", + "responses": { + "200": { + "description": "A collection of Versions", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "description": "Version data", + "type": "object", + "properties": { + "major": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "minor": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "patch": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + } + } + } + }, + "500": { + "description": "An Internal Server Error occurred handling the request.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } + } + } + } + }, + "/v2": { + "get": { + "summary": "Get API version", + "description": "Return the API version", + "tags": [ + "v2", + "version" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.base", + "operationId": "get_v2", + "responses": { + "200": { + "description": "Get version details\nThe versioning system uses [semver](https://semver.org/).\n## Link Relationships\n* self : Link to itself\n* versions : Link back to the versions resource\n", + "content": { + "application/json": { + "schema": { + "description": "Version data", + "type": "object", + "properties": { + "major": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "minor": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "patch": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + } + } + }, + "500": { + "description": "An Internal Server Error occurred handling the request.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" + } + } + } + } + }, + "/v2/healthz": { + "get": { + "summary": "Get service health details", + "description": "Get BOS health details.", + "tags": [ + "v2", + "healthz" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.healthz", + "operationId": "get_v2_healthz", + "responses": { + "200": { + "description": "Service Health information", + "content": { + "application/json": { + "schema": { + "description": "Service health status", + "type": "object", + "properties": { + "dbStatus": { + "type": "string" + }, + "apiStatus": { + "type": "string" + } + }, + "additionalProperties": false + } } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." + } + }, + "500": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." + } + }, + "503": { + "description": "Service Unavailable", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 } - }, - "additionalProperties": false } - } - ] - } + } } - } }, - "responses": { - "200": { - "description": "A collection of component states", - "content": { - "application/json": { - "schema": { - "description": "An array of component states.", - "type": "array", - "items": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { + "/v2/sessiontemplates": { + "parameters": [ + { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 + } + } + ], + "get": { + "summary": "List Session Templates", + "description": "List all Session Templates.", + "tags": [ + "v2", + "sessiontemplates" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", + "operationId": "get_v2_sessiontemplates", + "responses": { + "200": { + "description": "Session Template details array", + "content": { + "application/json": { + "schema": { + "description": "An array of Session Templates.", + "type": "array", + "items": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] + } + } + } + } + } + } + } + }, + "/v2/sessiontemplatesvalid/{session_template_id}": { + "parameters": [ + { + "name": "session_template_id", + "in": "path", + "description": "Session Template name", + "required": true, + "schema": { "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + } + }, + { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 + } } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" + ], + "get": { + "summary": "Validate the Session Template by ID", + "description": "Validate Session Template by Session Template ID.\nThe Session Template ID corresponds to the *name*\nof the Session Template.\n", + "tags": [ + "v2", + "sessiontemplatess" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", + "operationId": "validate_v2_sessiontemplate", + "responses": { + "200": { + "description": "Session Template validity details", + "content": { + "application/json": { + "schema": { + "description": "Message describing errors or incompleteness in a Session Template.\n", + "type": "string" + } + } + } }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": false } - } } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + }, + "/v2/sessiontemplates/{session_template_id}": { + "parameters": [ + { + "name": "session_template_id", + "in": "path", + "description": "Session Template name", + "required": true, + "schema": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + } + }, + { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { + "type": "string", + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 } - }, - "additionalProperties": false } - } - } - } - } - } - }, - "/v2/components/{component_id}": { - "get": { - "summary": "Retrieve the state of a single component", - "tags": [ - "v2", - "components" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.components", - "description": "Retrieve the current and desired state of a single component", - "operationId": "get_v2_component", - "responses": { - "200": { - "description": "A single component state", - "content": { - "application/json": { - "schema": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" + ], + "get": { + "summary": "Get Session Template by ID", + "description": "Get Session Template by Session Template ID.\nThe Session Template ID corresponds to the *name*\nof the Session Template.\n", + "tags": [ + "v2", + "sessiontemplatess" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", + "operationId": "get_v2_sessiontemplate", + "responses": { + "200": { + "description": "Session Template details", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] + } } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true } - }, - "additionalProperties": false }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true } - }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" + } + } + }, + "put": { + "summary": "Create Session Template", + "description": "Create a new Session Template.", + "tags": [ + "v2", + "sessiontemplates" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", + "operationId": "put_v2_sessiontemplate", + "requestBody": { + "description": "A JSON object for creating a Session Template", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" + } + }, + "responses": { + "200": { + "description": "Session Template details", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] + } + } } - }, - "additionalProperties": false }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." + } + } + }, + "patch": { + "summary": "Update a Session Template", + "description": "Update an existing Session Template.", + "tags": [ + "v2", + "sessiontemplates" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", + "operationId": "patch_v2_sessiontemplate", + "requestBody": { + "description": "A JSON object for updating a Session Template", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Session Template details", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] + } + } } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": false } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + }, + "delete": { + "summary": "Delete a Session Template", + "description": "Delete a Session Template.", + "tags": [ + "v2", + "sessiontemplates" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", + "operationId": "delete_v2_sessiontemplate", + "responses": { + "204": { + "description": "The resource was deleted." + }, + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": false } - } } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + }, + "/v2/sessiontemplatetemplate": { + "get": { + "summary": "Get an example Session Template.", + "description": "Returns a skeleton of a Session Template, which can be\nused as a starting point for users creating their own\nSession Templates.\n", + "tags": [ + "v2", + "sessiontemplates" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessiontemplates", + "operationId": "get_v2_sessiontemplatetemplate", + "responses": { + "200": { + "description": "Session Template details", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A Session Template object represents a collection of resources and metadata.\nA Session Template is used to create a Session which applies the data to\ngroup of Components.\n\n## Link Relationships\n\n* self : The Session Template object\n", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "readOnly": true, + "description": "Name of the Session Template.\n\nNames must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "example": "cle-1.0.0" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "description": { + "type": "string", + "description": "An optional description for the Session Template.", + "minLength": 1, + "maxLength": 1023 + }, + "enable_cfs": { + "type": "boolean", + "description": "Whether to enable the Configuration Framework Service (CFS).\n", + "default": true + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "boot_sets": { + "type": "object", + "description": "Mapping from Boot Set names to Boot Sets.\n\n* Boot Set names must be 1-127 characters in length.\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "minProperties": 1, + "maxProperties": 127, + "additionalProperties": { + "description": "A Boot Set is a collection of nodes defined by an explicit list, their functional\nrole, and their logical groupings. This collection of nodes is associated with one\nset of boot artifacts and optional additional records for configuration and root\nfilesystem provisioning.\n\nA boot set requires at least one of the following fields to be specified:\nnode_list, node_roles_groups, node_groups\n\nIf specified, the name field must match the key mapping to this boot set in the\nboot_sets field of the containing V2SessionTemplate.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The Boot Set name.\n\n* Boot Set names must use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Boot Set names must begin and end with a letter or digit.\n", + "example": "compute", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "writeOnly": true + }, + "path": { + "type": "string", + "description": "A path identifying the metadata describing the components of the boot image.\nThis could be a URI, URL, etc, depending on the type of the Boot Set.\n", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/manifest.json", + "minLength": 1, + "maxLength": 4095 + }, + "cfs": { + "type": "object", + "description": "This is the collection of parameters that are passed to the Configuration\nFramework Service when configuration is enabled. Can be set as the global value for\na Session Template, or individually within a Boot Set.\n", + "properties": { + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + } + }, + "additionalProperties": false + }, + "type": { + "type": "string", + "description": "The MIME type of the metadata describing the components of the boot image. This type controls how BOS processes the path attribute.\n", + "example": "s3", + "minLength": 1, + "maxLength": 127 + }, + "etag": { + "type": "string", + "description": "This is the 'entity tag'. It helps verify the version of metadata describing the components of the boot image we are working with.", + "example": "1cc4eef4f407bd8a62d7d66ee4b9e9c8", + "maxLength": 65536 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "node_list": { + "type": "array", + "description": "A node list that is required to have at least one node.\nNodes must be specified by component name (xname). NIDs are not supported.\nIf the reject_nids option is enabled, then Session Template creation or validation will fail if\nany of the boot sets contain a NodeList that appears to contain a NID.\n", + "minItems": 1, + "maxItems": 65535, + "example": [ + "x3000c0s19b1n0", + "x3000c0s19b2n0" + ], + "items": { + "type": "string", + "description": "Hardware component name (xname).", + "example": "x3001c0s39b0n0", + "minLength": 1, + "maxLength": 127 + } + }, + "node_roles_groups": { + "type": "array", + "description": "Node role list. Allows actions against nodes with associated roles.", + "minItems": 1, + "maxItems": 1023, + "example": [ + "Compute", + "Application" + ], + "items": { + "type": "string", + "description": "Name of a role that is defined in the Hardware State Manager (HSM).", + "example": "Compute", + "minLength": 1, + "maxLength": 127 + } + }, + "node_groups": { + "type": "array", + "description": "Node group list. Allows actions against associated nodes by logical groupings.", + "minItems": 1, + "maxItems": 4095, + "items": { + "type": "string", + "description": "Name of a user-defined logical group in the Hardware State Manager (HSM).", + "minLength": 1, + "maxLength": 127 + } + }, + "arch": { + "type": "string", + "description": "The node architecture to target. Filters nodes that are not part of matching architecture from being targeted by boot actions. This value should correspond to HSM component 'Arch' field exactly. For reasons of backwards compatibility, all HSM nodes that are of type Unknown are treated as being of type X86.\n", + "default": "X86", + "enum": [ + "X86", + "ARM", + "Other", + "Unknown" + ] + }, + "rootfs_provider": { + "type": "string", + "description": "The root file system provider.", + "example": "cpss3", + "minLength": 1, + "maxLength": 511 + }, + "rootfs_provider_passthrough": { + "type": "string", + "description": "The root file system provider passthrough.\nThese are additional kernel parameters that will be appended to\nthe 'rootfs=' kernel parameter\n", + "example": "dvs:api-gw-service-nmn.local:300:nmn0", + "maxLength": 4096 + } + }, + "additionalProperties": false, + "required": [ + "path", + "type" + ] + } + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "readOnly": true, + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "boot_sets" + ] + } + } + } } - }, - "additionalProperties": false } - } } - } - } - }, - "put": { - "summary": "Add or Replace a single component", - "tags": [ - "v2", - "components" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.components", - "description": "Update the state for a given component in the BOS database", - "operationId": "put_v2_component", - "requestBody": { - "description": "The state for a single component", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { + }, + "/v2/sessions": { + "parameters": [ + { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 + } + } + ], + "post": { + "summary": "Create a Session", + "description": "The creation of a Session performs the operation\nspecified in the SessionCreateRequest\non the Boot Sets defined in the Session Template.\n", + "tags": [ + "v2", + "sessions" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessions", + "operationId": "post_v2_session", + "requestBody": { + "description": "The information to create a Session", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "A Session Creation object. A UUID name is generated if a name is not provided. The limit parameter is\nrequired if the session_limit_required option is true.\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n", + "default": false + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n", + "default": false + } + }, + "required": [ + "operation", + "template_name" + ], + "additionalProperties": false + } + } + } + }, + "responses": { + "201": { + "description": "Session details", + "content": { + "application/json": { + "schema": { + "description": "A Session object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n" + }, + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "operation", + "template_name" + ] + } + } + } }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } + } + } + }, + "get": { + "summary": "List Sessions", + "parameters": [ + { + "name": "min_age", + "schema": { + "type": "string", + "description": "Age in minutes (e.g. \"3m\"), hours (e.g. \"5h\"), days (e.g. \"10d\"), or weeks (e.g. \"2w\").", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "in": "query", + "description": "Only include Sessions older than the given age. Age is given in the format \"1d\" or \"6h\"" + }, + { + "name": "max_age", + "schema": { + "type": "string", + "description": "Age in minutes (e.g. \"3m\"), hours (e.g. \"5h\"), days (e.g. \"10d\"), or weeks (e.g. \"2w\").", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "in": "query", + "description": "Only include Sessions younger than the given age. Age is given in the format \"1d\" or \"6h\"" + }, + { + "name": "status", + "schema": { "type": "string", - "description": "Initrd ID" - } + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + "in": "query", + "description": "Only include Sessions with the given status." + } + ], + "description": "List all Sessions, including those in progress and those complete.\n", + "tags": [ + "v2", + "sessions" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessions", + "operationId": "get_v2_sessions", + "responses": { + "200": { + "description": "Session details array", + "content": { + "application/json": { + "schema": { + "description": "An array of Sessions.", + "type": "array", + "items": { + "description": "A Session object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n" + }, + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "operation", + "template_name" + ] + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete multiple Sessions.", + "parameters": [ + { + "name": "min_age", + "schema": { + "type": "string", + "description": "Age in minutes (e.g. \"3m\"), hours (e.g. \"5h\"), days (e.g. \"10d\"), or weeks (e.g. \"2w\").", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "in": "query", + "description": "Only include Sessions older than the given age. Age is given in the format \"1d\" or \"6h\"" + }, + { + "name": "max_age", + "schema": { + "type": "string", + "description": "Age in minutes (e.g. \"3m\"), hours (e.g. \"5h\"), days (e.g. \"10d\"), or weeks (e.g. \"2w\").", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "in": "query", + "description": "Only include Sessions younger than the given age. Age is given in the format \"1d\" or \"6h\"" + }, + { + "name": "status", + "schema": { "type": "string", - "description": "Initrd ID" - } + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { + "in": "query", + "description": "Only include Sessions with the given status." + } + ], + "description": "Delete multiple Sessions. If filters are provided, only Sessions matching\nall filters will be deleted. By default only completed Sessions will be deleted.\n", + "tags": [ + "v2", + "sessions" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessions", + "operationId": "delete_v2_sessions", + "responses": { + "204": { + "description": "The resource was deleted." + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } + } + } + } + }, + "/v2/sessions/{session_id}": { + "parameters": [ + { + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + } + }, + { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { "type": "string", - "description": "If set, this will override the status value." - } + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 + } + } + ], + "get": { + "summary": "Get Session details by ID", + "description": "Get Session details by Session ID.", + "tags": [ + "v2", + "sessions" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessions", + "operationId": "get_v2_session", + "responses": { + "200": { + "description": "Session details", + "content": { + "application/json": { + "schema": { + "description": "A Session object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n" + }, + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "operation", + "template_name" + ] + } + } + } }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } + } + } + }, + "patch": { + "summary": "Update status of a single Session", + "description": "Update the state for a given Session in the BOS database.\nThis is intended only for internal use by the BOS service.\n", + "tags": [ + "v2", + "sessions", + "cli_ignore" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessions", + "operationId": "patch_v2_session", + "requestBody": { + "description": "The state for a single Session", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "A Session update object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + } + } }, - "additionalProperties": false - } - } - } - }, - "responses": { - "200": { - "description": "A single component state", - "content": { - "application/json": { - "schema": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" + "responses": { + "200": { + "description": "Session details", + "content": { + "application/json": { + "schema": { + "description": "A Session object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n" + }, + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "operation", + "template_name" + ] + } } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true } - }, - "additionalProperties": false }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true } - }, - "additionalProperties": false }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } + } + } + }, + "delete": { + "summary": "Delete Session by ID", + "description": "Delete Session by Session ID.", + "tags": [ + "v2", + "sessions" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessions", + "operationId": "delete_v2_session", + "responses": { + "204": { + "description": "The resource was deleted." + }, + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } + } + } + } + }, + "/v2/sessions/{session_id}/status": { + "parameters": [ + { + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + } + }, + { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { + "type": "string", + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 + } + } + ], + "get": { + "summary": "Get Session extended status information by ID", + "description": "Get Session extended status information by ID", + "tags": [ + "v2", + "sessions" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessions", + "operationId": "get_v2_session_status", + "responses": { + "200": { + "description": "Session status details", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Detailed information on the status of a Session.\n", + "properties": { + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "managed_components_count": { + "type": "integer", + "description": "The count of Components currently managed by this Session\n" + }, + "phases": { + "type": "object", + "description": "Detailed information on the phases of a Session.\n", + "properties": { + "percent_complete": { + "type": "number", + "description": "The percent of Components currently in a completed/stable state\n" + }, + "percent_powering_on": { + "type": "number", + "description": "The percent of Components currently in the powering-on phase\n" + }, + "percent_powering_off": { + "type": "number", + "description": "The percent of Components currently in the powering-off phase\n" + }, + "percent_configuring": { + "type": "number", + "description": "The percent of Components currently in the configuring phase\n" + } + }, + "additionalProperties": false + }, + "percent_successful": { + "type": "number", + "description": "The percent of Components currently in a successful state\n" + }, + "percent_failed": { + "type": "number", + "description": "The percent of Components currently in a failed state\n" + }, + "percent_staged": { + "type": "number", + "description": "The percent of Components currently still staged for this Session\n" + }, + "error_summary": { + "type": "object", + "description": "A summary of the errors currently listed by all Components\n" + }, + "timing": { + "type": "object", + "description": "Detailed information on the timing of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "duration": { + "type": "string", + "description": "The current duration of the ongoing Session or final duration of the completed Session.\n" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true } - }, - "additionalProperties": false }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." + } + } + }, + "post": { + "summary": "Saves the current Session to database", + "tags": [ + "v2", + "sessions", + "cli_ignore" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.sessions", + "description": "Saves the current Session to database. For use at Session completion.", + "operationId": "save_v2_session_status", + "responses": { + "200": { + "description": "Session details", + "content": { + "application/json": { + "schema": { + "description": "A Session object\n\n## Link Relationships\n\n* self : The Session object\n", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + }, + "tenant": { + "type": "string", + "description": "Name of the tenant that owns this resource. Only used in environments\nwith multi-tenancy enabled. An empty string or null value means the resource\nis not owned by a tenant. The absence of this field from a resource indicates\nthe same.\n", + "nullable": true, + "readOnly": true, + "maxLength": 127 + }, + "operation": { + "type": "string", + "enum": [ + "boot", + "reboot", + "shutdown" + ], + "description": "A Session represents a desired state that is being applied to a group\nof Components. Sessions run until all Components it manages have\neither been disabled due to completion, or until all Components are\nmanaged by other newer Sessions.\n\nOperation -- An operation to perform on Components in this Session.\n Boot Applies the Template to the Components and boots/reboots if necessary.\n Reboot Applies the Template to the Components; guarantees a reboot.\n Shutdown Power down Components that are on.\n" + }, + "template_name": { + "type": "string", + "description": "Name of the Session Template.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "cle-1.0.0" + }, + "limit": { + "type": "string", + "description": "A comma-separated list of nodes, groups, or roles to which the Session\nwill be limited. Components are treated as OR operations unless\npreceded by \"&\" for AND or \"!\" for NOT.\n\nAlternatively, the limit can be set to \"*\", which means no limit.\n\nAn empty string or null value is the same as specifying no limit.\n\nIf the reject_nids option is enabled, then Session creation will fail if its\nlimit appears to contain a NID value.\n", + "maxLength": 524288, + "nullable": true, + "default": "" + }, + "stage": { + "type": "boolean", + "description": "Set to stage a Session which will not immediately change the state of any Components.\nThe \"applystaged\" endpoint can be called at a later time to trigger the start of this Session.\n" + }, + "components": { + "type": "string", + "description": "A comma-separated list of nodes, representing the initial list of nodes\nthe Session should operate against. The list will remain even if\nother Sessions have taken over management of the nodes.\n", + "maxLength": 524288 + }, + "include_disabled": { + "type": "boolean", + "description": "Set to include nodes that have been disabled as indicated in the Hardware State Manager (HSM).\n" + }, + "status": { + "type": "object", + "description": "Information on the status of a Session.\n", + "properties": { + "start_time": { + "type": "string", + "description": "When the Session was created.", + "maxLength": 127 + }, + "end_time": { + "type": "string", + "nullable": true, + "description": "When the Session was completed. A null value means the Session has not ended.", + "maxLength": 127 + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "complete" + ], + "description": "The status of a Session." + }, + "error": { + "type": "string", + "nullable": true, + "description": "Error which prevented the Session from running.\nA null value means the Session has not encountered an error.\n", + "maxLength": 65536 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "operation", + "template_name" + ] + } + } } - }, - "additionalProperties": false }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 } - }, - "additionalProperties": false } - } } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + }, + "/v2/components": { + "parameters": [ + { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { + "type": "string", + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 } - }, - "additionalProperties": false } - } - } - } - } - }, - "patch": { - "summary": "Update a single component", - "tags": [ - "v2", - "components" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.components", - "description": "Update the state for a given component in the BOS database", - "operationId": "patch_v2_component", - "requestBody": { - "description": "The state for a single component", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { + ], + "get": { + "summary": "Retrieve the state of a collection of Components", + "parameters": [ + { + "name": "ids", + "schema": { "type": "string", - "description": "Initrd ID" - } + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "in": "query", + "description": "Retrieve the Components with the given ID\n(e.g. xname for hardware Components). Can be chained\nfor selecting groups of Components." }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { + { + "name": "session", + "schema": { "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } + "in": "query", + "description": "Retrieve the Components with the given Session ID." }, - "additionalProperties": false - }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { + { + "name": "staged_session", + "schema": { "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." - }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false - }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." - }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." - } - }, - "additionalProperties": false - }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." - } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 - } - }, - "additionalProperties": false - } - } - } - }, - "responses": { - "200": { - "description": "A single component state", - "content": { - "application/json": { - "schema": { - "description": "The current and desired artifacts state for a component.\n", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The component's id. e.g. xname for hardware components" - }, - "actual_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "bss_token": { - "type": "string", - "description": "A token received from the node identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false - }, - "desired_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" }, - "bss_token": { - "type": "string", - "description": "A token received from BSS identifying the boot artifacts. For BOS use-only, users should not set this field. It will be overwritten.\n" - }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false + "in": "query", + "description": "Retrieve the Components with the given staged Session ID." }, - "staged_state": { - "description": "The desired boot artifacts and configuration for a component\n", - "type": "object", - "properties": { - "boot_artifacts": { - "description": "A collection of boot artifacts.\n", - "type": "object", - "properties": { - "kernel": { - "type": "string", - "description": "An md5sum hash of the kernel ID" - }, - "kernel_parameters": { - "type": "string", - "description": "Kernel parameters" - }, - "initrd": { - "type": "string", - "description": "Initrd ID" - } - }, - "additionalProperties": false - }, - "configuration": { - "type": "string", - "description": "A CFS configuration ID." - }, - "session": { - "type": "string", - "description": "A session which can be triggered at a later time against this component." + { + "name": "enabled", + "schema": { + "type": "boolean" }, - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - } - }, - "additionalProperties": false + "in": "query", + "description": "Retrieve the Components with the \"enabled\" state." }, - "last_action": { - "description": "Information on the most recent action taken against the node.\n", - "type": "object", - "properties": { - "last_updated": { - "type": "string", - "description": "The date/time when the state was last updated in RFC 3339 format.", - "example": "2019-07-28T03:26:00Z", - "format": "date-time", - "readOnly": true - }, - "action": { - "type": "string", - "description": "A description of the most recent operator/action to impact the component." + { + "name": "phase", + "schema": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 }, - "failed": { - "type": "boolean", - "description": "Denotes if the last action failed to accomplish its task" - } - }, - "additionalProperties": false + "in": "query", + "description": "Retrieve the Components in the given phase." }, - "event_stats": { - "description": "Information on the most recent attempt to return the node to its desired state.\n", - "type": "object", - "properties": { - "power_on_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-on since the last time the node was in the desired state." - }, - "power_off_graceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state." + { + "name": "status", + "schema": { + "type": "string", + "maxLength": 512 }, - "power_off_forceful_attempts": { - "type": "integer", - "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state." + "in": "query", + "description": "Retrieve the Components with the given status." + } + ], + "description": "Retrieve the full collection of Components in the form of a\nComponentArray. Full results can also be filtered by query\nparameters. Only the first filter parameter of each type is\nused and the parameters are applied in an AND fashion.\nIf the collection is empty or the filters have no match, an\nempty array is returned.", + "tags": [ + "v2", + "components" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.components", + "operationId": "get_v2_components", + "responses": { + "200": { + "description": "A collection of Component states", + "content": { + "application/json": { + "schema": { + "description": "An array of Component states.", + "type": "array", + "items": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } } - }, - "additionalProperties": false }, - "status": { - "description": "Status information for the component", - "type": "object", - "properties": { - "phase": { - "type": "string", - "description": "The current phase of the component in the boot process." - }, - "status": { - "type": "string", - "description": "The current status of the component. More detailed than phase.", - "readOnly": true - }, - "status_override": { - "type": "string", - "description": "If set, this will override the status value." + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } } - }, - "additionalProperties": false - }, - "enabled": { - "type": "boolean", - "description": "A flag indicating if actions should be taken for this component." - }, - "error": { - "type": "string", - "description": "A description of the most recent error to impact the component." - }, - "session": { - "type": "string", - "description": "The session responsible for the component's current state" - }, - "retry_policy": { - "type": "integer", - "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", - "example": 1 } - }, - "additionalProperties": false } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" - }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + }, + "put": { + "summary": "Add or Replace a collection of Components", + "description": "Update the state for a collection of Components in the BOS database", + "tags": [ + "v2", + "components", + "cli_ignore" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.components", + "operationId": "put_v2_components", + "requestBody": { + "description": "The state for an array of Components", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "An array of Component states with associated Ids.", + "type": "array", + "items": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + } + } + } } - }, - "additionalProperties": false - } - } - } - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" + }, + "responses": { + "200": { + "description": "A collection of Component states", + "content": { + "application/json": { + "schema": { + "description": "An array of Component states.", + "type": "array", + "items": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } + } }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": false } - } - } - } - } - }, - "delete": { - "tags": [ - "v2", - "components", - "cli_ignore" - ], - "summary": "Delete a single component", - "x-openapi-router-controller": "bos.server.controllers.v2.components", - "description": "Delete the given component", - "operationId": "delete_v2_component", - "responses": { - "204": { - "description": "The resource was deleted." - }, - "404": { - "description": "The resource was not found.", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 + }, + "patch": { + "summary": "Update a collection of Components", + "description": "Update the state for a collection of Components in the BOS database", + "tags": [ + "v2", + "components" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.components", + "operationId": "patch_v2_components", + "requestBody": { + "description": "A Component state and filter", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Information for patching multiple Components.", + "type": "object", + "properties": { + "patch": { + "description": "Component attributes that can be updated using the CLI\n", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "filters": { + "description": "Information for patching multiple Components by listing their IDs or\nsession. Only one of the two may be specified.\n", + "type": "object", + "properties": { + "ids": { + "type": "string", + "description": "A comma-separated list of Component IDs.", + "minLength": 1, + "maxLength": 65535 + }, + "session": { + "type": "string", + "description": "Name of the Session.\n\nThe name must:\n* Use only letters, digits, periods (.), dashes (-), and underscores (_).\n* Begin and end with a letter or digit.\n", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9](?:[-._a-zA-Z0-9]{0,125}[a-zA-Z0-9])?$", + "example": "session-20190728032600" + } + }, + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": false + } + }, + "required": [ + "patch", + "filters" + ], + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "A collection of Component states", + "content": { + "application/json": { + "schema": { + "description": "An array of Component states.", + "type": "array", + "items": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } + } }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": false } - } } - } - } - }, - "parameters": [ - { - "name": "component_id", - "in": "path", - "description": "Component id. e.g. xname for hardware components", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/v2/applystaged": { - "post": { - "summary": "Start a staged session for the specified components", - "description": "Given a list of xnames, this will trigger the start of any sessions\nstaged for those components. Components without a staged session\nwill be ignored, and a list all components that are acted on will\nbe returned in the response.\n", - "tags": [ - "v2", - "applystaged" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.components", - "operationId": "post_v2_apply_staged", - "requestBody": { - "description": "A list of xnames that should have their staged session applied.", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "A list of components that should have their staged session applied.\n", - "type": "object", - "properties": { - "xnames": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" + }, + "/v2/components/{component_id}": { + "parameters": [ + { + "name": "component_id", + "in": "path", + "description": "Component ID. e.g. xname for hardware Components", + "required": true, + "schema": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 } - } }, - "additionalProperties": false - } - } - } - }, - "responses": { - "200": { - "description": "A list of xnames that should have their staged session applied.", - "content": { - "application/json": { - "schema": { - "description": "A list of components that should have their staged session applied.\n", - "type": "object", - "properties": { - "succeeded": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - }, - "failed": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } - }, - "ignored": { - "description": "The list of component xnames", - "type": "array", - "items": { - "type": "string" - } + { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { + "type": "string", + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 } - }, - "additionalProperties": false } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 + ], + "get": { + "summary": "Retrieve the state of a single Component", + "description": "Retrieve the current and desired state of a single Component", + "tags": [ + "v2", + "components" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.components", + "operationId": "get_v2_component", + "responses": { + "200": { + "description": "A single Component state", + "content": { + "application/json": { + "schema": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": false } - } - } - } - } - } - }, - "/v2/options": { - "get": { - "summary": "Retrieve the BOS service options", - "tags": [ - "options" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.options", - "description": "Retrieve the list of BOS service options.", - "operationId": "get_v2_options", - "responses": { - "200": { - "description": "A collection of service-wide options", - "content": { - "application/json": { - "schema": { - "description": "Options for the boot orchestration service.\n", - "type": "object", - "properties": { - "cleanup_completed_session_ttl": { - "type": "string", - "description": "Delete complete sessions that are older than cleanup_completed_session_ttl (in hours). 0h disables cleanup behavior." - }, - "clear_stage": { - "type": "boolean", - "description": "Allows components staged information to be cleared when the requested staging action has been started. Defaults to false." - }, - "component_actual_state_ttl": { - "type": "string", - "description": "The maximum amount of time a component's actual state is considered valid (in hours). 0h disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically." - }, - "disable_components_on_completion": { - "type": "boolean", - "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS. If false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes." - }, - "discovery_frequency": { - "type": "integer", - "description": "How frequently the BOS discovery agent syncs new components from HSM. (in seconds)" - }, - "logging_level": { - "type": "string", - "description": "The logging level for all BOS services" - }, - "max_boot_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)" - }, - "max_power_on_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)" - }, - "max_power_off_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)" - }, - "polling_frequency": { - "type": "integer", - "description": "How frequently the BOS operators check component state for needed actions. (in seconds)" - }, - "default_retry_policy": { - "type": "integer", - "description": "The default maximum number attempts per node for failed actions.", - "example": 1 - }, - "max_component_batch_size": { - "type": "integer", - "description": "The maximum number of components that a BOS operator will process at once. 0 means no limit.", - "example": 1000, - "minimum": 0, - "maximum": 131071 - }, - "reject_nids": { - "type": "boolean", - "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started)." + }, + "put": { + "summary": "Add or Replace a single Component", + "description": "Update the state for a given Component in the BOS database", + "tags": [ + "v2", + "components" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.components", + "operationId": "put_v2_component", + "requestBody": { + "description": "The state for a single Component", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Component attributes that can be updated using the CLI\n", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } + }, + "responses": { + "200": { + "description": "A single Component state", + "content": { + "application/json": { + "schema": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } }, - "session_limit_required": { - "type": "boolean", - "description": "If true, Sessions cannot be created without specifying the limit parameter." + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": true } - } - } - } - } - }, - "patch": { - "summary": "Update BOS service options", - "tags": [ - "v2", - "options" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.options", - "operationId": "patch_v2_options", - "description": "Update one or more of the BOS service options.", - "requestBody": { - "description": "Service-wide options", - "required": true, - "content": { - "application/json": { - "schema": { - "description": "Options for the boot orchestration service.\n", - "type": "object", - "properties": { - "cleanup_completed_session_ttl": { - "type": "string", - "description": "Delete complete sessions that are older than cleanup_completed_session_ttl (in hours). 0h disables cleanup behavior." - }, - "clear_stage": { - "type": "boolean", - "description": "Allows components staged information to be cleared when the requested staging action has been started. Defaults to false." - }, - "component_actual_state_ttl": { - "type": "string", - "description": "The maximum amount of time a component's actual state is considered valid (in hours). 0h disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically." - }, - "disable_components_on_completion": { - "type": "boolean", - "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS. If false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes." - }, - "discovery_frequency": { - "type": "integer", - "description": "How frequently the BOS discovery agent syncs new components from HSM. (in seconds)" - }, - "logging_level": { - "type": "string", - "description": "The logging level for all BOS services" - }, - "max_boot_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)" - }, - "max_power_on_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)" - }, - "max_power_off_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)" - }, - "polling_frequency": { - "type": "integer", - "description": "How frequently the BOS operators check component state for needed actions. (in seconds)" - }, - "default_retry_policy": { - "type": "integer", - "description": "The default maximum number attempts per node for failed actions.", - "example": 1 - }, - "max_component_batch_size": { - "type": "integer", - "description": "The maximum number of components that a BOS operator will process at once. 0 means no limit.", - "example": 1000, - "minimum": 0, - "maximum": 131071 - }, - "reject_nids": { - "type": "boolean", - "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started)." - }, - "session_limit_required": { - "type": "boolean", - "description": "If true, Sessions cannot be created without specifying the limit parameter." - } + }, + "patch": { + "summary": "Update a single Component", + "description": "Update the state for a given Component in the BOS database", + "tags": [ + "v2", + "components" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.components", + "operationId": "patch_v2_component", + "requestBody": { + "description": "The state for a single Component", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Component attributes that can be updated using the CLI\n", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } }, - "additionalProperties": true - } - } - } - }, - "responses": { - "200": { - "description": "A collection of service-wide options", - "content": { - "application/json": { - "schema": { - "description": "Options for the boot orchestration service.\n", - "type": "object", - "properties": { - "cleanup_completed_session_ttl": { - "type": "string", - "description": "Delete complete sessions that are older than cleanup_completed_session_ttl (in hours). 0h disables cleanup behavior." - }, - "clear_stage": { - "type": "boolean", - "description": "Allows components staged information to be cleared when the requested staging action has been started. Defaults to false." - }, - "component_actual_state_ttl": { - "type": "string", - "description": "The maximum amount of time a component's actual state is considered valid (in hours). 0h disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically." - }, - "disable_components_on_completion": { - "type": "boolean", - "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS. If false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes." - }, - "discovery_frequency": { - "type": "integer", - "description": "How frequently the BOS discovery agent syncs new components from HSM. (in seconds)" - }, - "logging_level": { - "type": "string", - "description": "The logging level for all BOS services" - }, - "max_boot_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)" - }, - "max_power_on_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)" - }, - "max_power_off_wait_time": { - "type": "integer", - "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)" - }, - "polling_frequency": { - "type": "integer", - "description": "How frequently the BOS operators check component state for needed actions. (in seconds)" - }, - "default_retry_policy": { - "type": "integer", - "description": "The default maximum number attempts per node for failed actions.", - "example": 1 + "responses": { + "200": { + "description": "A single Component state", + "content": { + "application/json": { + "schema": { + "description": "The current and desired artifacts state for a Component, and\nthe Session responsible for the Component's current state.\n", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + }, + "actual_state": { + "description": "The actual boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "desired_state": { + "description": "The desired boot artifacts and configuration for a Component\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "bss_token": { + "type": "string", + "description": "A token received from the node identifying the boot artifacts.\nFor BOS use-only, users should not set this field. It will be overwritten.\n", + "maxLength": 65535 + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "staged_state": { + "description": "The staged boot artifacts and configuration for a Component. Optionally, a Session\nmay be set which can be triggered at a later time against this Component.\n", + "type": "object", + "properties": { + "boot_artifacts": { + "description": "A collection of boot artifacts.\n", + "type": "object", + "properties": { + "kernel": { + "type": "string", + "description": "A path to the kernel to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/kernel", + "maxLength": 4095 + }, + "kernel_parameters": { + "type": "string", + "description": "The kernel parameters to use to boot the nodes.", + "example": "console=ttyS0,115200 bad_page=panic crashkernel=340M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell turbo_boost_limit=999 spire_join_token=${SPIRE_JOIN_TOKEN}", + "maxLength": 4096 + }, + "initrd": { + "type": "string", + "description": "A path to the initrd to use for booting.", + "example": "s3://boot-images/9e3c75e1-ac42-42c7-873c-e758048897d6/initrd", + "maxLength": 4095 + } + }, + "additionalProperties": false + }, + "configuration": { + "type": "string", + "description": "The name of configuration to be applied.", + "example": "compute-23.4.0", + "maxLength": 127 + }, + "session": { + "type": "string" + }, + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + } + }, + "additionalProperties": false + }, + "last_action": { + "description": "Information on the most recent action taken against the node.\n", + "type": "object", + "properties": { + "last_updated": { + "type": "string", + "description": "The date/time when the state was last updated in RFC 3339 format.", + "example": "2019-07-28T03:26:00Z", + "format": "date-time", + "readOnly": true + }, + "action": { + "type": "string", + "description": "A description of the most recent operator/action to impact the Component.", + "maxLength": 1024 + }, + "failed": { + "type": "boolean", + "description": "Denotes if the last action failed to accomplish its task" + } + }, + "additionalProperties": false + }, + "event_stats": { + "description": "Information on the most recent attempt to return the node to its desired state.\n", + "type": "object", + "properties": { + "power_on_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-on since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_graceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off gracefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + }, + "power_off_forceful_attempts": { + "type": "integer", + "description": "How many attempts have been made to power-off forcefully since the last time the node was in the desired state.", + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false + }, + "status": { + "description": "Status information for the Component", + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "The current phase of the Component in the boot process.", + "maxLength": 128 + }, + "status": { + "type": "string", + "description": "The current status of the Component. More detailed than phase.", + "readOnly": true + }, + "status_override": { + "type": "string", + "description": "If set, this will override the status value.", + "maxLength": 65536 + } + }, + "additionalProperties": false + }, + "enabled": { + "type": "boolean", + "description": "A flag indicating if actions should be taken for this Component." + }, + "error": { + "type": "string", + "description": "A description of the most recent error to impact the Component.", + "maxLength": 65536 + }, + "session": { + "type": "string" + }, + "retry_policy": { + "type": "integer", + "description": "The maximum number attempts per action when actions fail.\nDefaults to the global default_retry_policy if not set\n", + "example": 1, + "minimum": 0, + "maximum": 1048576 + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } }, - "max_component_batch_size": { - "type": "integer", - "description": "The maximum number of components that a BOS operator will process at once. 0 means no limit.", - "example": 1000, - "minimum": 0, - "maximum": 131071 + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } }, - "reject_nids": { - "type": "boolean", - "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started)." + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } }, - "session_limit_required": { - "type": "boolean", - "description": "If true, Sessions cannot be created without specifying the limit parameter." + "409": { + "description": "The update was not allowed due to a conflict.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } + } + } + }, + "delete": { + "summary": "Delete a single Component", + "description": "Delete the given Component", + "tags": [ + "v2", + "components", + "cli_ignore" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.components", + "operationId": "delete_v2_component", + "responses": { + "204": { + "description": "The resource was deleted." + }, + "404": { + "description": "The resource was not found.", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": true } - } } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" + }, + "/v2/applystaged": { + "parameters": [ + { + "name": "Cray-Tenant-Name", + "in": "header", + "description": "Tenant name.\n\nRequests with a non-empty tenant name will restict the context of the operation to Session Templates owned by that tenant.\n\nRequests with an empty tenant name, or that omit this parameter, will have no such context restrictions.\n", + "required": false, + "schema": { + "type": "string", + "description": "Name of a tenant. Used for multi-tenancy. An empty string means no tenant.", + "example": "vcluster-my-tenant1", + "maxLength": 127 + } + } + ], + "post": { + "summary": "Start a staged Session for the specified Components", + "description": "Given a list of xnames, this will trigger the start of any Sessions\nstaged for those Components. Components without a staged Session\nwill be ignored, and a list all Components that are acted on will\nbe returned in the response.\n", + "tags": [ + "v2", + "applystaged" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.components", + "operationId": "post_v2_apply_staged", + "requestBody": { + "description": "A list of xnames that should have their staged Session applied.", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "A list of Components that should have their staged Session applied.\n", + "type": "object", + "properties": { + "xnames": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } + } + }, + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "A list of xnames that should have their staged Session applied.", + "content": { + "application/json": { + "schema": { + "description": "Mapping from Component staged Session statuses to Components with that status.\n", + "type": "object", + "properties": { + "succeeded": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } + }, + "failed": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } + }, + "ignored": { + "description": "A list of Component IDs (xnames)", + "type": "array", + "maxItems": 32768, + "items": { + "type": "string", + "description": "The Component's ID. (e.g. xname for hardware Components)", + "minLength": 1, + "maxLength": 127 + } + } + }, + "additionalProperties": false + } + } + } }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": false } - } } - } - } - } - }, - "/v2/version": { - "get": { - "summary": "Get API version", - "tags": [ - "v2", - "version" - ], - "x-openapi-router-controller": "bos.server.controllers.v2.base", - "operationId": "get_version_v2", - "responses": { - "200": { - "description": "Get version details\nThe versioning system uses [semver](https://semver.org/).\n## Link Relationships\n* self : Link to itself\n* versions : Link back to the versions resource\n", - "content": { - "application/json": { - "schema": { - "description": "Version data", - "type": "object", - "properties": { - "major": { - "type": "integer" - }, - "minor": { - "type": "integer" - }, - "patch": { - "type": "integer" + }, + "/v2/options": { + "get": { + "summary": "Retrieve the BOS service options", + "description": "Retrieve the list of BOS service options.", + "tags": [ + "options" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.options", + "operationId": "get_v2_options", + "responses": { + "200": { + "description": "A collection of service-wide options", + "content": { + "application/json": { + "schema": { + "description": "Options for the Boot Orchestration Service.\n", + "type": "object", + "properties": { + "cleanup_completed_session_ttl": { + "type": "string", + "description": "Delete complete Sessions that are older than cleanup_completed_session_ttl (in minutes, hours, days, or weeks).\n0 disables cleanup behavior.\n", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "clear_stage": { + "type": "boolean", + "description": "Allows a Component's staged information to be cleared when the requested staging action has been started. Defaults to false." + }, + "component_actual_state_ttl": { + "type": "string", + "description": "The maximum amount of time a Component's actual state is considered valid (in minutes, hours, days, or weeks).\n0 disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically.\n", + "example": "6h", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "disable_components_on_completion": { + "type": "boolean", + "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS.\nIf false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes.\n" + }, + "discovery_frequency": { + "type": "integer", + "description": "How frequently the BOS discovery agent syncs new Components from HSM (in seconds)", + "minimum": 0, + "maximum": 33554432 + }, + "logging_level": { + "type": "string", + "description": "The logging level for all BOS services", + "pattern": "^([dD][eE][bB][uU][gG]|[iI][nN][fF][oO]|[wW][aA][rR][nN][iI][nN][gG]|[eE][rR][rR][oO][rR]|[cC][rR][iI][tT][iI][cC][aA][lL])$" + }, + "max_boot_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_on_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_off_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "polling_frequency": { + "type": "integer", + "description": "How frequently the BOS operators check Component state for needed actions (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "default_retry_policy": { + "type": "integer", + "description": "The default maximum number attempts per node for failed actions.", + "example": 1, + "minimum": 0, + "maximum": 1048576 + }, + "max_component_batch_size": { + "type": "integer", + "description": "The maximum number of Components that a BOS operator will process at once. 0 means no limit.", + "example": 1000, + "minimum": 0, + "maximum": 131071 + }, + "reject_nids": { + "type": "boolean", + "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started).\n" + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, Sessions cannot be created without specifying the limit parameter." + } + }, + "additionalProperties": true, + "minProperties": 1, + "maxProperties": 1024 + } + } + } + } + } + }, + "patch": { + "summary": "Update BOS service options", + "description": "Update one or more of the BOS service options.", + "tags": [ + "v2", + "options" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.options", + "operationId": "patch_v2_options", + "requestBody": { + "description": "Service-wide options", + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Options for the Boot Orchestration Service.\n", + "type": "object", + "properties": { + "cleanup_completed_session_ttl": { + "type": "string", + "description": "Delete complete Sessions that are older than cleanup_completed_session_ttl (in minutes, hours, days, or weeks).\n0 disables cleanup behavior.\n", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "clear_stage": { + "type": "boolean", + "description": "Allows a Component's staged information to be cleared when the requested staging action has been started. Defaults to false." + }, + "component_actual_state_ttl": { + "type": "string", + "description": "The maximum amount of time a Component's actual state is considered valid (in minutes, hours, days, or weeks).\n0 disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically.\n", + "example": "6h", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "disable_components_on_completion": { + "type": "boolean", + "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS.\nIf false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes.\n" + }, + "discovery_frequency": { + "type": "integer", + "description": "How frequently the BOS discovery agent syncs new Components from HSM (in seconds)", + "minimum": 0, + "maximum": 33554432 + }, + "logging_level": { + "type": "string", + "description": "The logging level for all BOS services", + "pattern": "^([dD][eE][bB][uU][gG]|[iI][nN][fF][oO]|[wW][aA][rR][nN][iI][nN][gG]|[eE][rR][rR][oO][rR]|[cC][rR][iI][tT][iI][cC][aA][lL])$" + }, + "max_boot_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_on_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_off_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "polling_frequency": { + "type": "integer", + "description": "How frequently the BOS operators check Component state for needed actions (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "default_retry_policy": { + "type": "integer", + "description": "The default maximum number attempts per node for failed actions.", + "example": 1, + "minimum": 0, + "maximum": 1048576 + }, + "max_component_batch_size": { + "type": "integer", + "description": "The maximum number of Components that a BOS operator will process at once. 0 means no limit.", + "example": 1000, + "minimum": 0, + "maximum": 131071 + }, + "reject_nids": { + "type": "boolean", + "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started).\n" + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, Sessions cannot be created without specifying the limit parameter." + } + }, + "additionalProperties": true, + "minProperties": 1, + "maxProperties": 1024 + } + } + } + }, + "responses": { + "200": { + "description": "A collection of service-wide options", + "content": { + "application/json": { + "schema": { + "description": "Options for the Boot Orchestration Service.\n", + "type": "object", + "properties": { + "cleanup_completed_session_ttl": { + "type": "string", + "description": "Delete complete Sessions that are older than cleanup_completed_session_ttl (in minutes, hours, days, or weeks).\n0 disables cleanup behavior.\n", + "example": "3d", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "clear_stage": { + "type": "boolean", + "description": "Allows a Component's staged information to be cleared when the requested staging action has been started. Defaults to false." + }, + "component_actual_state_ttl": { + "type": "string", + "description": "The maximum amount of time a Component's actual state is considered valid (in minutes, hours, days, or weeks).\n0 disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically.\n", + "example": "6h", + "pattern": "^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$", + "minLength": 1, + "maxLength": 8 + }, + "disable_components_on_completion": { + "type": "boolean", + "description": "If true, when a Session has brought a Component to its desired state, that Component will be marked as disabled in BOS.\nIf false, BOS will continue to maintain the state of the nodes declaratively, even after a Session finishes.\n" + }, + "discovery_frequency": { + "type": "integer", + "description": "How frequently the BOS discovery agent syncs new Components from HSM (in seconds)", + "minimum": 0, + "maximum": 33554432 + }, + "logging_level": { + "type": "string", + "description": "The logging level for all BOS services", + "pattern": "^([dD][eE][bB][uU][gG]|[iI][nN][fF][oO]|[wW][aA][rR][nN][iI][nN][gG]|[eE][rR][rR][oO][rR]|[cC][rR][iI][tT][iI][cC][aA][lL])$" + }, + "max_boot_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to boot into a usable state before rebooting it again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_on_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power on before calling power on again (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "max_power_off_wait_time": { + "type": "integer", + "description": "How long BOS will wait for a node to power off before forcefully powering off (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "polling_frequency": { + "type": "integer", + "description": "How frequently the BOS operators check Component state for needed actions (in seconds)", + "minimum": 0, + "maximum": 1048576 + }, + "default_retry_policy": { + "type": "integer", + "description": "The default maximum number attempts per node for failed actions.", + "example": 1, + "minimum": 0, + "maximum": 1048576 + }, + "max_component_batch_size": { + "type": "integer", + "description": "The maximum number of Components that a BOS operator will process at once. 0 means no limit.", + "example": 1000, + "minimum": 0, + "maximum": 131071 + }, + "reject_nids": { + "type": "boolean", + "description": "If true, then BOS will attempt to prevent Sessions and Session Templates that reference NIDs (which BOS does not support).\nSpecifically, if this option is true, then:\n- When creating a Session, if the Session limit or a Session Template node list appear to contain NID values, then Session creation will fail.\n- When creating a Session Template, if a node list appears to contain a NID value, then the Session Template creation will fail.\n- When validating an existing Session Template, if a node list appears to contain a NID value, then the validation will report an error.\n\nThis option does NOT have an effect on Sessions that were created prior to it being enabled (even if they have not yet started).\n" + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, Sessions cannot be created without specifying the limit parameter." + } + }, + "additionalProperties": true, + "minProperties": 1, + "maxProperties": 1024 + } + } + } }, - "links": { - "type": "array", - "items": { - "description": "Link to other resources", - "type": "object", - "properties": { - "rel": { - "type": "string" - }, - "href": { - "type": "string" - } - }, - "additionalProperties": false - } + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": false } - } } - }, - "500": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "description": "An error response for RFC 7807 problem details.", - "type": "object", - "properties": { - "type": { - "description": "Relative URI reference to the type of problem which includes human readable documentation.", - "type": "string", - "format": "uri", - "default": "about:blank" - }, - "title": { - "description": "Short, human-readable summary of the problem, should not change by occurrence.", - "type": "string" - }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 - }, - "instance": { - "description": "A relative URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string" + }, + "/v2/version": { + "get": { + "summary": "Get API version", + "description": "Return the API version", + "tags": [ + "v2", + "version" + ], + "x-openapi-router-controller": "bos.server.controllers.v2.base", + "operationId": "get_version_v2", + "responses": { + "200": { + "description": "Get version details\nThe versioning system uses [semver](https://semver.org/).\n## Link Relationships\n* self : Link to itself\n* versions : Link back to the versions resource\n", + "content": { + "application/json": { + "schema": { + "description": "Version data", + "type": "object", + "properties": { + "major": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "minor": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "patch": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "links": { + "description": "List of links to other resources", + "type": "array", + "items": { + "description": "Link to other resources", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + } + } }, - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.", - "type": "string" + "500": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "description": "An error response for RFC 7807 problem details.", + "type": "object", + "properties": { + "type": { + "description": "Relative URI reference to the type of problem which includes human\nreadable documentation.\n", + "type": "string", + "format": "uri", + "default": "about:blank" + }, + "title": { + "description": "Short, human-readable summary of the problem, should not change by\noccurrence.\n", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "instance": { + "description": "A relative URI reference that identifies the specific occurrence of\nthe problem\n", + "format": "uri", + "type": "string" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the\nproblem. Focus on helping correct the problem, rather than giving\ndebugging information.\n", + "type": "string" + } + }, + "additionalProperties": false + } + } + } } - }, - "additionalProperties": false } - } } - } } - } } - } -} +} \ No newline at end of file diff --git a/cray/tests/test_modules/test_bos.py b/cray/tests/test_modules/test_bos.py index e3be77d..25d0b8d 100644 --- a/cray/tests/test_modules/test_bos.py +++ b/cray/tests/test_modules/test_bos.py @@ -58,6 +58,8 @@ def test_cray_bos_base(cli_runner, rest_mock): outputs = ['Boot Orchestration Service', 'Groups:'] + BOS_V2_GROUPS + ['Commands:', 'list'] for txt in outputs: assert txt in result.output + # v1 should no longer be listed + assert 'v1' not in result.output def test_cray_bos_list(cli_runner, rest_mock):