Svc REST: rename allocUpdateServiceNodePortsNew

This commit is contained in:
Tim Hockin
2021-08-24 22:04:50 -07:00
parent bb815e6687
commit 7d9357b181

View File

@@ -180,7 +180,7 @@ func (al *RESTAllocStuff) allocateUpdate(service, oldService *api.Service, dryRu
} }
// Allocate ports // Allocate ports
if txn, err := al.allocUpdateServiceNodePortsNew(service, oldService, dryRun); err != nil { if txn, err := al.txnUpdateNodePorts(service, oldService, dryRun); err != nil {
result.Revert() result.Revert()
return nil, err return nil, err
} else { } else {
@@ -190,8 +190,7 @@ func (al *RESTAllocStuff) allocateUpdate(service, oldService *api.Service, dryRu
return result, nil return result, nil
} }
//FIXME: rename and merge with updateNodePorts? func (al *RESTAllocStuff) txnUpdateNodePorts(service, oldService *api.Service, dryRun bool) (transaction, error) {
func (al *RESTAllocStuff) allocUpdateServiceNodePortsNew(service, oldService *api.Service, dryRun bool) (transaction, error) {
// The allocator tracks dry-run-ness internally. // The allocator tracks dry-run-ness internally.
nodePortOp := portallocator.StartOperation(al.serviceNodePorts, dryRun) nodePortOp := portallocator.StartOperation(al.serviceNodePorts, dryRun)