#ljmetas: # tags: {'role': 'cmc_appliance_upgrade'} $schema: 'http://support.riverbed.com/apis/service_def/2.2' id: 'http://support.riverbed.com/apis/cmc.upgrades/1.0' provider: 'riverbed' name: cmc.upgrades version: "1.0" title: SCC Upgrades service definition defaultAuthorization: required documentationLink: "http://leeroy.lab.nbttech.com/qadocs/designdocs/upgrades/upgrade_api.html" types: product_code: type: string description: The product code of the appliance enum: ['SH', 'EX', 'IC', 'SMC', 'WW', 'GC'] arch: type: string description: The architecture of the appliance enum: ['x86_64', 'i386'] serial: type: string description: The serial number of the appliance pattern: '^[A-Za-z][0-9A-Fa-f]{2}[A-Za-z]{0,2}[0-9A-Fa-f]{8}$' image_definition: type: object description: Properties that uniquely identify a Riverbed software image required: [product_code, arch, target_version, delta] properties: product_code: $ref: '#/types/product_code' arch: $ref: '#/types/arch' target_version: $ref: '#/types/version' delta: type: boolean description: Whether the image is a delta image source_version: $merge: source: { $ref: '#/types/version' } with: { description: The source version (if delta image is true) } image_repository: type: string description: An image repository provides a set of distinct images. The distinct meaning each has a different image definition enum: ['customer', 'riverbed'] image_source: type: string description: The source of the image. A repository can have multiple sources but particular source cannot be in more than one repository enum: ['local', 'customer_url', 'riverbed'] version: type: object description: The version of a software image required: [version_id] properties: version_id: type: string description: A unique identifier for a version of a product. Is an amalgem of all the information in the following fields version_number: type: string description: The released version name. A dotted decimal with optional trailing characters to identify fix releases and customer specific releases build_number: type: string description: The build number. Distinguishes prerelease versions. For any given general availability version_number there is a specific build number build_timestamp: $merge: source: { $ref: '#/types/timestamp' } with: { description: The date and time of the build } timestamp: type: number description: The timestamp of the build username: type: string description: The name of the user that scheduled the operation or task operation_status: type: string description: The current state of the operation. Partially successful means that some of the operation's appliance tasks were successful but others were not enum: ['scheduled', 'running', 'successful', 'partially_successful', 'failed', 'cancelled'] appliance_task_status: type: string description: The current task status of the per appliance enum: ['scheduled', 'running', 'successful', 'failed', 'cancelled'] appliance_upgrade_task_stage: type: string description: The current progress of the appliance upgrade task enum: ['waiting', 'initiating', 'downloading', 'patching', 'installing', 'completed', 'failed', 'cancelled'] appliance_downgrade_task_stage: type: string description: The current progress of the per appliance downgrade task enum: ['waiting', 'initiating', 'downloading', 'installing', 'completed', 'failed', 'cancelled'] appliance_reboot_task_stage: type: string description: The current progress of the per appliance reboot task enum: ['waiting', 'initiating', 'rebooting', 'reboot_wait', 'completed', 'failed', 'cancelled'] scheduled_time: type: object description: The date and time of the run operation required: [datetime, time_type] properties: datetime: $ref: '#/types/timestamp' time_type: type: string description: Whether this represents an absolute time or the local time of the managed appliance enum: ['utc', 'local'] log_entry: type: object description: A timestamped log line required: [timestamp, severity, log_entry] properties: timestamp: { $ref: '#/types/timestamp' } log_entry: { type: string } severity: type: string enum: ['emerg', 'alert', 'crit', 'err', 'warning', 'notice', 'info', 'debug'] log: type: array description: A series of timestamped log entries items: $ref: '#/types/log_entry' logging_level: type: string description: Severity levels for logs emitted by the service enum: ['crit', 'err', 'warning', 'notice', 'info', 'debug'] resources: ############################################################################# # Riverbed Upgrade Image Resources ############################################################################# images: type: array description: All available Riverbed software images items: $ref: '#/resources/image' links: self: path: "$/images" params: # Filtering parameters product_code: $ref: '#/types/product_code' get: method: GET response: $ref: '#/resources/images' image: type: object description: A Riverbed software image required: [id, image_definition, image_sources] properties: id: type: string description: A unique identifier for the image readOnly: true image_definition: $ref: '#/types/image_definition' image_sources: type: array items: $ref: '#/types/image_source' links: self: path: "$/images/{id}" get: method: GET response: $ref: '#/resources/image' image_repositories: description: An unmodifiable collection of all supported repositories type: array items: $ref: '#/types/image_repository' links: self: path: "$/image_repositories" get: method: GET response: $ref: '#/types/image_repository' locally_hosted_images: description: Riverbed software images hosted locally on the SCC type: array items: $ref: '#/resources/locally_hosted_image' links: self: path: "$/image_repositories/customer/local_images" get: method: GET response: $ref: '#/resources/locally_hosted_images' upload: method: POST description: Upload an image using a URL request: type: object properties: url: type: string description: Can be a file URL in case the Web service has uploaded a file onto the SCC #format: uri response: $ref: '#/resources/locally_hosted_image' locally_hosted_image: type: object description: A Riverbed software image hosted locally on the SCC required: [id, image_definition, modification_time] properties: id: type: string description: A unique identifier readOnly: true image_definition: $ref: '#/types/image_definition' modification_time: $ref: '#/types/timestamp' links: self: path: "$/image_repositories/customer/local_image/{id}" get: method: GET response: $ref: '#/resources/locally_hosted_image' delete: method: DELETE customer_url_hosted_images: description: Riverbed software images hosted on a remote URL type: array items: $ref: '#/resources/customer_url_hosted_image' links: self: path: "$/image_repositories/customer/urls" get: method: GET response: $ref: '#/resources/customer_url_hosted_images' register: method: POST description: Register a new URL request: type: object properties: url: type: string #format: uri response: $ref: '#/resources/customer_url_hosted_image' customer_url_hosted_image: type: object description: A Riverbed software image hosted on a remote URL required: [id, image_definition, url, registration_time] properties: id: type: string description: A unique identifier image_definition: $ref: '#/types/image_definition' url: type: string #format: uri registration_time: $merge: source: { $ref: '#/types/timestamp' } with: { description: The time that the URL was registered } links: self: path: "$/image_repositories/customer/url/{id}" get: method: GET response: $ref: '#/resources/customer_url_hosted_image' delete: method: DELETE riverbed_hosted_images: description: Riverbed software images hosted by Riverbed Support type: array items: $ref: '#/resources/riverbed_hosted_image' links: self: path: "$/image_repositories/riverbed/images" get: method: GET response: $ref: '#/resources/riverbed_hosted_images' riverbed_hosted_image: type: object description: A Riverbed software image hosted by Riverbed Support required: [image_definition, url, source_versions] properties: id: type: string description: A unique identifier image_definition: $ref: '#/types/image_definition' url: type: string #format: uri source_versions: type: array description: Source versions that Riverbed supports for upgrading items: $ref: '#/types/version' links: self: path: "$/image_repositories/riverbed/image/{id}" get: method: GET response: $ref: '#/resources/riverbed_hosted_image' ############################################################################# # Appliance Resources ############################################################################# connected_product_codes: description: A collection of unique product codes currently connected to the SCC type: array items: $ref: '#/types/product_code' links: self: path: "$/connected_product_codes" get: description: The list of unique product codes that the SCC is currently managing method: GET response: $ref: '#/resources/connected_product_codes' appliances: description: A collection of appliances managed by the SCC type: array items: $ref: '#/resources/appliance' links: self: path: "$/appliances/{product_code}" get: description: Appliances managed by the SCC optionally filtered by product_code and/or group membership method: GET response: $ref: '#/resources/appliances' appliance: description: Information about an appliance required: [product_code, serial, connected] type: object properties: product_code: $ref: '#/types/product_code' arch: $ref: '#/types/arch' serial: $ref: '#/types/serial' model: type: string description: The model of the appliance hostname: type: string description: The hostname of the appliance ip_address: type: string description: The IP address of the appliance current_version: $merge: source: { $ref: '#/types/version' } with: { description: The RiOS version currently running on the appliance } connected: type: boolean description: Appliance is connected or disconnected time_zone: type: string description: Appliance time zone in the Olson database format entitled: type: boolean description: Appliance is entitled or not read_only: type: boolean description: Whether the user is able to upgrade, downgrade, or reboot groups: type: array description: An array of groups the appliance belongs to items: type: string links: self: description: URI for instance of an appliance path: "$/appliances/{product_code}/{serial}" get: description: Get the current state of an appliance method: GET response: $ref: '#/resources/appliance' relations: instances: resource: '#/resources/appliances' upgradeable_appliances: description: Appliances that can be upgraded to a specified version type: object properties: upgradeable: type: array items: $ref: '#/resources/appliance' exceptions: type: object description: A list of appliances which cannot be upgraded categorized by reason properties: unentitled: type: array items: $ref: '#/resources/appliance' model_eol: type: array items: $ref: '#/resources/appliance' read_only: type: array items: $ref: '#/resources/appliance' disconnected: type: array items: $ref: '#/resources/appliance' not_supported: type: array items: $ref: '#/resources/appliance' no_i386_image: type: array items: $ref: '#/resources/appliance' no_x86_64_image: type: array items: $ref: '#/resources/appliance' operation_in_progress: type: array items: $ref: '#/resources/appliance' same_or_newer_version: type: array items: $ref: '#/resources/appliance' links: self: path: "$/upgradeable_appliances/{product_code}/{version_id}" get: description: Appliances managed by the SCC that can be upgraded to the target version method: GET response: $ref: '#/resources/upgradeable_appliances' downgradeable_appliances: description: Appliances that can be downgraded to a specified version. In the case of downgrades the version needs to have been previously upgraded. The images also have to be in the customer repository. type: object properties: downgradeable: type: array items: $ref: '#/resources/appliance' exceptions: type: object description: A list of appliances that cannot be downgraded or categorized by reason properties: read_only: type: array items: $ref: '#/resources/appliance' disconnected: type: array items: $ref: '#/resources/appliance' not_supported: type: array items: $ref: '#/resources/appliance' not_previously_upgraded_to: type: array items: $ref: '#/resources/appliance' no_i386_image: type: array items: $ref: '#/resources/appliance' no_x86_64_image: type: array items: $ref: '#/resources/appliance' operation_in_progress: type: array items: $ref: '#/resources/appliance' same_or_older_version: type: array items: $ref: '#/resources/appliance' links: self: path: "$/downgradeable_appliances/{product_code}/{version_id}" get: description: Appliances managed by the SCC that can be downgraded to the target version method: GET response: $ref: '#/resources/downgradeable_appliances' rebootable_appliances: description: Appliances that can be rebooted and a list of appliances that cannot type: object properties: rebootable: type: array items: $ref: '#/resources/appliance' exceptions: type: object description: A list of appliances that cannot be rebooted or categorized by reason properties: read_only: type: array items: $ref: '#/resources/appliance' disconnected: type: array items: $ref: '#/resources/appliance' not_supported: type: array items: $ref: '#/resources/appliance' operation_in_progress: type: array items: $ref: '#/resources/appliance' links: self: path: "$/rebootable_appliances/{product_code}" get: description: Appliances managed by the SCC that can be rebooted method: GET response: $ref: '#/resources/rebootable_appliances' upgradeable_versions: type: array description: A list of upgradeable versions for a specified product code items: type: object properties: product_code: $ref: '#/types/product_code' version: $ref: '#/types/version' links: self: path: "$/versions/upgradeable/{product_code}" get: method: GET response: $ref: '#/resources/upgradeable_versions' downgradeable_versions: type: array description: A list of downgradeable versions for a specified product code items: type: object properties: product_code: $ref: '#/types/product_code' version: $ref: '#/types/version' links: self: path: "$/versions/downgradeable/{product_code}" get: method: GET response: $ref: '#/resources/downgradeable_versions' ############################################################################# # Upgrade Operations ############################################################################# upgrade_operations: description: Upgrade operations type: array items: $ref: '#/resources/upgrade_operation' links: self: path: "$/operations/upgrade" params: username: {type: string} time_lower_bound: {$ref: '#/types/timestamp'} time_upper_bound: {$ref: '#/types/timestamp'} status: {$ref: '#/types/operation_status'} get: method: GET response: $ref: '#/resources/upgrade_operations' create: method: POST request: { $ref: '#/resources/upgrade_operation' } response: { $ref: '#/resources/upgrade_operation' } upgrade_operation: description: Details about an upgrade operation required: [username, product_code, target_version, reboot, comment, appliances] type: object properties: id: type: string description: A unique identifier for a operation readOnly: true username: $merge: source: { $ref: '#/types/username' } with: { readOnly: true } create_time: type: string description: The time when the upgrade operation was created readOnly: true status: $merge: source: { $ref: '#/types/operation_status' } with: { readOnly: true } product_code: $ref: '#/types/product_code' upgrade_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time. The system stores this value as the UTC value of the upgrade time, regardless of the schedule type (local or UTC). target_version: $merge: source: { $ref: '#/types/version' } with: { description: The software version to upgrade to } reboot: type: boolean description: Whether to perform a reboot after upgrading reboot_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time. The system stores this value as the UTC value of the upgrade time, regardless of the schedule type (local or UTC). esxi_force: type: boolean description: Allow the upgrade to proceed even if it will result in replacing the currently installed version of ESXi or its configuration. comment: type: string description: User comment for an operation reboot_id: type: number description: Specifies the ID of the associated reboot operation if a reboot is requested after upgrade appliances: # All must be of the same product type type: array description: Appliances to upgrade items: $merge: source: { $ref: '#/types/serial' } with: relations: appliance_upgrade_task: resource: '#/resources/appliance_upgrade_task' vars: operation_id: "1/id" serial: "0/serial" appliance_reboot_task: resource: '#/resources/appliance_reboot_task' vars: operation_id: "1/reboot_id" serial: "0/serial" links: self: path: "$/operations/upgrade/{id}" get: method: GET response: $ref: '#/resources/upgrade_operation' cancel: path: "$/operations/upgrade/{id}/cancel" method: POST relations: upgrade_operation_log: resource: '#/resources/upgrade_operation_log' vars: operation_id: '0/id' upgrade_operation_log: type: object description: Log messages associated with the operation properties: operation_id: type: string description: A unique identifier for the operation that the log belongs to log: $ref: '#/types/log' links: self: path: "$/operations/upgrade/{operation_id}/log" get: method: GET response: $ref: '#/resources/upgrade_operation_log' ############################################################################# # Downgrade Operations ############################################################################# downgrade_operations: description: Downgrade operations type: array items: $ref: '#/resources/downgrade_operation' links: self: path: "$/operations/downgrade" params: username: {type: string} time_lower_bound: {$ref: '#/types/timestamp'} time_upper_bound: {$ref: '#/types/timestamp'} status: {$ref: '#/types/operation_status'} get: method: GET response: $ref: '#/resources/downgrade_operations' create: method: POST request: { $ref: '#/resources/downgrade_operation' } response: { $ref: '#/resources/downgrade_operation' } downgrade_operation: description: Details about an downgrade operation required: [username, product_code, target_version, reboot, comment, appliances] type: object properties: id: type: string description: A unique identifier for an operation readOnly: true username: $merge: source: { $ref: '#/types/username' } with: { readOnly: true } create_time: type: string description: The time when the downgrade operation was created readOnly: true status: $merge: source: { $ref: '#/types/operation_status' } with: { readOnly: true } product_code: $ref: '#/types/product_code' downgrade_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time. The system stores this value as the UTC value of the upgrade time, regardless of the schedule type (local or UTC). target_version: $merge: source: { $ref: '#/types/version' } with: { description: The software version to downgrade to } reboot: type: boolean description: Whether to perform a reboot after downgrading reboot_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time. The system stores this value as the UTC value of the upgrade time, regardless of the schedule type (local or UTC). esxi_force: type: boolean description: Allow the downgrade to proceed even if it will result in replacing the currently installed version of ESXi or its configuration. comment: type: string description: User comment for an operation appliances: # All must be of the same product type type: array description: Appliances to downgrade items: $merge: source: { $ref: '#/types/serial' } with: relations: appliance_downgrade_task: resource: '#/resources/appliance_downgrade_task' vars: operation_id: "1/id" serial: "0/serial" appliance_reboot_task: resource: '#/resources/appliance_reboot_task' vars: operation_id: "1/id" serial: "0/serial" links: self: path: "$/operations/downgrade/{id}" get: method: GET response: $ref: '#/resources/downgrade_operation' cancel: path: "$/operations/downgrade/{id}/cancel" method: POST relations: downgrade_operation_log: resource: '#/resources/downgrade_operation_log' vars: operation_id: '0/id' downgrade_operation_log: type: object description: Log messages associated with the operation properties: operation_id: type: string description: A unique identifier for the operation that the log belongs to log: $ref: '#/types/log' links: self: path: "$/operations/downgrade/{operation_id}/log" get: method: GET response: $ref: '#/resources/downgrade_operation_log' ############################################################################# # Reboot Operations ############################################################################# reboot_operations: description: Reboot operations type: array items: $ref: '#/resources/reboot_operation' links: self: path: "$/operations/reboot" params: username: {type: string} time_lower_bound: {$ref: '#/types/timestamp'} time_upper_bound: {$ref: '#/types/timestamp'} status: {$ref: '#/types/operation_status'} get: method: GET response: $ref: '#/resources/reboot_operations' create: method: POST request: { $ref: '#/resources/reboot_operation' } response: { $ref: '#/resources/reboot_operation' } reboot_operation: description: Details about a reboot operation required: [username, comment, appliances] type: object properties: id: type: string description: A unique identifier for an operation readOnly: true username: $merge: source: { $ref: '#/types/username' } with: { readOnly: true } create_time: type: string description: The time when the reboot operation was created readOnly: true status: $merge: source: { $ref: '#/types/operation_status' } with: { readOnly: true } switch_partition: type: boolean description: Specifies whether to switch to the other partition. Treated as false if not specified. reboot_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time. The system stores this value as the UTC value of the upgrade time, regardless of the schedule type (local or UTC). comment: type: string description: User comment for an operation upgrade_id: type: string description: The upgrade operation that triggered this reboot operation. downgrade_id: type: string description: The downgrade operation that triggered this reboot operation. appliances: # All must be of the same product type type: array items: $merge: source: { $ref: '#/types/serial' } with: relations: appliance_reboot_task: resource: '#/resources/appliance_reboot_task' vars: operation_id: "1/id" serial: "0/serial" links: self: path: "$/operations/reboot/{id}" get: method: GET response: $ref: '#/resources/reboot_operation' cancel: path: "$/operations/reboot/{id}/cancel" method: POST relations: reboot_operation_log: resource: '#/resources/reboot_operation_log' vars: operation_id: '0/id' reboot_operation_log: type: object description: Log messages associated with the operation properties: operation_id: type: string description: A unique identifier for the operation that the log belongs to log: $ref: '#/types/log' links: self: path: "$/operations/reboot/{operation_id}/log" get: method: GET response: $ref: '#/resources/reboot_operation_log' ############################################################################# # Appliance Upgrade Tasks ############################################################################# appliance_upgrade_task: description: Details about the upgrade of a specific appliance in an operation type: object required: [operation_id, target_version, reboot, current_version] properties: operation_id: type: string description: A unique identifier for the operation that the appliance task belongs to serial: $ref: '#/types/serial' # If the operation schedule time(s) are specified in managed appliance "local" time, the # appliance time zone is determined and the time is converted into an absolute time in UTC # here. If the appliance time zone setting changes after the task is created, the time # will NOT be corrected. upgrade_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time, adjusted for the local time of the device being upgraded, if scheduling in local time. task_start_time: $merge: source: { $ref: '#/types/scheduled_time' } with: { description: The time when the task was actually run } target_version: $merge: source: { $ref: '#/types/version' } with: { description: The software version to upgrade to } reboot: type: boolean description: Whether to perform a reboot after upgrading reboot_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time, adjusted for the local time of the device being upgraded, if scheduling in local time. esxi_force: type: boolean current_version: $merge: source: { $ref: '#/types/version' } with: { description: The software version on this appliance at the time the operation was scheduled } hostname: type: string description: Hostname of the appliance links: self: path: "$/operations/upgrade/{operation_id}/appliances/{serial}" get: method: GET response: $ref: '#/resources/appliance_upgrade_task' cancel: path: "$/operations/upgrade/{operation_id}/appliances/{serial}/cancel" method: POST relations: operation: resource: '#/resources/upgrade_operation' vars: id: '0/operation_id' appliance: resource: '#/resources/appliance' vars: serial: '0/serial' appliance_upgrade_task_state: resource: '#/resources/appliance_upgrade_task_state' vars: operation_id: '0/operation_id' serial: '0/serial' appliance_upgrade_task_log: resource: '#/resources/appliance_upgrade_task_log' vars: operation_id: '0/operation_id' serial: '0/serial' appliance_upgrade_task_state: description: The status of the upgrade of a single appliance of an operation type: object # Strip out the redundant operation_id and serial fields from required since # they are specified in the URI to make Upgraded's life easier. # required: [operation_id, serial, status, stage] required: [status, stage] properties: operation_id: type: string description: A unique identifier for the operation that the appliance task belongs to readOnly: true serial: $merge: source: { $ref: '#/types/serial' } with: { readOnly: true } status: $ref: '#/types/appliance_task_status' stage: $ref: '#/types/appliance_upgrade_task_stage' links: self: path: "$/operations/upgrade/{operation_id}/appliances/{serial}/state" get: method: GET response: $ref: '#/resources/appliance_upgrade_task_state' set: method: PUT request: { $ref: '#/resources/appliance_upgrade_task_state' } response: { $ref: '#/resources/appliance_upgrade_task_state' } appliance_upgrade_task_log: type: object description: Log messages associated with the appliance task properties: operation_id: type: string description: A unique identifier for the operation that the log belongs to readOnly: true serial: $merge: source: { $ref: '#/types/serial' } with: { readOnly: true } log: $ref: '#/types/log' links: self: path: "$/operations/upgrade/{operation_id}/appliances/{serial}/log" get: method: GET response: $ref: '#/resources/appliance_upgrade_task_log' append: method: POST description: Append a log entry to the log. Use restricted for internal services request: { $ref: '#/types/log_entry' } ############################################################################# # Appliance Downgrade Tasks ############################################################################# appliance_downgrade_task: description: Details about the downgrade of a specific appliance in an operation type: object required: [operation_id, serial, target_version, reboot, current_version] properties: operation_id: type: string description: A unique identifier for the operation that the appliance task belongs to serial: $ref: '#/types/serial' # If the operation schedule time(s) are specified in managed appliance "local" time, the # appliance time zone is determined and the time is converted into an absolute time in UTC # here. If the appliance time zone setting changes after the task is created, the time # will NOT be corrected. downgrade_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time, adjusted for the local time of the device being upgraded, if scheduling in local time. task_start_time: $merge: source: { $ref: '#/types/scheduled_time' } with: { description: The time when the task was actually run } target_version: $merge: source: { $ref: '#/types/version' } with: { description: The software version to downgrade to } reboot: type: boolean description: Whether to perform a reboot after downgrading reboot_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time, adjusted for the local time of the device being upgraded, if scheduling in local time. esxi_force: type: boolean current_version: $merge: source: { $ref: '#/types/version' } with: { description: The software version on this appliance at the time the operation was scheduled } hostname: type: string description: Hostname of the appliance links: self: path: "$/operations/downgrade/{operation_id}/appliances/{serial}" get: method: GET response: $ref: '#/resources/appliance_downgrade_task' cancel: path: "$/operations/downgrade/{operation_id}/appliances/{serial}/cancel" method: POST relations: operation: resource: '#/resources/downgrade_operation' vars: id: '0/operation_id' appliance: resource: '#/resources/appliance' vars: serial: '0/serial' appliance_downgrade_task_state: resource: '#/resources/appliance_downgrade_task_state' vars: operation_id: '0/operation_id' serial: '0/serial' appliance_downgrade_task_log: resource: '#/resources/appliance_downgrade_task_log' vars: operation_id: '0/operation_id' serial: '0/serial' appliance_downgrade_task_state: description: The status of the downgrade of a single appliance of an operation type: object # Strip out the redundant operation_id and serial fields from required since # they are specified in the URI to make Upgraded's life easier. # required: [operation_id, serial, status, stage] required: [status, stage] properties: operation_id: type: string description: A unique identifier for the operation that the appliance task belongs to readOnly: true serial: $merge: source: { $ref: '#/types/serial' } with: { readOnly: true } status: $ref: '#/types/appliance_task_status' stage: $ref: '#/types/appliance_downgrade_task_stage' links: self: path: "$/operations/downgrade/{operation_id}/appliances/{serial}/state" get: method: GET response: $ref: '#/resources/appliance_downgrade_task_state' set: method: PUT request: { $ref: '#/resources/appliance_downgrade_task_state' } response: { $ref: '#/resources/appliance_downgrade_task_state' } appliance_downgrade_task_log: type: object description: Log messages associated with the appliance task properties: operation_id: type: string description: A unique identifier for the operation that the log belongs to readOnly: true serial: $merge: source: { $ref: '#/types/serial' } with: { readOnly: true } log: $ref: '#/types/log' links: self: path: "$/operations/downgrade/{operation_id}/appliances/{serial}/log" get: method: GET response: $ref: '#/resources/appliance_downgrade_task_log' append: method: POST description: Append a log entry to the log. Use restricted to internal services request: { $ref: '#/types/log_entry' } ############################################################################# # Appliance Reboot Tasks ############################################################################# appliance_reboot_task: description: The status of the reboot of a single appliance of an operation type: object required: [operation_id, serial] properties: operation_id: type: string description: A unique identifier for the operation that the appliance task belongs to serial: $ref: '#/types/serial' switch_partition: type: boolean description: Specifies whether to switch to the other partition. Treated as false if not specified. reboot_time: $merge: source: { $ref: '#/types/scheduled_time' } with: description: > If specified, delay the operation until this date and time, adjusted for the local time of the device being upgraded, if scheduling in local time. task_start_time: $merge: source: { $ref: '#/types/scheduled_time' } with: { description: The time when the task was actually run } deferred: type: boolean description: Specifies whether the reboot task should be enabled for execution. This would be set to false if the reboot is linked to an upgrade and the upgrade is not completed yet. hostname: type: string description: Hostname of the appliance. links: self: path: "$/operations/reboot/{operation_id}/appliances/{serial}" get: method: GET response: $ref: '#/resources/appliance_reboot_task' cancel: path: "$/operations/reboot/{operation_id}/appliances/{serial}/cancel" method: POST relations: operation: resource: '#/resources/reboot_operation' vars: id: '0/operation_id' appliance: resource: '#/resources/appliance' vars: serial: '0/serial' appliance_reboot_task_state: resource: '#/resources/appliance_reboot_task_state' vars: operation_id: '0/operation_id' serial: '0/serial' appliance_reboot_task_log: resource: '#/resources/appliance_reboot_task_log' vars: operation_id: '0/operation_id' serial: '0/serial' appliance_reboot_task_state: description: The status of the reboot of a single appliance of an operation type: object # Strip out the redundant operation_id and serial fields from required since # they are specified in the URI to make Upgraded's life easier. # required: [operation_id, serial, status, stage] required: [status, stage] properties: operation_id: type: string description: A unique identifier for the operation that the appliance task belongs to readOnly: true serial: $merge: source: { $ref: '#/types/serial' } with: { readOnly: true } status: $ref: '#/types/appliance_task_status' stage: $ref: '#/types/appliance_reboot_task_stage' links: self: path: "$/operations/reboot/{operation_id}/appliances/{serial}/state" get: method: GET response: $ref: '#/resources/appliance_reboot_task_state' set: method: PUT request: { $ref: '#/resources/appliance_reboot_task_state' } response: { $ref: '#/resources/appliance_reboot_task_state' } appliance_reboot_task_log: type: object description: Log messages associated with the appliance task properties: operation_id: type: string description: A unique identifier for the operation which the log belongs to readOnly: true serial: $merge: source: { $ref: '#/types/serial' } with: { readOnly: true } log: $ref: '#/types/log' links: self: path: "$/operations/reboot/{operation_id}/appliances/{serial}/log" get: method: GET response: $ref: '#/resources/appliance_reboot_task_log' append: method: POST description: Append a log entry to the log. Use restricted to internal services request: { $ref: '#/types/log_entry' } ############################################################################# # Debugging Resources ############################################################################# logging: description: Service logging parameters type: object required: [ level ] properties: level: { $ref: '#/types/logging_level' } links: self: { path: "$/logging" } get: method: GET response: { $ref: '#/resources/logging' } set: method: PUT request: { $ref: '#/resources/logging' } response: { $ref: '#/resources/logging' }