Skip to content
Snippets Groups Projects
Commit 1e6ad527 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

add online path to alwaysallowed baemtimes

parent 5da71f31
Branches
Tags
No related merge requests found
......@@ -19,6 +19,7 @@ type tokenFlags struct {
Endpoint string
AccessTypes []string
SecretFile string
DaysValid int
TokenDetails bool
}
......@@ -54,7 +55,7 @@ func (cmd *command) CommandToken() error {
request := structs.IssueTokenRequest{
Subject: map[string]string{"beamtimeId": flags.Name},
DaysValid: 180,
DaysValid: flags.DaysValid,
AccessTypes: flags.AccessTypes,
}
json_data, _ := json.Marshal(request)
......@@ -105,6 +106,7 @@ func (cmd *command) parseTokenFlags(message_string string) (tokenFlags, error) {
flagset.StringVar(&at, "types", "", "access typea")
flagset.StringVar(&flags.Endpoint, "endpoint", "", "asapo endpoint")
flagset.BoolVar(&flags.TokenDetails, "token-details", false, "output token details")
flagset.IntVar(&flags.DaysValid, "duration-days", 180, "token duration in days")
flagset.Parse(cmd.args)
......
elk_logs = true
asapo_image_tag = "develop"
asapo_imagename_suffix = ""
asapo_image_tag = ""
influxdb_version="1.8.4"
service_dir="/gpfs/asapo/shared/service_dir"
online_dir="/beamline"
......
{
"Port": {{ env "NOMAD_PORT_authorizer" }},
"LogLevel":"debug",
"AlwaysAllowedBeamtimes":[{"beamtimeId":"asapo_test","beamline":"test","core-path":"{{ env "NOMAD_META_offline_dir" }}/test_facility/gpfs/test/2019/data/asapo_test"},
{"beamtimeId":"asapo_test1","beamline":"test1","core-path":"{{ env "NOMAD_META_offline_dir" }}/test_facility/gpfs/test1/2019/data/asapo_test1"},
{"beamtimeId":"asapo_test2","beamline":"test2","core-path":"{{ env "NOMAD_META_offline_dir" }}/test_facility/gpfs/test2/2019/data/asapo_test2"}],
"AlwaysAllowedBeamtimes":[{"beamtimeId":"asapo_test","beamline":"test","core-path":"{{ env "NOMAD_META_offline_dir" }}/test_facility/gpfs/test/2019/data/asapo_test", "beamline-path":"{{ env "NOMAD_META_online_dir" }}/test/current"},
{"beamtimeId":"asapo_test1","beamline":"test1","core-path":"{{ env "NOMAD_META_offline_dir" }}/test_facility/gpfs/test1/2019/data/asapo_test1", "beamline-path":"{{ env "NOMAD_META_online_dir" }}/test1/current"},
{"beamtimeId":"asapo_test2","beamline":"test2","core-path":"{{ env "NOMAD_META_offline_dir" }}/test_facility/gpfs/test2/2019/data/asapo_test2", "beamline-path":"{{ env "NOMAD_META_online_dir" }}/test2/current"}],
"RootBeamtimesFolder":"{{ env "NOMAD_META_offline_dir" }}",
"CurrentBeamlinesFolder":"{{ env "NOMAD_META_online_dir" }}",
"UserSecretFile":"/local/secret.key",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment