daemon/cluster: fix empty-lines (revive)
daemon/cluster/convert/service.go:96:34: empty-lines: extra empty line at the end of a block (revive)
daemon/cluster/convert/service.go:169:44: empty-lines: extra empty line at the end of a block (revive)
daemon/cluster/convert/service.go:470:30: empty-lines: extra empty line at the end of a block (revive)
daemon/cluster/convert/container.go:224:23: empty-lines: extra empty line at the start of a block (revive)
daemon/cluster/convert/network.go:109:14: empty-lines: extra empty line at the end of a block (revive)
daemon/cluster/convert/service.go:537:27: empty-lines: extra empty line at the end of a block (revive)
daemon/cluster/services.go:247:19: empty-lines: extra empty line at the end of a block (revive)
daemon/cluster/services.go:252:41: empty-lines: extra empty line at the end of a block (revive)
daemon/cluster/services.go:256:12: empty-lines: extra empty line at the end of a block (revive)
daemon/cluster/services.go:289:80: empty-lines: extra empty line at the start of a block (revive)
daemon/cluster/executor/container/health_test.go:18:37: empty-lines: extra empty line at the start of a block (revive)
daemon/cluster/executor/container/adapter.go:437:68: empty-lines: extra empty line at the end of a block (revive)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0c7b930952
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
87552f2e67
commit
79caa2f955
6 changed files with 0 additions and 12 deletions
|
@ -222,7 +222,6 @@ func configReferencesToGRPC(sr []*types.ConfigReference) ([]*swarmapi.ConfigRefe
|
|||
func configReferencesFromGRPC(sr []*swarmapi.ConfigReference) []*types.ConfigReference {
|
||||
refs := make([]*types.ConfigReference, 0, len(sr))
|
||||
for _, s := range sr {
|
||||
|
||||
r := &types.ConfigReference{
|
||||
ConfigID: s.ConfigID,
|
||||
ConfigName: s.ConfigName,
|
||||
|
|
|
@ -120,7 +120,6 @@ func endpointFromGRPC(e *swarmapi.Endpoint) types.Endpoint {
|
|||
NetworkID: v.NetworkID,
|
||||
Addr: v.Addr})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return endpoint
|
||||
|
|
|
@ -96,7 +96,6 @@ func serviceSpecFromGRPC(spec *swarmapi.ServiceSpec) (*types.ServiceSpec, error)
|
|||
for _, n := range spec.Networks {
|
||||
netConfig := types.NetworkAttachmentConfig{Target: n.Target, Aliases: n.Aliases, DriverOpts: n.DriverAttachmentOpts}
|
||||
serviceNetworks = append(serviceNetworks, netConfig)
|
||||
|
||||
}
|
||||
|
||||
taskTemplate, err := taskSpecFromGRPC(spec.Task)
|
||||
|
@ -169,7 +168,6 @@ func ServiceSpecToGRPC(s types.ServiceSpec) (swarmapi.ServiceSpec, error) {
|
|||
for _, n := range s.TaskTemplate.Networks {
|
||||
netConfig := &swarmapi.NetworkAttachmentConfig{Target: n.Target, Aliases: n.Aliases, DriverAttachmentOpts: n.DriverOpts}
|
||||
taskNetworks = append(taskNetworks, netConfig)
|
||||
|
||||
}
|
||||
|
||||
spec := swarmapi.ServiceSpec{
|
||||
|
@ -473,7 +471,6 @@ func resourcesToGRPC(res *types.ResourceRequirements) *swarmapi.ResourceRequirem
|
|||
MemoryBytes: res.Reservations.MemoryBytes,
|
||||
Generic: GenericResourcesToGRPC(res.Reservations.GenericResources),
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return reqs
|
||||
|
@ -536,7 +533,6 @@ func restartPolicyToGRPC(p *types.RestartPolicy) (*swarmapi.RestartPolicy, error
|
|||
}
|
||||
if p.MaxAttempts != nil {
|
||||
rp.MaxAttempts = *p.MaxAttempts
|
||||
|
||||
}
|
||||
}
|
||||
return rp, nil
|
||||
|
|
|
@ -455,7 +455,6 @@ func (c *containerAdapter) createVolumes(ctx context.Context) error {
|
|||
// It returns an error if the driver name is different - that is a valid error
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -16,7 +16,6 @@ import (
|
|||
)
|
||||
|
||||
func TestHealthStates(t *testing.T) {
|
||||
|
||||
// set up environment: events, task, container ....
|
||||
e := events.New()
|
||||
_, l, _ := e.Subscribe()
|
||||
|
|
|
@ -247,14 +247,11 @@ func (c *Cluster) CreateService(s types.ServiceSpec, encodedAuth string, queryRe
|
|||
logrus.Warnf("unable to pin image %s to digest: %s", ctnr.Image, err.Error())
|
||||
// warning in the client response should be concise
|
||||
resp.Warnings = append(resp.Warnings, digestWarning(ctnr.Image))
|
||||
|
||||
} else if ctnr.Image != digestImage {
|
||||
logrus.Debugf("pinning image %s by digest: %s", ctnr.Image, digestImage)
|
||||
ctnr.Image = digestImage
|
||||
|
||||
} else {
|
||||
logrus.Debugf("creating service using supplied digest reference %s", ctnr.Image)
|
||||
|
||||
}
|
||||
|
||||
// Replace the context with a fresh one.
|
||||
|
@ -286,7 +283,6 @@ func (c *Cluster) UpdateService(serviceIDOrName string, version uint64, spec typ
|
|||
var resp *apitypes.ServiceUpdateResponse
|
||||
|
||||
err := c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
|
||||
|
||||
err := c.populateNetworkID(ctx, state.controlClient, &spec)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue