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

Add policy checking for retirement request. #14641

Merged
merged 3 commits into from
Apr 7, 2017

Conversation

lfu
Copy link
Member

@lfu lfu commented Apr 4, 2017

All events are sent to automate for processing since Event Switchboard PR.
Since then the policy checking for prevent action has changed from a sync process to an async process.

Depends on #86.

https://bugzilla.redhat.com/show_bug.cgi?id=1439331

@miq-bot assign @gmcculloug
@miq-bot add_label bug, control, darga/yes, euwe/yes, automate, fine/yes

@@ -153,6 +153,14 @@ def self.miq_event_enforce_policy(obj, _inputs)
event_object_from_workspace(obj).process_evm_event
end

def self.miq_check_policy_prevent(obj, _inputs)
Copy link
Contributor

Choose a reason for hiding this comment

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

@lfu
Can we add a spec for this method.

@isimluk isimluk closed this Apr 5, 2017
@isimluk isimluk reopened this Apr 5, 2017
@lfu lfu force-pushed the prevent_retirement_request branch from 0ecc13e to 5761dc0 Compare April 5, 2017 15:17
@lfu lfu force-pushed the prevent_retirement_request branch from 5761dc0 to 6b74aa4 Compare April 5, 2017 17:57
Copy link
Contributor

@mkanoor mkanoor 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. We can add the create_notification call in a separate PR.

@tinaafitz
Copy link
Member

@lfu Looks good.

@@ -166,6 +166,11 @@ request_service_stop,Service Stop Request,Default,service_process
service_stopped,Service Stopped,Default,service_process

#
# Orchestration
#
request_orchestration_stack_retire,Orchestration Stack Retire Request,Default,orchestration
Copy link
Member

Choose a reason for hiding this comment

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

@lfu This needs a corresponding miq_event_definition_set instance for orchestration added to db/fixtures/miq_event_definition_sets.csv.

Following the existing pattern for VM and Service the set should be called orchestration_process

@lfu lfu force-pushed the prevent_retirement_request branch from 6b74aa4 to 67db0f4 Compare April 7, 2017 17:36
@miq-bot
Copy link
Member

miq-bot commented Apr 7, 2017

Checked commits lfu/manageiq@d26ec21~...67db0f4 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
3 files checked, 0 offenses detected
Everything looks good. 🍰

@gmcculloug
Copy link
Member

@lfu Please open a git issue in the UI repo to add an icon for this event. It currently shows the default ⭐️ icon.

image

Probably want to use something like the stack icon from the Compute -> Cloud -> Stacks

image

@gmcculloug gmcculloug merged commit 302e14c into ManageIQ:master Apr 7, 2017
@gmcculloug gmcculloug added this to the Sprint 58 Ending Apr 10, 2017 milestone Apr 7, 2017
simaishi pushed a commit that referenced this pull request Apr 7, 2017
@simaishi
Copy link
Contributor

simaishi commented Apr 7, 2017

Fine backport details:

$ git log -1
commit 18c68c1ed53191d42daf228b29e0ca9f5cdc0141
Author: Greg McCullough <[email protected]>
Date:   Fri Apr 7 14:37:40 2017 -0400

    Merge pull request #14641 from lfu/prevent_retirement_request
    
    Add policy checking for retirement request.
    (cherry picked from commit 302e14cc2329267c6c9c8d249f05d8d9070ea320)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1440324

simaishi pushed a commit that referenced this pull request Apr 17, 2017
@simaishi
Copy link
Contributor

Euwe backport details:

$ git log -1
commit 57dace5297b1df2b5861888d9afbb08f1abc3c25
Author: Greg McCullough <[email protected]>
Date:   Fri Apr 7 14:37:40 2017 -0400

    Merge pull request #14641 from lfu/prevent_retirement_request
    
    Add policy checking for retirement request.
    (cherry picked from commit 302e14cc2329267c6c9c8d249f05d8d9070ea320)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1440402

@lfu lfu deleted the prevent_retirement_request branch October 16, 2017 20:14
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.

7 participants