forked from TrueCloudLab/frostfs-sdk-go
[#203] pool: fix PrmContainerDelete
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
1e8aa6a99f
commit
385f1b10f9
1 changed files with 8 additions and 3 deletions
11
pool/pool.go
11
pool/pool.go
|
@ -154,7 +154,9 @@ func (c *clientWrapper) containerList(ctx context.Context, prm PrmContainerList)
|
||||||
func (c *clientWrapper) containerDelete(ctx context.Context, prm PrmContainerDelete) error {
|
func (c *clientWrapper) containerDelete(ctx context.Context, prm PrmContainerDelete) error {
|
||||||
var cliPrm sdkClient.PrmContainerDelete
|
var cliPrm sdkClient.PrmContainerDelete
|
||||||
cliPrm.SetContainer(prm.cnrID)
|
cliPrm.SetContainer(prm.cnrID)
|
||||||
cliPrm.SetSessionToken(prm.stoken)
|
if prm.stokenSet {
|
||||||
|
cliPrm.SetSessionToken(prm.stoken)
|
||||||
|
}
|
||||||
|
|
||||||
if _, err := c.client.ContainerDelete(ctx, cliPrm); err != nil {
|
if _, err := c.client.ContainerDelete(ctx, cliPrm); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -766,8 +768,10 @@ func (x *PrmContainerList) SetOwnerID(ownerID owner.ID) {
|
||||||
|
|
||||||
// PrmContainerDelete groups parameters of DeleteContainer operation.
|
// PrmContainerDelete groups parameters of DeleteContainer operation.
|
||||||
type PrmContainerDelete struct {
|
type PrmContainerDelete struct {
|
||||||
stoken session.Token
|
cnrID cid.ID
|
||||||
cnrID cid.ID
|
|
||||||
|
stoken session.Token
|
||||||
|
stokenSet bool
|
||||||
|
|
||||||
waitParams WaitParams
|
waitParams WaitParams
|
||||||
waitParamsSet bool
|
waitParamsSet bool
|
||||||
|
@ -781,6 +785,7 @@ func (x *PrmContainerDelete) SetContainerID(cnrID cid.ID) {
|
||||||
// SetSessionToken specifies session within which operation should be performed.
|
// SetSessionToken specifies session within which operation should be performed.
|
||||||
func (x *PrmContainerDelete) SetSessionToken(token session.Token) {
|
func (x *PrmContainerDelete) SetSessionToken(token session.Token) {
|
||||||
x.stoken = token
|
x.stoken = token
|
||||||
|
x.stokenSet = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetWaitParams specifies timeout params to complete operation.
|
// SetWaitParams specifies timeout params to complete operation.
|
||||||
|
|
Loading…
Reference in a new issue