-
Notifications
You must be signed in to change notification settings - Fork 897
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
Edit VMs API #14623
Edit VMs API #14623
Conversation
https://bugzilla.redhat.com/show_bug.cgi?id=1428250 update custom identifier
@miq-bot remove_label wip |
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.
Looks good @jntullo minor change to naming.
@@ -8,6 +8,9 @@ class VmsController < BaseController | |||
include Subcollections::Software | |||
include Subcollections::Snapshots | |||
|
|||
VALID_EDIT_ATTRS = %w(description child_relationships parent_relationship).freeze |
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.
would prefer child_resources and parent_resource for consistency with other _resource exposure in API calls.
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 will do! I'll update ##14639 as well
|
||
def fetch_relationship(href) | ||
collection, id = parse_href(href) | ||
raise "Invalid relationship type #{collection}" unless RELATIONSHIP_COLLECTIONS.include?(collection) |
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.
👍 this way we control what gets assigned.
Checked commits jntullo/manageiq@ec696a2~...619e277 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
LGTM!! Thanks @jntullo |
@jntullo let me know of the BZ for 4.2.3, we can then set the euwe/yes, Thanks. |
Edit VMs API (cherry picked from commit ef497d0)
Fine backport details:
|
This should be able to be backported to euwe @miq-bot add_label euwe/yes |
Edit VMs API (cherry picked from commit ef497d0) https://bugzilla.redhat.com/show_bug.cgi?id=1445356
Euwe backport details:
|
Edit API to update basic attributes (custom_1, description) and parent, child relationships. These attributes align with what is currently allowed when editing a VM in the OpsUI.
@miq-bot add_label enhancement, wip, api
@miq-bot assign @abellotti