-
Notifications
You must be signed in to change notification settings - Fork 141
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
Allow ordering of service templates resource #316
Conversation
5e46950
to
b5693a1
Compare
module Api | ||
module Mixins | ||
module ServiceTemplates | ||
def order_template(id, data) |
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.
let's rename to order_service_template
} | ||
expect(response).to have_http_status(:ok) | ||
expect(response.parsed_body).to include(expected) | ||
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.
let's add a test on the collection, ordering 2 templates. Thanks.
@@ -2487,6 +2487,8 @@ | |||
:identifier: catalogitem_delete | |||
- :name: create | |||
:identifier: atomic_catalogitem_new | |||
- :name: order | |||
:identifier: svc_catalog_provision |
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.
don't we need the :validate_action option here too ?
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.
@abellotti it doesn't go on the collection, only on the resource, which is consistent with the other places we have it
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.
👍
b5693a1
to
49d4909
Compare
For the new ServiceTemplateTransformationPlan, ordering must happen directly on the service template. Currently, the API only allows ordering through a service catalog.
49d4909
to
06e955e
Compare
Now dependent on ManageIQ/manageiq#17023 |
Checked commit jntullo@06e955e with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 |
Thanks @jntullo for the update and enhancement. LGTM!! 👍 |
Allow ordering of service templates resource (cherry picked from commit 2de9dcc)
Gaprindashvili backport details:
|
For the new ServiceTemplateTransformationPlan, ordering must happen directly on the service template. Currently, the API only allows ordering through a service catalog. It was discussed with @bzwei that ordering can be allowed in general for a service template, and no special case is needed for the new
ServiceTemplateTransformationPlan
since there is validation around whether a service template is "orderable".Sample order without required fields:
Sample order with required fields: