Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rest): add can* params in GET /vm/state #63

Merged
merged 1 commit into from
Oct 27, 2023

Commits on Oct 27, 2023

  1. feat(rest): support check status can be change

    In the previous API, there was no way to detect before changing the
    status, which would make it difficult for developers to handle the
    following situations:
    
        - When the virtual machine status is Stop, calling Pause may fail.
        - When the virtual machine status is Pause, setting the status to
          Pause again may fail.
    
    In the previous solution, developers needed to first get the current
    status of the virtual machine and then decide whether to proceed to the
    next step. However, the current virtual machine status is very diverse
    (see:
    https://github.com/Code-Hex/vz/blob/bd29a7ea3d39465c4224bfb01e990e8c220a8449/virtualization.go#L23),
    which would require developers to handle various cases perfectly. This
    PR solves this problem.
    BlackHole1 authored and cfergeau committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    e8d7f94 View commit details
    Browse the repository at this point in the history