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

Remap :name parameter into :bucket parameter when creating new bucket #198

Merged

Conversation

miha-plesko
Copy link
Contributor

Current implementation assumes that frontend composes all the options that backend then just sends to AWS. But there is an exception with :name option. While it is needed on frontend (to display flash), it is rejected by AWS.

Initial idea was to just remove the :name option here in backend, but turns out (see this conversation) that renaming it to :bucket works better. Hence this commit.

@miq-bot add_label enhancement
@miq-bot assign @Ladas

Current implementation assumes that frontend composes
all the options that backend then just sends to AWS. But
there is an exception with :name option. While it is
needed on frontend (to display flash), it is rejected by AWS.

Initial idea was to just remove the :name option here in backend,
but turns out that renaming it to :bucket works better. Hence this
commit.

Signed-off-by: Miha Pleško <miha.plesko@xlab.si>
@miq-bot
Copy link
Member

miq-bot commented Mar 24, 2017

Checked commit miha-plesko@306d930 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks good. 🏆

@@ -42,7 +42,9 @@ def raw_cloud_object_store_container_clear
end

def self.raw_cloud_object_store_container_create(ext_management_system, options)
options.except!(:name) # name is part of general options, but S3 doesn't like it
# frontend stores name as :name, but amazon expects it as :bucket
options[:bucket] = options.delete(:name) unless options[:name].nil?
Copy link
Contributor

Choose a reason for hiding this comment

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

hm, it's strange it expects it as :bucket but returns bucket.name

@Ladas
Copy link
Contributor

Ladas commented Mar 24, 2017

@miha-plesko looks good, it's a weird naming on the aws side though :-)

@Ladas Ladas merged commit a8a7ef8 into ManageIQ:master Mar 24, 2017
@Ladas Ladas added this to the Sprint 57 Ending Mar 27, 2017 milestone Mar 24, 2017
@miha-plesko
Copy link
Contributor Author

Yeah, I'm not smart enough to understand it :D

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.

3 participants