vmware / vmware-aria-operations-integration-sdk

The VMware Aria Operations Integration SDK contains libraries, tools, and documentation for developing Management Packs for VMware Aria Operations. It is intended to make creating a Management Pack simple and fast, while allowing developers to use the language of their choice.
https://vmware.github.io/vmware-aria-operations-integration-sdk/
Apache License 2.0
17 stars 6 forks source link

Parameter enums do not preserve order #83

Open kjrokos opened 1 year ago

kjrokos commented 1 year ago

Describe the bug

When creating enum parameters on the adapter instance, the order the enum values are specified should be the order they appear in Aria Ops. However, in Aria Ops they appear in alphabetical order.

Reproduction steps

  1. Create an enum parameter definition with enum values that are not in alphabetical order
  2. Run mp-build and install pak on Aria Ops
  3. Configure an adapter instance. Enum options are in alphabetical order rather than the order in step (1).

Expected behavior

Enum parameters should be in the same order specified.

Additional context

No response

kjrokos commented 1 year ago

We have found that the issue is on the platform side. We've made the necessary changes on our side to support proper ordering, but unless/until the issue is resolved on VMware Aria Operations we cannot fix the issue.

However, after fixing #84 we do have a workaround: We can manually prefix the enum values (keys) to ensure alphabetical order, and use the label to display correctly.

MarkArbogast commented 1 year ago

Alisa will organize a call with the platform teams to determine the best path forward.

austinbrowder commented 11 months ago

It would appear this issue extends to the use of advanced=True on enum parameters as well. Enum parameters do not get placed under Advanced Settings in the UI when advanced=True is set, but int & string parameters do.

kjrokos commented 11 months ago

Austin, I think you've found a different issue. This ticket is specifically related to the order of the items inside a single enum parameter. For example, if you make an enum parameter for SSL verification with the following values: Verify No Verify No SSL

When you install, you will see the three values in the drop-down but in a different order (alphabetical).

This is different to what you've found, where you are looking at where the parameter itself is located. Having said that, I can confirm that the behavior you are seeing is an issue, and it appears to be on the platform side.