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

Remove miq_server #15284

Merged
merged 1 commit into from
Jun 7, 2017
Merged

Remove miq_server #15284

merged 1 commit into from
Jun 7, 2017

Conversation

jntullo
Copy link

@jntullo jntullo commented Jun 2, 2017

As a follow up #15262, the set_miq_server action needs to be able to set an miq_server to nil (removing the current miq_server). This PR updates the functionality by accepting an empty hash, ie:

{ "action": "set_miq_server", "miq_server": {} } 

which will then set the miq_server to nil.

@miq-bot add_label api, enhancement, fine/no
@miq-bot assign @abellotti

cc: @h-kataria

@h-kataria
Copy link
Contributor

👍

Copy link
Member

@abellotti abellotti left a comment

Choose a reason for hiding this comment

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

looks good, minor change.

rescue => err
action_result(false, "Failed to set miq_server - #{err}")
end

private

def miq_server_message(miq_server)
return 'Removed miq_server' unless miq_server
"Set miq_server id:#{miq_server.id}"
Copy link
Member

Choose a reason for hiding this comment

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

ternary one-liner, also pick one quoting for both, " " or ' '.

@miq-bot
Copy link
Member

miq-bot commented Jun 5, 2017

Checked commit jntullo@453b607 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 🍪

@bdunne bdunne closed this Jun 5, 2017
@bdunne bdunne reopened this Jun 5, 2017
@abellotti
Copy link
Member

LGTM!! Thanks @jntullo

@abellotti abellotti merged commit 3af0dbb into ManageIQ:master Jun 7, 2017
@abellotti abellotti added this to the Sprint 63 Ending Jun 19, 2017 milestone Jun 7, 2017
@jntullo jntullo deleted the enhancement/unassign_miq_server branch November 28, 2017 19:42
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.

5 participants