Hey all
I have a blueprint which is assigned to a reservation policy, which in turn is assigned to 3 different reservations. If I deploy, I have no control over which reservation will be used. Does anyone know how I can best achieve this? I have been doing this a different way until now but not happy with the result.
A nice simple diagram
Thanks,
Gavin
You could present the reservations as a drop down. I present reservations based on previous answers.
Does your dropdown reference reservations or policies?
Reservation Policies using ReservationPolicyID I have actually very few reservations in the policy itself and expand out the name of the reservation to be something that can be dynamically defined like location-os-size-environment.
I am currently doing it this way. I have drop downs for Vrm.Datacenter.Location and ReservationPolicyID.
The ReservationPolicyID dropdown enumerates the reservations for the current user/business group and only displays those that the user has a reservation for. This has allowed the list to be dynamic in that it will change when new reservations are added or removed. I have had to be a bit naughty and enforce a naming convention on the reservations as I use a string.split to generate the key name itself (i.e. Non-Production).
I guess I was looking if there was a better way that I could achieve this but perhaps this is the best way?
Thanks,
Gavin
In context, this is what I am trying to deploy against.
There are a number of clusters that support 3 classes of servers: Application, Database and Special. For each class of server there is a corresponding cluster for Development, Non-Production and Production (with the exception of Special which shares with Application on the Development side - using a reservation/policy to abstract this and make the logic simpler).
Providing a dropdown for the ReservationPolicy was part of the puzzle. The problem was that only policies that relate to the server class should be displayed. So taking Application as an example, only 3 policies should be displayed in the list, not 9. To work around this I set a custom property on the blueprint to define its 'cluster class'. I set this to 'Application, Database or Special'. I then feed this property value into the code/workflow that generates the ReservationPolicyID dropdown. This means that A) my blueprint must have this property set or the dropdown list will be empty and B) the reservation policy names MUST include the same string at the end (i do a string.split on the underscore).
The result is that I have a dynamically generated dropdown of policies that are suitable for the blueprint being requested and get the correct placement. Of course, I don't like the string.split part of the solution nor the custom property.
Any thoughts or do you think I may be doing the best I can with a bad layout?
Gavin
We are doing pretty much the same thing but I take things one step further in that I pull the available networks from the policy and also present that in another dropdown.
My 'Network' dropdown does exactly the same 🙂
I was tempted to create a SQL database that held all the logic for which network should be used based on location/reservation to remove that as an option. But I think it would be a mad beast to manage as it's another thing to keep up to date.