[#324] Drop default container name

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-01-20 16:42:13 +03:00 committed by Angira Kekteeva
parent bffc09167a
commit f19c9315ea
2 changed files with 11 additions and 5 deletions

View file

@ -110,12 +110,19 @@ func (a *Agent) checkContainer(ctx context.Context, cid *cid.ID, friendlyName st
return nil, fmt.Errorf("failed to build placement policy: %w", err)
}
cnr := container.New(
cnrOptions := []container.Option{
container.WithPolicy(pp),
container.WithCustomBasicACL(defaultAuthContainerBasicACL),
container.WithAttribute(container.AttributeName, friendlyName),
container.WithAttribute(container.AttributeTimestamp, strconv.FormatInt(time.Now().Unix(), 10)))
container.SetNativeName(cnr, friendlyName)
container.WithAttribute(container.AttributeTimestamp, strconv.FormatInt(time.Now().Unix(), 10)),
}
if friendlyName != "" {
cnrOptions = append(cnrOptions, container.WithAttribute(container.AttributeName, friendlyName))
}
cnr := container.New(cnrOptions...)
if friendlyName != "" {
container.SetNativeName(cnr, friendlyName)
}
cid, err = a.pool.PutContainer(ctx, cnr)
if err != nil {

View file

@ -197,7 +197,6 @@ func issueSecret() *cli.Command {
Usage: "friendly name of auth container to put the secret into",
Required: false,
Destination: &containerFriendlyName,
Value: "auth-container",
},
&cli.BoolFlag{
Name: "create-session-token",