diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index bdfd1c46..e71cf6d0 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,4 +6,5 @@ - Dorsch, Juan Pablo. ETH Zurich - CSCS - Klein, Mark. ETH Zurich - CSCS - Koutsaniti, Eirini. ETH Zurich - CSCS -- Lezcano, Facundo. UNL-CONICET - CIMEC \ No newline at end of file +- Lezcano, Facundo. UNL-CONICET - CIMEC +- Sewell, Christopher John. EPFL diff --git a/deploy/demo/clean_logs.sh b/deploy/demo/clean_logs.sh index 373fe6af..de4f3138 100644 --- a/deploy/demo/clean_logs.sh +++ b/deploy/demo/clean_logs.sh @@ -4,6 +4,6 @@ rm -fr logs/client/*.log rm -fr logs/cluster/*.log rm -fr logs/firecrest/*.log rm -fr logs/keycloak/*.log -rm -fr minio/* +rm -fr minio/.minio.sys rm -fr taskpersistence-data/dump.rdb taskpersistence-data/redis.log echo "done." diff --git a/doc/openapi/firecrest-developers-api.yaml b/doc/openapi/firecrest-developers-api.yaml index 18e983c2..3f00784c 100644 --- a/doc/openapi/firecrest-developers-api.yaml +++ b/doc/openapi/firecrest-developers-api.yaml @@ -610,6 +610,74 @@ paths: text/plain: schema: type: string + '/utilities/stat': + parameters: + - in: header + name: X-Machine-Name + description: The system name + required: true + schema: + type: string + get: + summary: determines the status of a file + description: Uses the stat linux application to determine the status of a file on the + {X-Machine-Name} filesystem. + tags: + - Utilities + parameters: + - name: targetPath + in: query + description: Absolute filesystem path + required: true + allowEmptyValue: false + schema: + type: string + allowReserved: true + - name: dereference + in: query + description: Follow symbolic links + schema: + type: boolean + responses: + '200': + description: Operation completed + content: + application/json: + schema: + $ref: '#/components/schemas/Application-output' + '400': + description: Error in file operation + content: + text/plain: + schema: + type: string + headers: + X-Machine-Does-Not-Exist: + description: Machine does not exist + schema: + type: string + X-Machine-Not-Available: + description: Machine is not available + schema: + type: string + X-Permission-Denied: + description: User does not have permissions to access machine or paths + schema: + type: string + X-Invalid-Path: + description: is an invalid path + schema: + type: string + X-Timeout: + description: Command has finished with timeout signal + schema: + type: string + '401': + description: No auth header given + content: + text/plain: + schema: + type: string '/utilities/symlink': parameters: - in: header diff --git a/src/tests/automated_tests/unit/test_unit_utilities.py b/src/tests/automated_tests/unit/test_unit_utilities.py index 3cf29699..b8367b6d 100644 --- a/src/tests/automated_tests/unit/test_unit_utilities.py +++ b/src/tests/automated_tests/unit/test_unit_utilities.py @@ -43,6 +43,18 @@ (SERVER_UTILITIES, 400, "(a"), (SERVER_UTILITIES, 400, "`hostname`") ] +# test data for stat +DATA_STAT = [ (SERVER_UTILITIES, 200, ".bashrc") , + (SERVER_UTILITIES, 200, "/var/log/messages") , + ("someservernotavailable", 400, ".bashrc"), + (SERVER_UTILITIES, 400, "nofile") , + (SERVER_UTILITIES, 400, "/\\") , + (SERVER_UTILITIES, 400, "d["), + (SERVER_UTILITIES, 400, "a>b"), + (SERVER_UTILITIES, 400, "a