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

Fog::Compute::Google::Disks#get disk users remain after detach #611

Closed
rchekaluk opened this issue Nov 10, 2023 · 0 comments
Closed

Fog::Compute::Google::Disks#get disk users remain after detach #611

rchekaluk opened this issue Nov 10, 2023 · 0 comments

Comments

@rchekaluk
Copy link

Detaching an attached disk does not update the users list in its Fog::Compute::Google::Disk object:

    server.detach_disk(device_name, false)
    disk.reload
    assert disk.users.nil? || disk.users == []

This is because reloading the disk object (fog-core Fog::Model#reload) merges its prior attributes with newly retrieved attributes; in a detached disk, the newly-retrieved attributes omit :users key, thus its prior value is retained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant