The XTS Allocator Server is a tool for managing device allocation within a shared testing environment. It allows users to allocate, deallocate, and search for devices while preventing conflicts between users.
- Python 3.8 or later
- All the packages listed in requirements.txt
- Can be installed using
$ pip install -r requirements.txt
- Can be installed using
-
Clone the Repository:
git clone https://github.com/rdkcentral/xts_allocator_server.git cd xts_allocator_server
-
Set Up the Database: Initialize the SQLite database:
python database_setup.py
-
Run the Server: Start the XTS Allocator Server:
python app.py
Start the server with the following command:
python app.py
-
Allocate a Device:
xts allocate --id <device_id> --platform <platform_name> --tags <tag1,tag2> --duration <time>
-
List All Slots:
xts allocator list
-
Search for a Slot:
xts allocator search --platform <platform_name> --tags <tag1,tag2>
-
Deallocate a Slot:
xts deallocate --id <device_id>
-
Run a Test:
xts run --test <test_name> --allocate <device_id>
-
Allocate Slot (
POST /allocate_slot
):- Allocates a device based on ID, platform, or tags.
- Parameters:
{ "user": { "username": "user01", "name": "John Doe", "email": "[email protected]" }, "slot": { "id": "1", "platform": "alpha.uk", "tags": ["tag1", "tag2"] } }
-
List Slots (
GET /list_slots
):- Lists all available and allocated slots.
-
Search Slots (
POST /search_slots
):- Searches for slots matching specific criteria (platform, tags, etc.).
-
Deallocate Slot (
POST /deallocate_slot
):- Deallocates a slot based on its ID and user ownership.
See contributing file: CONTRIBUTING.md
See license file: LICENSE