Hi, we want to sort output from a Morpheus API Option List for “Networks”. The Option List is filled, but not sorted alphabetically. I have tried with following Translation Script:
In the Catalog Item we must limit Networks to user selected Resource Pools. In fact, there are several distributed vSwitches behind it. Nevertheless, I thought the list, contained in ‘data’ is sorted in the translation script as a whole and not by distributed vSwitches. This should have no influence, or do I see it wrong? ‘data’ is a Java object, and it should be sorted as a whole, via translation script, or am I wrong?
example output:
Question:
Is it some how possible, to print out the raw content (data) the Morpheus API call receives?
So I added another portgroup and it has Apple and VSAN. They both appear in the correct alphabetical order based on the scripts I have listed above.
Note, I’m not trying to do any sort of custom sorting in my translation and it just works here.
As for the raw data, you can see some of it inspecting the browser page:
There are also debugs that would output all available data for the calls, though our documentation lists the data that returns/is filterable for option lists here
This is helpful information. I do not know why the list is not issued alphabetically in our environment. But in the meantime, I have found a way by applying the following translation script. It contains a different sorting algorithm than my first script. Now it works perfectly.