-
Notifications
You must be signed in to change notification settings - Fork 143
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 archive/unarchive actions to ServiceTemplate #389
Add archive/unarchive actions to ServiceTemplate #389
Conversation
7402c0c
to
41617d0
Compare
Think this failure is on me |
41617d0
to
7a70929
Compare
Thanks @kbrock that fixed two of the failures but still getting 10 other errors on master+your commit 😟 |
@abellotti added specs, please take a look @miq-bot assign @abellotti |
7a70929
to
6db5d11
Compare
service_template.unarchive! | ||
action_result(true, "Activated Service Template") | ||
rescue => err | ||
action_result(false, "Could not activate Service Template - #{err}") |
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.
maybe Could not unarchive ... ?
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.
Done
expect(response).to have_http_status(:ok) | ||
expect(response.parsed_body).to include(expected) | ||
end | ||
end |
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.
we also need another set of the above tests for unarchive.
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.
Done
6db5d11
to
b332cf7
Compare
Hey @abellotti a few spec failures that I don't understand: https://travis-ci.org/ManageIQ/manageiq-api/jobs/387898964#L1946-L1949
This one I get and ManageIQ/manageiq#17518 fixes it I don't understand these two:
|
config/api.yml
Outdated
- :name: archive | ||
:identifier: svc_catalog_archive | ||
- :name: unarchive | ||
:identifier: svc_catalog_unarchive | ||
:options: | ||
- :validate_action |
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.
reason for the one failure, options: validate_action here is meant for the order action on 2805, so move archive/unarchive below 2812.
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.
👍 thanks
- :name: archive | ||
:identifier: svc_catalog_archive | ||
- :name: unarchive | ||
:identifier: svc_catalog_unarchive |
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.
the other failures might be because svc_catalog_archive and svc_catalog_unarchive are not mid_product_feature.yml
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.
Think this was actually related to #389 (comment) since I had ManageIQ/manageiq#17518 applied locally when testing and this still failed.
b332cf7
to
7208406
Compare
@abellotti thanks! with ManageIQ/manageiq#17518 applied locally tests pass. Can you take a look at that one. |
Checked commit agrare@7208406 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 app/controllers/api/service_templates_controller.rb
|
This LGTM!! Thanks @agrare for the API Enhancement. 👍 |
❤️ thanks @abellotti |
@miq-bot add_label gaprindashvili/yes |
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1593890 @miq-bot add_label blocker |
Add archive/activate actions to ServiceTemplate (cherry picked from commit 97dd729) https://bugzilla.redhat.com/show_bug.cgi?id=1594023
Gaprindashvili backport details:
|
Add the ability to archive and unarchive service templates
Core PRs: ManageIQ/manageiq-schema#207, ManageIQ/manageiq#17480
ManageIQ/manageiq-v2v#314