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 create action for templates #337

Merged

Conversation

andyvesel
Copy link
Contributor

@andyvesel andyvesel commented Mar 6, 2018

Added create action for images to API
https://bugzilla.redhat.com/show_bug.cgi?id=1487114
Depends on:
ManageIQ/manageiq#17089

@miq-bot miq-bot added the wip label Mar 6, 2018
@andyvesel andyvesel changed the title [WIP]Add create action for templates Add create action for templates Mar 7, 2018
@miq-bot miq-bot removed the wip label Mar 7, 2018
@andyvesel
Copy link
Contributor Author

@abellotti could you review?

@miq-bot
Copy link
Member

miq-bot commented Apr 6, 2018

This pull request is not mergeable. Please rebase and repush.

api_basic_authorize(action_identifier(:cloud_templates, :create, :subcollection_actions))
ems = FactoryGirl.create(:ems_cloud)

post(api_provider_cloud_templates_url(nil, ems), :params => { :name => "test-image" })
Copy link
Member

@abellotti abellotti Apr 6, 2018

Choose a reason for hiding this comment

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

maybe additional template parameters, like location and vendor, have a more complete sample template. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@abellotti
Copy link
Member

looks good, maybe extend test. also conflict, so rebase/repush. thanks.

@abellotti abellotti self-assigned this Apr 6, 2018
@andyvesel andyvesel force-pushed the add_create_action_for_templates branch from 4f21089 to e900ca7 Compare April 9, 2018 09:48
@abellotti
Copy link
Member

@andyvesel there seems to be a merge conflict, can you rebase/resolve/push ? Thanks.

@andyvesel
Copy link
Contributor Author

andyvesel commented Apr 9, 2018

@abellotti hm, I've resolved it some time ago, but the label is still there. I shall remove it manually

@andyvesel
Copy link
Contributor Author

@miq-bot remove_label unmergeable

@abellotti
Copy link
Member

still conflicting here, issue is the api.yml, it's no longer seeing the delete action

@andyvesel andyvesel force-pushed the add_create_action_for_templates branch 2 times, most recently from 5f473f3 to 030bbf2 Compare April 9, 2018 14:28
@andyvesel andyvesel force-pushed the add_create_action_for_templates branch from 030bbf2 to f7864ad Compare April 9, 2018 14:30
@miq-bot
Copy link
Member

miq-bot commented Apr 9, 2018

Checked commits andyvesel/manageiq-api@c3ca050~...f7864ad with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 1 offense detected

app/controllers/api/subcollections/cloud_templates.rb

@abellotti abellotti added this to the Sprint 83 Ending Apr 9, 2018 milestone Apr 9, 2018
@abellotti
Copy link
Member

Thanks @andyvesel for the API Enhancement !! 👍

@abellotti abellotti merged commit 5571f72 into ManageIQ:master Apr 9, 2018
@himdel
Copy link
Contributor

himdel commented May 15, 2018

@andyvesel , @abellotti to be able to actually use this API endpoint, we will also need an identical one for non-cloud images (MiqTemplate really).

The UI form needs to be able handle both, so we need API endpoints for both.
(That said, only name and description can be edited for non-openstack images/templates, and there's no creation.)

Can you take care of this? Should I create an issue? Do I have to implement it first? :)
Thanks

EDIT: sorry, this should have been on the update PR


Also, there is currently no documentation for this endpoint, making it impossible to use, since we don't have any examples.

@abellotti
Copy link
Member

Issue is fine so we don't lose track, PRs are always welcomed and preferred of course 😉

/cc @gtanzillo

@himdel
Copy link
Contributor

himdel commented May 15, 2018

Thanks, created #381 :).

(I definitely won't get to it this week, a week or two after that, I may have to :).)

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.

4 participants