Open istairbn opened 7 years ago
I'm not following on the recursion feature. If the input is an application id, how can there be a core.Directory
under that level? As far as I know, an udm.Application
can not have a core.Directory
as a child. Or am i mistaken?
If the input is udm.Application, then you are correct.
However, Get All Versions is powerful because it returns all children of anything - not just applications. So you can give it an environment and it’ll return the deployeds.
The recursion feature allows you to give it a core.Directory and it’ll return all top level CIs. For example, a structure set up thus:
Team Team/buisnessApp Team/anotherApp Team/dB/mySqlApp Team/dB/oracleApp
Targeting team with get all Versions recursive will return 4 Apps. I then populate a list box, the user selects an app they want. Now the user has selected an app, we run Get All versions again to get the version of what they want to Deploy.
Arguably I’m not using “Get all Versions” for its original purpose - but adding recursion and leaving it defaulting to false means it simply extends the capability to make it more functional whilst leaving default behaviour untouched.
2 changes to Get All Versions
Recursion. Change to the root Client. Defaults to off (mimics current behaviour) but if active then it will recurse through directories. This covers situations where some foldershave a mixture of CIs and core.Directory objects.
ListBox population. Currently the app can populate a List... but not a ListBox. This is a simple addition that prevents having a second script to simply populate a user input List box.