forked from TrueCloudLab/frostfs-s3-gw
Compare commits
2 commits
dce34ddb9b
...
ed4cc417b7
Author | SHA1 | Date | |
---|---|---|---|
ed4cc417b7 | |||
4253fc5b90 |
2 changed files with 7 additions and 8 deletions
|
@ -42,7 +42,6 @@ type PrmContainerCreate struct {
|
|||
AdditionalAttributes [][2]string
|
||||
}
|
||||
|
||||
// PrmAddContainerPolicyChain groups parameter of FrostFS.AddContainerPolicyChain operation.
|
||||
type PrmAddContainerPolicyChain struct {
|
||||
ContainerID cid.ID
|
||||
Chain chain.Chain
|
||||
|
|
|
@ -137,18 +137,18 @@ func (x *FrostFS) CreateContainer(ctx context.Context, prm frostfs.PrmContainerC
|
|||
|
||||
// AddContainerPolicyChain implements frostfs.FrostFS interface method.
|
||||
func (x *FrostFS) AddContainerPolicyChain(ctx context.Context, prm frostfs.PrmAddContainerPolicyChain) error {
|
||||
var prmAddAPEChain pool.PrmAddAPEChain
|
||||
prmAddAPEChain.Target = ape.ChainTarget{
|
||||
TargetType: ape.TargetTypeContainer,
|
||||
Name: prm.ContainerID.EncodeToString(),
|
||||
}
|
||||
|
||||
data, err := prm.Chain.MarshalBinary()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
prmAddAPEChain := pool.PrmAddAPEChain{
|
||||
Target: ape.ChainTarget{
|
||||
TargetType: ape.TargetTypeContainer,
|
||||
Name: prm.ContainerID.EncodeToString(),
|
||||
},
|
||||
Chain: ape.Chain{Raw: data},
|
||||
}
|
||||
prmAddAPEChain.Chain = ape.Chain{Raw: data}
|
||||
|
||||
err = x.pool.AddAPEChain(ctx, prmAddAPEChain)
|
||||
return handleObjectError("add ape chain to container", err)
|
||||
|
|
Loading…
Reference in a new issue