Check timeslots availability
Available in versions: 12.56 and later
Description
Checks if a timeslot can be allocated.
URL
/LoadTest/rest/domains/{domainName}/projects/{projectName}/timeslots/availabilities
Remarks
Body of the request should contain a timeslot description in xml format.
HTTP Method
PUT: Checks timeslot availability.
Request
Headers:
One of the following:
Content-Type: application/xml
Content-Type: application/json
Cookies:
Version 2020 (or later): LWSSO_COOKIE_KEY={LwssoCookie};
Versions earlier than 2020: LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};
Request Body:
PUT: An XML or JSON describing the timeslot to be verified.
Fields that can be used in the request body for checking timeslot availability:
Element | Description |
---|---|
SearchDurationInHours | (Optional) Default value is 42 hours. |
Timeslot | The type of demands for timeslot creation. Can include:
|
PUT /LoadTest/rest/domains/DEFAULT/projects/MyProject/timeslots/availabilities HTTP/1.1
Host: PCServer
Content-Type: application/xml
Cookie: LWSSO_COOKIE_KEY={LwssoCookie};
An example of checking a four hour time interval with already allocated timeslots:
<TimeslotAvailability xmlns="http://www.hp.com/PC/REST/API">
<SearchDurationInHours>4</SearchDurationInHours>
<Timeslot>
<StartTime>2017-09-05T12:00:00Z</StartTime>
<DurationInMinutes>30</DurationInMinutes>
<Description>checking availability</Description>
<Demands>
<ControllerDemandManual>
<HostID>1001</HostID>
</ControllerDemandManual>
<LoadGeneratorDemandAutomatic>
<HostsToReserve>1</HostsToReserve>
</LoadGeneratorDemandAutomatic>
</Demands>
</Timeslot>
</TimeslotAvailability>
Response
Headers:
One of:
Accept: application/xml
Accept: application/json
Cookies:
None
HTML Return Code:
One of the HTTP Return Codes
HTML Body:
The response body contains a list of conflicts that the timeslot could encounter during the selected search interval. If the list is empty, the timeslot can be allocated at any time within the search interval.
The response body example for the above request (checking a four hour time interval with already allocated timeslots):
<TimeslotAvailability>
<Conflicts>
<Conflict>
<StartTime>2017-09-05T12:00:00+00</StartTime>
<ConflictReasons>
<ConflictReason>Number of concurrent runs has reached the project limit (1).</ConflictReason>
<ConflictReason>Number of concurrent runs has reached the license limit (1).</ConflictReason>
<ConflictReason>The following host(s) are already in use: myd12365.lab.net</ConflictReason>
</ConflictReasons>
</Conflict>
<Conflict>
<StartTime>2017-09-05T12:15:00+00</StartTime>
<ConflictReasons>
<ConflictReason>Number of concurrent runs has reached the project limit (1).</ConflictReason>
<ConflictReason>Number of concurrent runs has reached the license limit (1).</ConflictReason>
<ConflictReason>The following host(s) are already in use: myd12365.lab.net</ConflictReason>
</ConflictReasons>
</Conflict>
</Conflicts>
</TimeslotAvailability>
{
"Conflicts": [
{
"StartTime": "2024-04-12T20:15:00+00",
"ConflictReasons": [
"Number of concurrent runs has reached the project limit (1).",
"Number of concurrent runs has reached the LRE license limit (1).",
"The following host(s) are already in use: lreh1-nightly-mssql-clean.lr.admlabs.aws.swinfra.net",
"Requested 1 automatch load generator(s) ; 0 available."
]
},
{
"StartTime": "2024-04-12T20:30:00+00",
"ConflictReasons": [
"Number of concurrent runs has reached the project limit (1).",
"Number of concurrent runs has reached the LRE license limit (1).",
"The following host(s) are already in use: lreh1-nightly-mssql-clean.lr.admlabs.aws.swinfra.net",
"Requested 1 automatch load generator(s) ; 0 available."
]
},
]
}
See Also