-
Notifications
You must be signed in to change notification settings - Fork 41
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
Extend allowed_cloud_network for providers that don't support allowed_ci #41
Conversation
@miq-bot assign @gmcculloug |
@miq-bot add_label bug |
@miq-bot add_label gaprindashvili/yes |
def allowed_cloud_networks(_options = {}) | ||
return {} unless (src_obj = provider_or_tenant_object) | ||
|
||
src_obj.all_cloud_networks.each_with_object({}) do |cn, hash| |
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.
cd4a662
to
6e810a5
Compare
let(:template) { FactoryGirl.create(:template_google, :name => "template", :ext_management_system => ems) } | ||
let(:workflow) do | ||
stub_dialog | ||
allow_any_instance_of(User).to receive(:get_timezone).and_return(Time.zone) |
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.
@d-m-u - You should be able to swap out line 9 with allow(User).to receive_messages(:server_timezone => "UTC")
to get rid of one of the Rubocop warnings about allow_any_instance_of
488fedd
to
1d8775b
Compare
1d8775b
to
e284168
Compare
Checked commit d-m-u@e284168 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 |
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.
👍 LGTM
PR ManageIQ/manageiq#16811 adds RBAC filtering to allowed_cloud_network base class but two of the providers don't support the allowed_ci method so for them we need to overwrite the allowed_cloud_networks, to just return allowed_cloud_networks. Which this does! (Per ManageIQ/manageiq#16824 (comment))
Fixes issue caused by fix of https://bugzilla.redhat.com/show_bug.cgi?id=1533277
(Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1535189)
Related to:
ManageIQ/manageiq-providers-openstack#197