ManageIQ / manageiq

ManageIQ Open-Source Management Platform
https://manageiq.org
Apache License 2.0
1.35k stars 896 forks source link

Add ability to update VM description #21561

Open lamm opened 2 years ago

lamm commented 2 years ago

We are using kasparov-2 and we are looking for a way to modify the description field of a VM without going through the GUI ( button). Is there a way to do this by an automation script ? If not, would it be possible to add this functionality ?

chessbyte commented 2 years ago

What provider are you looking to integrate this capability with?

lamm commented 2 years ago

We are using vmware provider.

chessbyte commented 2 years ago

Is this capability supported in the VMware API? /cc @agrare

agrare commented 2 years ago

Sort of, VMware doesn't have a "description" exactly. They have a Notes field which the backend API calls "summary.config.annotations" [ref]. We parse this and store it in the vm.hardware.annotation column. It can be changed by issuing a ReconfigVM_Task API call.

Not clear to me why annotations are stored in hardware and not in Vm#description maybe @Fryguy remembers?

chessbyte commented 2 years ago

Not clear to me why annotations are stored in hardware and not in Vm#description maybe @Fryguy remembers?

Just seems plain wrong, but maybe we had a reason that made sense at the time?

agrare commented 2 years ago

Yeah agreed, unless we have some requirement that Vm#description can't have newlines I don't see why we wouldn't just use notes as the vm description

chessbyte commented 2 years ago

What PG type is Vm#description?

agrare commented 2 years ago

t.text "description", comment: "A description of the VM that is typically set by the provider, but may also be edited."

chessbyte commented 2 years ago

I would propose fixing our refresher to store the VM's description in the proper field.

lamm commented 2 years ago

The use case here is the following.

We are using MIQ in multi-tenant configuration.

Our customers would like to be able to add a description on their VMs in order to be able to identify them more easily in the interface. The ideal would be to display this description in the grid which lists the VMs. We have therefore considered using the currently available "description" field to do this. The problem is that editing this field using the "configuration / edit this VM" button allows other modifications to be made than just the description of the VM. image

The idea is to create a customize button allowing you to modify only the description. Unfortunately it is not possible to modify the description by code. That's why I opened this issue.

Next, since the description field is not displayed in the grid when listing the VMs, we will provide our customers with a custom filter that will allow them to search for VMs whose description contains a string they will enter.

I'm not sure if using the description field is the best option to deal with this use case or if there is a cleanest way to do it.

Fryguy commented 2 years ago

All of the provider PRs are merged. I think we just need API/UI support at this point.

miq-bot commented 1 year ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

kbrock commented 1 year ago

Does the API pr linked above meet our needs. is this done?

lamm commented 11 months ago

We plan to upgrate to Oparin/Petrosian soon. We will this test this new feature and make you a feedback.

Fryguy commented 11 months ago

@jeffibm Do we have UI for this? I see that the API was completed, but I don't see any UI changes. If not, can we add this?

jeffibm commented 11 months ago

@jeffibm Do we have UI for this? I see that the API was completed, but I don't see any UI changes. If not, can we add this?

Based on the previous discussion, we will raise a PR that gives the ability to update just the description in another form by making use of this API - https://github.com/ManageIQ/manageiq-api/pull/1120 cc @kbrock

miq-bot commented 8 months ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

miq-bot commented 4 months ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

miq-bot commented 1 month ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.