-
Notifications
You must be signed in to change notification settings - Fork 896
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
Add queue_name to ems operations within CloudVolume::Operations mixin #19608
Add queue_name to ems operations within CloudVolume::Operations mixin #19608
Conversation
@agrare I'm not sure how sensical these specs are with me currently re-using the same ems for the method argument. If you have a suggestion here, please let me know. |
|
||
context "queued methods" do | ||
it "queues an attach task with attach_volume_queue" do | ||
task_id = cloud_volume.attach_volume_queue(user.userid, ems.id, disk.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think ems.id is correct here, it should be a vm's ems_ref
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I think I need some clarification for how/where a VM fits into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A cloud volume is being attached to a VM/instance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agrare ok, updated.
@@ -0,0 +1,46 @@ | |||
RSpec.describe 'CloudVolume::Operations' do | |||
let(:ems) { FactoryBot.create(:ems_vmware) } | |||
let(:vm) { FactoryBot.create(:vm_vmware, :ext_management_system => ems) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense to use a vmware ems or vm, particurally for a cloud_volume spec. There are ems_cloud and vm_cloud factories that can keep things more generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 looks good
Checked commits https://github.com/djberg96/manageiq/compare/340f9ec3dabeb95a5be526bb360d72e80ce78dc9~...d5b3649a303380e7a6c1813f0d276207604c4674 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
UI and API cross-repo tests were green, core was red for a different reason. Will merge this when green. |
…_name Add queue_name to ems operations within CloudVolume::Operations mixin
This PR adds a
queue_name
to the queue options for theCloudVolume::Operations#attach_volume_queue
method. I've also added some specs (this mixin doesn't appear to have had existing test coverage), and added some comments on those methods.Part of #19543