Skip to content
Snippets Groups Projects
Commit 94504d80 authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

go fmt

parent b5a18f7d
No related branches found
No related tags found
1 merge request!155Northbound Interface
Pipeline #71858 failed
...@@ -40,9 +40,9 @@ func GetIds(addr string) error { ...@@ -40,9 +40,9 @@ func GetIds(addr string) error {
if err != nil { if err != nil {
return err return err
} }
for i,pnd := range resp.Pnd { for i, pnd := range resp.Pnd {
log.Infof("PND %v: %v", i+1, pnd.Id) log.Infof("PND %v: %v", i+1, pnd.Id)
for j,sbi := range pnd.Sbi { for j, sbi := range pnd.Sbi {
log.Infof("\tSBI %v: %v", j+1, sbi.Id) log.Infof("\tSBI %v: %v", j+1, sbi.Id)
} }
} }
...@@ -79,7 +79,7 @@ func AddDevice(addr, username, password, sbi, pnd, deviceAddress string) error { ...@@ -79,7 +79,7 @@ func AddDevice(addr, username, password, sbi, pnd, deviceAddress string) error {
}, },
}, },
}, },
Pid: pnd, Pid: pnd,
} }
ctx := context.Background() ctx := context.Background()
resp, err := pndClient.Set(ctx, req) resp, err := pndClient.Set(ctx, req)
...@@ -103,13 +103,13 @@ func GetDevice(addr, pid, path string, did ...string) error { ...@@ -103,13 +103,13 @@ func GetDevice(addr, pid, path string, did ...string) error {
req := &ppb.GetRequest{ req := &ppb.GetRequest{
Timestamp: time.Now().UnixNano(), Timestamp: time.Now().UnixNano(),
Request: &ppb.GetRequest_Ond{ Request: &ppb.GetRequest_Ond{
Ond: &ppb.GetOnd{ Ond: &ppb.GetOnd{
All: all, All: all,
Did: did, Did: did,
}, },
}, },
Pid: pid, Pid: pid,
} }
ctx := context.Background() ctx := context.Background()
resp, err := pndClient.Get(ctx, req) resp, err := pndClient.Get(ctx, req)
...@@ -158,7 +158,7 @@ func sendChangeRequest(addr, pid string, req *ppb.ChangeRequest) error { ...@@ -158,7 +158,7 @@ func sendChangeRequest(addr, pid string, req *ppb.ChangeRequest) error {
r := &ppb.SetRequest{ r := &ppb.SetRequest{
Timestamp: time.Now().UnixNano(), Timestamp: time.Now().UnixNano(),
ChangeRequest: []*ppb.ChangeRequest{req}, ChangeRequest: []*ppb.ChangeRequest{req},
Pid: pid, Pid: pid,
} }
resp, err := pndClient.Set(ctx, r) resp, err := pndClient.Set(ctx, r)
if err != nil { if err != nil {
...@@ -166,4 +166,4 @@ func sendChangeRequest(addr, pid string, req *ppb.ChangeRequest) error { ...@@ -166,4 +166,4 @@ func sendChangeRequest(addr, pid string, req *ppb.ChangeRequest) error {
} }
log.Info(resp.String()) log.Info(resp.String())
return nil return nil
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ func CoreClient(addr string, opts ...grpc.DialOption) (pb.CoreClient, error) { ...@@ -11,4 +11,4 @@ func CoreClient(addr string, opts ...grpc.DialOption) (pb.CoreClient, error) {
return nil, err return nil, err
} }
return pb.NewCoreClient(conn), nil return pb.NewCoreClient(conn), nil
} }
\ No newline at end of file
...@@ -163,4 +163,4 @@ func (oc *OpenConfig) ID() uuid.UUID { ...@@ -163,4 +163,4 @@ func (oc *OpenConfig) ID() uuid.UUID {
return oc.id return oc.id
} }
func (oc *OpenConfig)Type() types.Southbound {return types.Openconfig} func (oc *OpenConfig) Type() types.Southbound { return types.Openconfig }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment