Hi Dojo,
I want to create an infinite booking for some resources. Is there a way that I can use the GetEligibleResources method of the ResourceManagerHelper class by only specifying the start date?
My use case is that I want to reserve capacity on frequency bands in a satellite environment. Once a terminal is committed, capacity needs to be reserved on the frequency band resource to avoid oversubscription of the frequency band. Therefore a booking needs to be created from the moment the terminal is configured until we decommission the terminal.
hi Jens
For a permanent booking the end date is set to ReservationInstance.PermanentEnd, so you could use that as an end date.
var context = new EligibleResourceContext
{
ContextId = Guid.NewGuid(),
TimeRange = new TimeRangeUtc(startDate, ReservationInstance.PermanentEnd),
};
Hi Jens,
The below example should retrieve the eligible resources.
Note: There is also an option for the ResourceFilter to further filter down the required resources, in the example it also filters on the correct Resource Pool GUID.
public static List<Resource> GetEligibleResources(DateTime start)
{
return SrmManagers.ResourceManager.GetEligibleResources(
new EligibleResourceContext
{
TimeRange = new TimeRangeUtc(start, TimeSpan.FromDays(365)),
ResourceFilter = ResourceExposers.PoolGUIDs.Contains(ResourcePools.PoolIdAsiConnectorA),
})
.EligibleResources;
}