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

Enable new cloud volume for provider #715

Merged

Conversation

gberginc
Copy link
Contributor

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:

  • First, it shows the original form opened from the list of all cloud volumes (target manager needs to be chosen first)
  • Amazon block storage manager
  • OpenStack block storage manager (here we also show the problem related OpenStack cloud volume created in a wrong manager #688 - it's even more noticeable here because we only see manager's volumes)

@miq-bot assign @AparnaKarve
@miq-bot add_label enhancement,storage

Sorry for another PR ;-).

gberginc and others added 2 commits March 16, 2017 12:39
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.
@miq-bot
Copy link
Member

miq-bot commented Mar 24, 2017

Checked commit gberginc@d5f1f15 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
4 files checked, 4 offenses detected

app/controllers/cloud_volume_controller.rb

app/views/cloud_volume/new.html.haml

  • ⚠️ - Line 9 - Line is too long. [172/160]

@@ -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]),
Copy link
Contributor

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)

@AparnaKarve
Copy link
Contributor

AparnaKarve commented Mar 27, 2017

@gberginc Other than that one comment, everything else looks great.
Just wanted to get a clarification here that the changes were done for the Add form only, since the Edit form does not seem to be working properly.

@h-kataria I tested Add in the UI and it's working well. I suppose Edit can be done in a different PR. Since this needs to be in today, I would say GTG.

@h-kataria h-kataria added this to the Sprint 57 Ending Mar 27, 2017 milestone Mar 27, 2017
@h-kataria h-kataria merged commit 8148a72 into ManageIQ:master Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants