Age | Commit message (Collapse) | Author | Files | Lines |
|
Empty files shouldn't be generated when server responds with '204 No
Content'. All such files were removed.
Change-Id: I97823f9a476d7699bc5cf88b7da9f342c4b1ac71
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Swagger in case of error passes its details in "message" field in JSON.
Change "error" to "message" in Boruta error JSONs to comply with Swagger
(which is used in Weles).
Change-Id: I6bcbd3355392467696044f304d5b83ccc410c354
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Changing state of worker is long operation which require RPC call to the
dryad. workers.SetState() returns nil before such action are finished.
Moreover there may occur error after nil was returned. Because of this
user should explicitly check if the state of the dryad was changed.
Change-Id: I5e15d53598a73e8a5d7dd4014fa97aaa0f8b9e74
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: Ie30636704b6311c6223d346aeb89da85f20e2028
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
|
|
Using dot imports should be avoided. Such imports were left only in some
tests.
Change-Id: I1d4db1e2b89e2fd8475c8c657ea72b70bba32c5b
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: I3b8e271e38f8b13fa43ded590e1f31c09922bf5d
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
This branch provides Boruta REST API client package. It implements
Requests and Workers interfaces, and provides additional convenient
methods to check request/worker state or request timeout. This package
is meant for services that want to use Boruta as its device farm (e.g.
Weles).
Change-Id: I2b116abdcb924f7443fad1c4c5401ba71d8d24fa
|
|
Change-Id: I73d3b6e53bbae98130af1f0861752f84444e9265
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Users may want to check timeout value when request gets its resources
or access to worker is prolonged. Currently it can be only done with
GetRequestInfo() which returns all information about given request. To
make this action more convenient HTTP API server will set
Boruta-Job-Timeout header when request is in "IN PROGRESS" state. On the
client side GetJobTimeout is added. It should be also faster way to
obtain timeout value as HEAD method is used instead of GET and there's
no JSON parsing.
Change-Id: I9533f64be063e97b09c5e378a87968395d6b4072
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
GetWorkerState() is convenient method for checking status of worker. It
uses HEAD HTTP method, so it's faster than calling GetWorkerInfo and
checking boruta.WorkerInfo.State. As HEAD method is used it may be
harder to debug when an issue occurs, only HTTP status code is returned.
Change-Id: Ie58934e0c520c6033f0ff28e82ea43eb675353a2
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
GetRequestState() is convenient method for checking status of request.
It uses HEAD HTTP method, so it's faster than calling GetRequestInfo and
checking boruta.ReqInfo.State. As HEAD method is used it may be harder
to debug when an issue occurs, only HTTP status code is returned.
Change-Id: Ia2c33e0294e7840d7acec1896090f29c38163913
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: I0a622bea2265ffbced657921d8cba03a97053cd9
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: I546f528cd57e88fc9aacaabde447313748dfbdfd
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: I96b3e4cab8827dd00fa02f5c4ced3e8b8bc58bff
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: Ie0ef143db2e88cf96cef4267c3257223efb0df63
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: I3e3c59c4c7f5a22e97de867daede6587f4673cfc
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: Icd4ad6dfbdd226a3c6a11bb420488299465bd716
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Definition of boruta/http.AccessInfo2.Addr had to be changed to specific
type (new.TCPAddr) rather than interface, as it's not possible to marshal
interface type to JSON.
Change-Id: I37afd203db356ba4621ad7448a554b59f6553ce9
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: I550ebfd6e87b916e15adf39519568b18828d6ae2
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: Ic2b18ea346c78b50cf0f6754848a31feb753c253
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: I7bac5be49bfd0f2a410720ec008c31c5d35cabd1
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: Ief5f66a3d89bf55694506bbf9f8d8fcb24f51274
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: Id974791f22f96b1408d9bcd0514291c6672cb6ed
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Client package is intended to be utilized by HTTP API users. It will
be more convenient way to interact with Boruta server then directly
calling HTTP methods and parsing JSON by hand.
Change-Id: Ic27b90fc1559403f56358bd5677c36b2c2e57e71
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Change-Id: Ie804197ca5b777ad6afd2c01d55a853ae8c287ee
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Currently when api version isn't provided in URL then request is
redirected to default one. If requested resource isn't found there then
the redirected will be served by the same handler, so it will be
redirected which results in another redirection and so on. This change
introduces new handler that responds with 404 error when page wasn't
found in default version of API.
Change-Id: I1b67f7166d3b0d92500ab2f5727c2827b485d940
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
This patch introduces two custom Boruta headers to replies for some REST
API functions:
* Boruta-Request-Status - contains current status of request. It is
convenient to request HEAD on GetRequestInfo path to check only status
of given request.
* Boruta-Request-Count - contains number of requests returned for
Request List/Filter operation.
* Boruta-Worker-Status - contains current status of worker.
* Boruta-Worker-Count - conttains number of workers returned for Worker
List/Filter operation.
Change-Id: I871c63058b2690bac50046f0dc500c795843b958
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Its purpose is to create and aggregate all Boruta HTTP API version. It
also provides handler for panics and redirect ambiguous request to a
default API version.
Change-Id: Ida94aed412951744557db6c30dd658d36ff3e47e
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|
|
Few datatypes will be shared between server and client, such as server
errors and filters. Move these datatypes to separate package.
Change-Id: I06f025ba8449d2e2c045fbdd84fe59fd76b065ca
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
|