-
Notifications
You must be signed in to change notification settings - Fork 356
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
Enable new cloud volume for provider #715
Enable new cloud volume for provider #715
Conversation
Amazon EBS has recently introduced ability to modify cloud volume configuration (type of cloud volume, its size and the IOPS). This patch reuses the UI from the cloud volume creation dialog to allow users to modify volumes on the fly.
Currently, adding new cloud volumes from the UI is only possible in `Storage > Block Storage > Volumes`, i.e. the list of all cloud volumes. This requires that users choose the target storage manager before specifying volume options. Each block storage manager also provides the list of its own volumes. However, there is no way to create new cloud volume from this list. This patch resolves this by enabling the button for adding volumes to this list and extending involved controllers to handle the given storage manager id.
Checked commit gberginc@d5f1f15 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/controllers/cloud_volume_controller.rb
app/views/cloud_volume/new.html.haml
|
@@ -6,10 +6,11 @@ | |||
= _('Storage Manager') | |||
.col-md-8 | |||
= select_tag("storage_manager_id", | |||
options_for_select([["<#{_('Choose')}>", nil]] + @storage_manager_choices.sort, disabled: ["<#{_('Choose')}>", nil]), | |||
options_for_select((@storage_manager_id.nil? ? [["<#{_('Choose')}>", nil]] : []) + @storage_manager_choices.sort, disabled: ["<#{_('Choose')}>", nil]), |
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.
@gberginc This is something similar to what I suggested to @miha-plesko .
If we could use an API to retrieve the Storage Managers, that would be perfect...
(can be totally done in a follow-up PR)
@gberginc Other than that one comment, everything else looks great. @h-kataria I tested |
Currently, adding new cloud volumes from the UI is only possible in
Storage > Block Storage > Volumes
, i.e. the list of all cloud volumes. This requires that users choose the target storage manager before specifying volume options.Each block storage manager also provides the list of its own volumes. However, there is no way to create new cloud volume from this list.
This patch resolves this by enabling the button for adding volumes to this list and extending involved controllers to handle the given storage manager id.
Extends: #676 (thus, it also includes that commit for easier testing).
Video: http://x.k00.fr/d7x4y:
@miq-bot assign @AparnaKarve
@miq-bot add_label enhancement,storage
Sorry for another PR ;-).