[#324] Drop default container name
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
bffc09167a
commit
f19c9315ea
2 changed files with 11 additions and 5 deletions
|
@ -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 {
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue