forked from TrueCloudLab/frostfs-node
[#1513] Upgrade NeoFS SDK Go with changed netmap
package
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
24b4c1ecf4
commit
21d2f8f861
70 changed files with 878 additions and 992 deletions
|
@ -240,10 +240,15 @@ func checkSubnet(subCli *morphsubnet.Client, cnr *containerSDK.Container) error
|
|||
return errors.New("missing owner")
|
||||
}
|
||||
|
||||
policy := cnr.PlacementPolicy()
|
||||
if policy == nil {
|
||||
return errors.New("missing placement policy")
|
||||
}
|
||||
|
||||
prm := morphsubnet.UserAllowedPrm{}
|
||||
|
||||
subID := cnr.PlacementPolicy().SubnetID()
|
||||
if subID == nil || subnetid.IsZero(*subID) {
|
||||
subID := policy.Subnet()
|
||||
if subnetid.IsZero(subID) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -256,7 +261,7 @@ func checkSubnet(subCli *morphsubnet.Client, cnr *containerSDK.Container) error
|
|||
}
|
||||
|
||||
if !res.Allowed() {
|
||||
return fmt.Errorf("user is not allowed to create containers in %s subnetwork", subID)
|
||||
return fmt.Errorf("user is not allowed to create containers in %v subnetwork", subID)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue