Skip to content

Update instanceCan logic for API changes #2334

Closed

Description

@david-crespo

Activity

  1. changed the title [-]Update instanceCan logic for changed API logic [/-] [+]Update `instanceCan` logic for API changes[/+] on Jul 22, 2024
  2. added this to the 10 milestone on Jul 22, 2024
  3. david-crespo commented on Aug 12, 2024

    @david-crespo
    CollaboratorAuthor

    Based on a conversation in chat last week, I don't expect any code changes to be necessary, but we will look into it a bit more to make sure. The most straightforward way to do this is to update our links where we cite API code to make sure they point at the latest omicron main.

    console/app/api/util.ts

    Lines 92 to 105 in 8e3314f

    const instanceActions: Record<string, InstanceState[]> = {
    start: ['stopped'],
    reboot: ['running'],
    stop: ['running', 'starting'],
    delete: ['stopped', 'failed'],
    // https://github.com/oxidecomputer/omicron/blob/9eff6a4/nexus/db-queries/src/db/datastore/disk.rs#L310-L314
    detachDisk: ['creating', 'stopped', 'failed'],
    // https://github.com/oxidecomputer/omicron/blob/a7c7a67/nexus/db-queries/src/db/datastore/disk.rs#L183-L184
    attachDisk: ['creating', 'stopped'],
    // https://github.com/oxidecomputer/omicron/blob/8f0cbf0/nexus/db-queries/src/db/datastore/network_interface.rs#L482
    updateNic: ['stopped'],
    // https://github.com/oxidecomputer/omicron/blob/ebcc2acd/nexus/src/app/instance.rs#L1648-L1676
    serialConsole: ['running', 'rebooting', 'migrating', 'repairing'],
    }

  4. self-assigned this
    on Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions