manageiq icon indicating copy to clipboard operation
manageiq copied to clipboard

Add ability to update VM description

Open lamm opened this issue 3 years ago • 19 comments

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 ?

lamm avatar Nov 17 '21 09:11 lamm

What provider are you looking to integrate this capability with?

chessbyte avatar Nov 17 '21 18:11 chessbyte

We are using vmware provider.

lamm avatar Nov 17 '21 22:11 lamm

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

chessbyte avatar Nov 18 '21 18:11 chessbyte

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?

agrare avatar Nov 18 '21 18:11 agrare

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?

chessbyte avatar Nov 18 '21 18:11 chessbyte

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

agrare avatar Nov 18 '21 18:11 agrare

What PG type is Vm#description?

chessbyte avatar Nov 18 '21 18:11 chessbyte

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

agrare avatar Nov 18 '21 18:11 agrare

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

chessbyte avatar Nov 18 '21 18:11 chessbyte

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.

lamm avatar Nov 19 '21 10:11 lamm

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

Fryguy avatar Dec 14 '21 23:12 Fryguy

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.

miq-bot avatar Feb 27 '23 00:02 miq-bot

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

kbrock avatar Jul 13 '23 01:07 kbrock

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

lamm avatar Oct 09 '23 10:10 lamm

@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?

Fryguy avatar Oct 11 '23 17:10 Fryguy

@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

jeffibm avatar Oct 27 '23 03:10 jeffibm

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 avatar Jan 29 '24 00:01 miq-bot

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 avatar May 13 '24 00:05 miq-bot