Skip to content
Snippets Groups Projects
Commit f28d5c62 authored by André Sterba's avatar André Sterba
Browse files

Use docker random name generator

parent 30ea5ce1
No related branches found
No related tags found
1 merge request!150Let user set a name for a device or autogenerate it
Pipeline #68784 passed
......@@ -5,6 +5,7 @@ go 1.14
require (
code.fbi.h-da.de/cocsn/yang-models v0.0.4
github.com/aristanetworks/goarista v0.0.0-20201120222254-94a892eb0c6a
github.com/docker/docker v1.13.1
github.com/golang/protobuf v1.5.0
github.com/google/gnxi v0.0.0-20201221102247-c26672548161
github.com/google/uuid v1.1.2
......
package nucleus
import (
"github.com/docker/docker/pkg/namesgenerator"
"github.com/google/uuid"
"github.com/openconfig/ygot/ygot"
)
......@@ -30,7 +31,7 @@ func NewDevice(sbi SouthboundInterface, opts TransportOptions, name string) (*De
var err error
if name == "" {
name = "please-generate-me"
name = namesgenerator.GetRandomName(0)
}
switch opts := opts.(type) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment