X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=https-server%2FREADME.md;fp=https-server%2FREADME.md;h=757eeec8b03ad85cc8a820d27e7acf39b61b0a9d;hb=c5655db5780275b07b25b57b767808f2f1eac7d9;hp=0000000000000000000000000000000000000000;hpb=7c434fcb459c84543cdb0ad14aa59391c60d16d4;p=nonrtric%2Fplt%2Franpm.git diff --git a/https-server/README.md b/https-server/README.md new file mode 100644 index 0000000..757eeec --- /dev/null +++ b/https-server/README.md @@ -0,0 +1,72 @@ + +## Https server to simulate a RAN node for file download over https + +### General + +This server can be used to simulate a RAN node for file download over https. +Files can be requested in three ways: +- static file (always the same files returned) +- semi-static files (the requested file must exist in the container) +- generated files (file contents is generated using a template where the start/stop time as well the node name is based on requested file. Counter values are also generated) + + +### Build image + +Build for docker or local kubernetes\ +`./build.sh no-push` + +Build for remote kubernetes - an externally accessible image repo (e.g. docker hub) is needed \ +`./build.sh ` + + +### Configuration +The following env vars (all optional) may be set to control the behavior of the server + +- ALWAYS_RETURN - Name of a file under "/files" in the container that is always returned regardless of requested file on the url `/files/`. The can be used when the file contents is not important. + +- GENERATED_FILE_START_TIME - The first start date- and time stamp of file requested from the url `/generatedfiles/`. Requesting a file with an earlier date and time will return http status 404. Example: "20230220.1300" + +- GENERATED_FILE_TIMEZONE - Time zone to be used for requested files from the url `/generatedfiles/`. Example: "+0100" + +If generated files shall be used, load the file pm-template.xml.gz to the /template-files dir in the container. + +Configure the following for desired behaviou +- static file: ALWAYS_RETURN +- semi-static files: none +- generated files: GENERATED_FILE_START_TIME and GENERATED_FILE_TIMEZONE + + + +### API + +| url | desc | +|--|--| +| `/files/{fileid}` | get static or semi-static file | +| `/generatedfiles/{fileid}` | get generated file | +| `/` | server alive check | + + +### File paths (container) + + +| path | desc | +|--|--| +| None | +| `/files` | Directory for static or semi-static files | +| `/template-files` | Directory of template file pm-template.xml.gz | + + +## License + +Copyright (C) 2023 Nordix Foundation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file