Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • asapo/asapo
  • joao.alvim/asapo
  • philipp.middendorf/asapo
  • stefan.dietrich/asapo
4 results
Show changes
Showing
with 242 additions and 123 deletions
......@@ -39,4 +39,3 @@ libcurl - https://curl.haxx.se/ - MIT-like license - https://curl.haxx.se/docs/c
Remarks
========
gcc compiled binaries fall into the GCC Runtime Library Exception - https://www.gnu.org/licenses/gcc-exception.html
Copyright (c) 2021 Deutsches Elektronen-Synchrotron (DESY)
MIT License
Copyright (c) 2021-2024 Deutsches Elektronen-Synchrotron (DESY)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
### Producer Protocol
| Release | used by client | Supported by server | Status |
| ------------ | ------------------- | -------------------- | ---------------- |
| v0.5 | | | In development |
| v0.4 | 21.09.0 - 21.09.0 | 21.09.0 - 21.09.0 | Current version |
| v0.3 | 21.06.0 - 21.06.0 | 21.06.0 - 21.09.0 | Deprecates from 01.09.2022 |
| v0.2 | 21.03.2 - 21.03.2 | 21.03.2 - 21.09.0 | Deprecates from 01.07.2022 |
| v0.1 | 21.03.0 - 21.03.1 | 21.03.0 - 21.09.0 | Deprecates from 01.06.2022 |
| v0.7 | 24.11.0 - 24.11.0 | 24.11.0 - 24.11.0 | Current version |
| v0.6 | 21.12.0 - 22.10.0 | 22.03.0 - 24.11.0 | Deprecates from 01.03.2025 |
| v0.5 | 21.12.0 - 21.12.0 | 21.12.0 - 22.03.0 | Deprecates from 01.03.2023 |
| v0.4 | 21.09.0 - 21.09.0 | 21.09.0 - 22.03.0 | Deprecates from 01.12.2022 |
| v0.3 | 21.06.0 - 21.06.0 | 21.06.0 - 22.03.0 | Deprecates from 01.09.2022 |
| v0.2 | 21.03.2 - 21.03.2 | 21.03.2 - 22.03.0 | Deprecates from 01.07.2022 |
| v0.1 | 21.03.0 - 21.03.1 | 21.03.0 - 22.03.0 | Deprecates from 01.06.2022 |
### Consumer Protocol
| Release | used by client | Supported by server | Status |
| ------------ | ------------------- | -------------------- | ---------------- |
| v0.5 | | | In development |
| v0.4 | 21.06.0 - 21.09.0 | 21.06.0 - 21.09.0 | Current version |
| v0.3 | 21.03.3 - 21.03.3 | 21.03.3 - 21.09.0 | Deprecates from 01.07.2022 |
| v0.2 | 21.03.2 - 21.03.2 | 21.03.2 - 21.09.0 | Deprecates from 01.06.2022 |
| v0.1 | 21.03.0 - 21.03.1 | 21.03.0 - 21.09.0 | Deprecates from 01.06.2022 |
| v0.7 | 24.11.0 - 24.11.0 | 24.11.0 - 24.11.0 | Current version |
| v0.6 | 21.12.0 - 22.10.0 | 22.03.0 - 24.11.0 | Deprecates from 01.03.2025 |
| v0.5 | 21.12.0 - 21.12.0 | 21.12.0 - 22.03.0 | Deprecates from 01.03.2023 |
| v0.4 | 21.06.0 - 21.09.0 | 21.06.0 - 22.03.0 | Deprecates from 01.12.2022 |
| v0.3 | 21.03.3 - 21.03.3 | 21.03.3 - 22.03.0 | Deprecates from 01.07.2022 |
| v0.2 | 21.03.2 - 21.03.2 | 21.03.2 - 22.03.0 | Deprecates from 01.06.2022 |
| v0.1 | 21.03.0 - 21.03.1 | 21.03.0 - 22.03.0 | Deprecates from 01.06.2022 |
# ASAP::O - High performance distributed streaming platform
The client packages are located [here](../../packages). Use the following token to get them: ```f3Q1jP6z8wZy85TUsD8R```.
Example:
```
pip install asapo-consumer --index-url https://\_\_token\_\_:f3Q1jP6z8wZy85TUsD8R@gitlab.desy.de/api/v4/projects/2236/packages/pypi/simple
```
## Folder structure
### Microservices
### Microservices
- **authorizer** - authorization _(Go)_
- **broker** - server for consumer clients _(Go)_
- **discovery** - discovery service _(Go)_
- **file_transfer** - file transfer service to deliver files to clients that have no access to storage _(Go)_
- **receiver** - server for producer clients to send data to, also contains data server that is contacted by consumer clients to get data from cache _(C++)_
- **receiver** - server for producer clients to send data to, also contains data server that is contacted by consumer clients to get data from cache _(C++)_
### Client libraries
- **producer** - producer libraries _(C++, C, Python)_
- **consumer** - consumer libraries _(C++, C, Python)_
- **producer** - producer libraries _(C++, C, Python)_
- **consumer** - consumer libraries _(C++, C, Python)_
### Docs & Tests
- **docs** - doxygen,sphinx and site documentation
- **tests** - automatic integration/e2e tests
- **docs/site/examples** - examples used for site
- **examples** - some outdated examples, also used for automated tests, (todo: move it somewhere)
- **docs/site/examples** - examples used for site
- **examples** - some outdated examples, also used for automated tests, (todo: move it somewhere)
### Auxiliary folders
- **common** - stuff to be shared between microservices
- **CMakeIncludes**, **CMakeModules**, **install** - CMake stuff
- **CMakeIncludes**, **CMakeModules**, **install** - CMake stuff
- **config** - to store various config files, also nomad jobs for tests
- **deploy** - Docker files for various images, Helm files, Nomad&Consul files
......@@ -57,13 +65,13 @@ Need googletest >= [1.8.0](https://github.com/google/googletest/releases/tag/rel
- cmake -DBUILD_TESTS=ON ..
The software is MIT licensed (see LICENSE.txt) and uses third party libraries that are distributed under their own terms
(see LICENSE-3RD-PARTY.txt)
(see CREDITS-3RD-PARTY-LICENSES.txt)
### with non-standard 3rd party libraries paths
- cmake -Dlibmongoc-static-1.0_DIR=... -Dlibbson-static-1.0_DIR=... -Dgtest_SOURCE_DIR=... -DLIBCURL_DIR=... ...
- cmake -Dlibmongoc-static-1.0_DIR=... -Dlibbson-static-1.0_DIR=... -DLIBCURL_DIR=... ...
### compile
- make -j 4
or compile specific target only, e.g.
- make -j 4 receiver
\ No newline at end of file
or compile specific target only, e.g.
- make -j 4 receiver
# Routine Tasks
This file lists maintenance tasks that must be performed regularly.
- Update versions of tools run by `pre-commit`
- Command: `pre-commit autoupdate`
- Last execution: 20/11/2024
......@@ -2,25 +2,29 @@
| Release | API changed\*\* | Protocol | Supported by server from/to | Status |Comment|
| ------------ | ----------- | -------- | ------------------------- | --------------------- | ------- |
| 21.12.0 | No | v0.5 | 21.12.0/21.12.0 | in development | |
| 21.09.0 | No | v0.4 | 21.09.0/21.09.0 | current version |beamline token for raw |
| 21.06.0 | Yes | v0.3 | 21.06.0/21.09.0 | deprecates 01.09.2022 |arbitrary characters|
| 21.03.3 | No | v0.2 | 21.03.2/21.09.0 | deprecates 01.07.2022 |bugfix in server|
| 21.03.2 | Yes | v0.2 | 21.03.2/21.09.0 | deprecates 01.07.2022 |bugfixes, add delete_stream|
| 21.03.1 | No | v0.1 | 21.03.0/21.09.0 | deprecates 01.06.2022 |bugfix in server|
| 21.03.0 | Yes | v0.1 | 21.03.0/21.09.0 | | |
| 24.11.0 | Yes | v0.7 | 24.11.0/24.11.0 | current version | multiple new parameters |
| 22.03.0 | Yes | v0.6 | 22.03.0/24.11.0 | deprecates 01.03.2025 | |
| 21.12.0 | Yes | v0.5 | 21.12.0/22.03.0 | deprecates 01.03.2023 | |
| 21.09.0 | Yes | v0.4 | 21.09.0/22.03.0 | deprecates 01.12.2022 |beamline token for raw |
| 21.06.0 | Yes | v0.3 | 21.06.0/22.03.0 | deprecates 01.09.2022 |arbitrary characters|
| 21.03.3 | No | v0.2 | 21.03.2/22.03.0 | deprecates 01.07.2022 |bugfix in server|
| 21.03.2 | Yes | v0.2 | 21.03.2/22.03.0 | deprecates 01.07.2022 |bugfixes, add delete_stream|
| 21.03.1 | No | v0.1 | 21.03.0/22.03.0 | deprecates 01.06.2022 |bugfix in server|
| 21.03.0 | Yes | v0.1 | 21.03.0/22.03.0 | deprecates 01.06.2022 | |
### Consumer API
| Release | API changed\*\* | Protocol | Supported by server from/to | Status |Comment|
| ------------ | ----------- | --------- | ------------------------- | ---------------- | ------- |
| 21.12.0 | Yes | v0.5 | 21.12.0/21.12.0 | in development | |
| 21.09.0 | No | v0.4 | 21.06.0/21.09.0 | current version | |
| 21.06.0 | Yes | v0.4 | 21.06.0/21.09.0 | |arbitrary characters, bugfixes |
| 21.03.3 | Yes | v0.3 | 21.03.3/21.09.0 | deprecates 01.06.2022 |bugfix in server, error type for dublicated ack|
| 21.03.2 | Yes | v0.2 | 21.03.2/21.09.0 | deprecates 01.06.2022 |bugfixes, add delete_stream|
| 21.03.1 | No | v0.1 | 21.03.0/21.09.0 | deprecates 01.06.2022 |bugfix in server|
| 21.03.0 | Yes | v0.1 | 21.03.0/21.09.0 | | |
| 24.11.0 | Yes | v0.7 | 24.11.0/24.11.0 | current version | multiple new parameters |
| 22.03.0 | Yes | v0.6 | 22.03.0/24.11.0 | deprecates 01.03.2025 | |
| 21.12.0 | Yes | v0.5 | 21.12.0/22.03.0 | deprecates 01.03.2023 | |
| 21.09.0 | No | v0.4 | 21.06.0/22.03.0 | deprecates 01.12.2022 | |
| 21.06.0 | Yes | v0.4 | 21.06.0/22.03.0 | deprecates 01.09.2022 |arbitrary characters, bugfixes |
| 21.03.3 | Yes | v0.3 | 21.03.3/22.03.0 | deprecates 01.06.2022 |bugfix in server, error type for dublicated ack|
| 21.03.2 | Yes | v0.2 | 21.03.2/22.03.0 | deprecates 01.06.2022 |bugfixes, add delete_stream|
| 21.03.1 | No | v0.1 | 21.03.0/22.03.0 | deprecates 01.06.2022 |bugfix in server|
| 21.03.0 | Yes | v0.1 | 21.03.0/22.03.0 | deprecates 01.06.2022 | |
\* insignificant changes/bugfixes (e.g. in return type, etc), normally do not require client code changes, but formally might break the client
......@@ -28,4 +32,4 @@
(e.g. parameter rename ,...),
adding new functionality (thus new client will not work with old server),
but also changing internal structures and client behavior (e.g. adding a field to a structure (privat or public), changing error type, ...).
Check CHANGELOG.md to see more details about changes.
\ No newline at end of file
Check CHANGELOG.md to see more details about changes.
......@@ -3,6 +3,7 @@ package cli
import (
"bytes"
"testing"
"github.com/stretchr/testify/assert"
)
......@@ -10,7 +11,7 @@ var CommandTests = []struct {
cmd command
answer string
}{
{command{"token", []string{"-secret", "secret_file","-types","read","-endpoint","bla", "beamtime"}}, "secret"},
{command{"token", []string{"-secret", "secret_file", "-types", "read", "-endpoint", "bla", "beamtime"}}, "secret"},
{command{"dummy", []string{"description"}}, "wrong"},
}
......
......@@ -19,7 +19,7 @@ type tokenFlags struct {
Endpoint string
AccessTypes []string
SecretFile string
DaysValid int
DaysValid int
TokenDetails bool
}
......@@ -54,8 +54,8 @@ func (cmd *command) CommandToken() error {
}
request := structs.IssueTokenRequest{
Subject: map[string]string{"beamtimeId": flags.Name},
DaysValid: flags.DaysValid,
Subject: map[string]string{"beamtimeId": flags.Name},
DaysValid: flags.DaysValid,
AccessTypes: flags.AccessTypes,
}
json_data, _ := json.Marshal(request)
......@@ -110,8 +110,7 @@ func (cmd *command) parseTokenFlags(message_string string) (tokenFlags, error) {
flagset.Parse(cmd.args)
flags.AccessTypes = strings.Split(at,",")
flags.AccessTypes = strings.Split(at, ",")
if printHelp(flagset) {
os.Exit(0)
......@@ -131,9 +130,9 @@ func (cmd *command) parseTokenFlags(message_string string) (tokenFlags, error) {
return flags, errors.New("endpoint missed ")
}
for _,at:=range flags.AccessTypes {
if at!="read" && at!="write" {
return flags,errors.New("incorrect access type")
for _, at := range flags.AccessTypes {
if at != "read" && at != "write" {
return flags, errors.New("incorrect access type")
}
}
......
This diff is collapsed.
package main
import (
"asapo_common/version"
"asapo_tools/cli"
"asapo_tools/rest_client"
"flag"
"fmt"
"net/http"
"os"
"asapo_common/version"
"asapo_tools/cli"
)
var (
......@@ -30,8 +30,8 @@ func main() {
return
}
if err := cli.DoCommand(flag.Arg(0), flag.Args()[1:]); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
if err := cli.DoCommand(flag.Arg(0), flag.Args()[1:]); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}