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

Enhance request attach disk to take more than one disk #401

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toubs13
Copy link

@toubs13 toubs13 commented Oct 8, 2018

Hi !

In this PR I enable the possibility to attach more than one managed disk on the same request.

Thanks in advance for your time

end
end


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/EmptyLines: Extra blank line detected.
Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end.

end
end
end
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/DefEndAlignment: end at 115, 0 is not aligned with def at 106, 2.

@service.stub :attach_data_disk_to_vm, response do
assert_instance_of Fog::Compute::AzureRM::Server, @server.attach_managed_disks(%w(managed_disk_name1 managed_disk_name2), 'resoure_group')
end
async_response = Concurrent::Promise.execute { 10 }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/IndentationConsistency: Inconsistent indentation detected.

@toubs13 toubs13 force-pushed the enhance/add_possibility_to_attach_multiple_managed_disk branch 4 times, most recently from e5da454 to d49ff50 Compare October 8, 2018 14:07
@toubs13 toubs13 force-pushed the enhance/add_possibility_to_attach_multiple_managed_disk branch from d49ff50 to 71d269c Compare October 8, 2018 14:29
msg = "Attaching Data Disk #{disk_name} to Virtual Machine #{vm_name} in Resource Group #{vm_resource_group}"
disk_names = disk_names.is_a?(Array) ? disk_names : [disk_names]

msg = "Attaching Data Disk #{disk_names.join(', ')} to Virtual Machine #{vm_name} in Resource Group #{vm_resource_group}"
Fog::Logger.debug msg
vm = get_virtual_machine_instance(vm_resource_group, vm_name)
lun = get_logical_unit_number(vm.storage_profile.data_disks)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lun = get_logical_unit_number(vm.storage_profile.data_disks)
lun = get_logical_unit_number(vm.storage_profile.data_disks)

This line is causing your PR to fail. Since in your code, you are getting the value of LUN only once, it throws an exception when it tries to add a new data disk to that same LUN.

@maham-nazir-confiz
Copy link
Contributor

Hi @KevinLoiseau
I reviewed this PR and it is breaking. Please see my comment. Update the code and also incorporate the changes suggested by HoundCI as well. Thank you.

Regards

@KevinLoiseau
Copy link
Contributor

Hello @maham-nazir-confiz, thanks to take care of this PR.

As it's not my PR I will not fix it, but I will raise the information to @toubs13 and help him if it's needed.

Regards,
Kevin Loiseau

@maham-nazir-confiz
Copy link
Contributor

Hi @toubs13
I have reviewed your PR and it is breaking. Please see my comment. Update the code and also incorporate the changes suggested by HoundCI as well. Thank you.

Regards

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

Successfully merging this pull request may close these issues.

4 participants