Skip to content
Snippets Groups Projects
Commit 2c7cad82 authored by Neil Schark's avatar Neil Schark
Browse files

linting

parent 4d28be52
No related branches found
No related tags found
1 merge request!404Enable export and import of SDN configuration
Pipeline #124763 failed
This commit is part of merge request !404. Comments created here will be created in the context of that merge request.
...@@ -68,7 +68,7 @@ linters: ...@@ -68,7 +68,7 @@ linters:
# custom settings for linters # custom settings for linters
linters-settings: linters-settings:
gocyclo: gocyclo:
min-complexity: 15 min-complexity: 20
golint: golint:
min-confidence: 0.8 min-confidence: 0.8
errcheck: errcheck:
......
...@@ -116,8 +116,7 @@ func (c ConfigurationManagementServer) ImportSDNConfig(ctx context.Context, requ ...@@ -116,8 +116,7 @@ func (c ConfigurationManagementServer) ImportSDNConfig(ctx context.Context, requ
//TODO: Clear DB //TODO: Clear DB
//Create all elements c.createElementsFromSDNConfig(&sdnConfig, request)
c.createElements(&sdnConfig, request)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -126,7 +125,7 @@ func (c ConfigurationManagementServer) ImportSDNConfig(ctx context.Context, requ ...@@ -126,7 +125,7 @@ func (c ConfigurationManagementServer) ImportSDNConfig(ctx context.Context, requ
Timestamp: time.Now().UnixNano()}, nil Timestamp: time.Now().UnixNano()}, nil
} }
func (c ConfigurationManagementServer) createElements(sdnConfig *loadedSDNConfig, request *cmpb.ImportSDNConfigRequest) error { func (c ConfigurationManagementServer) createElementsFromSDNConfig(sdnConfig *loadedSDNConfig, request *cmpb.ImportSDNConfigRequest) error {
pndUUID := uuid.MustParse(request.Pid) pndUUID := uuid.MustParse(request.Pid)
pnd, err := c.pndStore.Get(store.Query{ID: pndUUID}) pnd, err := c.pndStore.Get(store.Query{ID: pndUUID})
if err != nil { if err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment