Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
goSDN
Commits
4016da44
Commit
4016da44
authored
3 years ago
by
Andre Sterba
Browse files
Options
Downloads
Patches
Plain Diff
Fix lint errors
See merge request
!285
parent
9a91c91c
No related branches found
No related tags found
2 merge requests
!285
Fix lint errors
,
!264
WIP: Develop
Pipeline
#99472
passed
3 years ago
Stage: build
Stage: test
Stage: analyze
Stage: integration-test
Changes
2
Pipelines
9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controller/nucleus/databaseDeviceStore.go
+1
-1
1 addition, 1 deletion
controller/nucleus/databaseDeviceStore.go
controller/nucleus/device.go
+3
-3
3 additions, 3 deletions
controller/nucleus/device.go
with
4 additions
and
4 deletions
controller/nucleus/databaseDeviceStore.go
+
1
−
1
View file @
4016da44
...
...
@@ -45,7 +45,7 @@ func (s *DatabaseDeviceStore) Get(query store.Query) (device.Device, error) {
collection
:=
db
.
Collection
(
s
.
storeName
)
result
:=
collection
.
FindOne
(
ctx
,
bson
.
D
{
primitive
.
E
{
Key
:
"_id"
,
Value
:
query
.
ID
}})
if
result
==
nil
{
return
nil
,
errors
.
ErrCouldNotFind
{
StoreName
:
pnd
StoreName
}
return
nil
,
errors
.
ErrCouldNotFind
{
StoreName
:
device
StoreName
}
}
err
:=
result
.
Decode
(
&
loadedDevice
)
...
...
This diff is collapsed.
Click to expand it.
controller/nucleus/device.go
+
3
−
3
View file @
4016da44
...
...
@@ -33,9 +33,9 @@ func NewDevice(name string, uuidInput uuid.UUID, opt *tpb.TransportOption, sbi s
name
=
namesgenerator
.
GetRandomName
(
0
)
}
// We want a representation of the OND's config (the SBI-schema's root created through ygot),
// but do not want to work on the sbi.Schema() directly.
// So the root of sbi.Schema() is never changed when a set or get on a device will be called.
// We want a representation of the OND's config (the SBI-schema's root created through ygot),
// but do not want to work on the sbi.Schema() directly.
// So the root of sbi.Schema() is never changed when a set or get on a device will be called.
root
,
err
:=
ygot
.
DeepCopy
(
sbi
.
Schema
()
.
Root
)
if
err
!=
nil
{
return
nil
,
err
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment