VirtualBox

VirtualBox (full named PLVirtualBoxConnector) is special type of service inside our services oriented AlzaBoxes infrastructure specially designed for testing whole chain of functionality without physical AlzaBox.

Similar like each AlzaBox has VirtualBox own identification, BOX100 (then machine or box id is 100) and user account AlzaBox EMA100 with login BOX100 and well known password. This items are encapsulate inside VirtualBox’s configuration.

VirtualBox is also connected with our core services and support all operations against our VirtualBox like against real AlzaBoxes. E.g. it is possible to create reservations through our connector API to the our VirtiualBox or update reservations inside VirtualBox. Of course, the user of the API has to have propper configuration and valid authorization token. This is exactly the same like for reservation into real AlzaBox.

The service of the virtual box runs in all environments inside our internal cluster and exposes addresses for test and production environment. Again. This is exactly the same like for ParcelLockersConnector. The public URL for VirtualBox inside test environment is plvirtualboxconnector-test.alza.cz, inside production then plvirtualboxconnector.alza.cz.

VirtualBox as a service exposes small bunch of the REST endpoints. It is possible get information about reservations (all reservations or by reservation identification) created into VirtualBox (BOX100). And especially it is possible change states of the reservations. It should be the most powerfull thing for testing infrastructure things, like callbacks, without physical box.

Nowadays it is also possible create customer reservation known as AlzaPort reservation and simulate specific aspect of this reversed package flow.

TBD Flow diagram

Examples (API V1):

  1. Get all partner’s reservation inside virtual box (BOX100)

curl -X 'GET' \ 'BASE_URL/virtualbox/v1/reservations?page%5Blimit%5D=100&page%5Boffset%5D=0' \ -H 'accept: application/json' \ -H 'Authorization: Bearer TOKEN'

2. Get one specific partner’s reservation by document inside virtual box (BOX100)

curl -X 'GET' \ 'BASE_URL/virtualbox/v1/reservation?ReservationId=2bb1ed99-aec1-4e98-8e5e-a45ec59c38db' \ -H 'accept: application/json' \ -H 'Authorization: Bearer TOKEN'

3. Update a state of the specific partner’s reservation inside virtual box (BOX100) to STOCKED

curl -X 'PATCH' \ 'BASE_URL/virtualbox/v1/reservation?ReservationId=2bb1ed99-aec1-4e98-8e5e-a45ec59c38db' \ -H 'accept: application/json' \ -H 'Authorization: Bearer TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "state": "STOCKED" }'

4. Create customer reservation (AlzaPort) into virtual box (BOX100)

Where BASE_URL depends on environment mentioned above (staging or production) and TOKEN is partner’s access token.