Skip to content
Snippets Groups Projects
Commit 3321903d authored by Malte Bauch's avatar Malte Bauch
Browse files

Change name for GetFlattenedOndList within grpc server implementation

parent cba9277a
No related branches found
No related tags found
2 merge requests!352Draft: Resolve "Structs like LoadedDevice, LoadedSbi, LoadedRole, LoadedUser are never passed as pointer",!347Resolve "Requesting information from the Controller via NBI takes very long"
Pipeline #109408 passed
...@@ -2,7 +2,6 @@ package server ...@@ -2,7 +2,6 @@ package server
import ( import (
"context" "context"
"fmt"
"strings" "strings"
"time" "time"
...@@ -76,8 +75,8 @@ func (p PndServer) GetOnd(ctx context.Context, request *ppb.GetOndRequest) (*ppb ...@@ -76,8 +75,8 @@ func (p PndServer) GetOnd(ctx context.Context, request *ppb.GetOndRequest) (*ppb
}, nil }, nil
} }
// GetOndList returns a list of existing onds // GetFlattenedOndList returns a list of existing onds
func (p PndServer) GetOndList(ctx context.Context, request *ppb.GetFlattenedOndListRequest) (*ppb.GetFlattenedOndListResponse, error) { func (p PndServer) GetFlattenedOndList(ctx context.Context, request *ppb.GetFlattenedOndListRequest) (*ppb.GetFlattenedOndListResponse, error) {
labels := prometheus.Labels{"service": "pnd", "rpc": "get"} labels := prometheus.Labels{"service": "pnd", "rpc": "get"}
start := metrics.StartHook(labels, grpcRequestsTotal) start := metrics.StartHook(labels, grpcRequestsTotal)
defer metrics.FinishHook(labels, start, grpcRequestDurationSecondsTotal, grpcRequestDurationSeconds) defer metrics.FinishHook(labels, start, grpcRequestDurationSecondsTotal, grpcRequestDurationSeconds)
...@@ -254,8 +253,6 @@ func fillSbis(pnd networkdomain.NetworkDomain) ([]*spb.SouthboundInterface, erro ...@@ -254,8 +253,6 @@ func fillSbis(pnd networkdomain.NetworkDomain) ([]*spb.SouthboundInterface, erro
return nil, err return nil, err
} }
fmt.Printf("SBIS: %+v\n", sbis)
sbisToReturn := []*spb.SouthboundInterface{} sbisToReturn := []*spb.SouthboundInterface{}
for _, sbi := range sbis { for _, sbi := range sbis {
...@@ -264,8 +261,6 @@ func fillSbis(pnd networkdomain.NetworkDomain) ([]*spb.SouthboundInterface, erro ...@@ -264,8 +261,6 @@ func fillSbis(pnd networkdomain.NetworkDomain) ([]*spb.SouthboundInterface, erro
}) })
} }
fmt.Printf("SBIS: %+v\n", sbisToReturn)
return sbisToReturn, nil return sbisToReturn, nil
} }
......
...@@ -3,5 +3,7 @@ if [ $# -eq 0 ] ...@@ -3,5 +3,7 @@ if [ $# -eq 0 ]
echo 'you need to provide the password for the admin user' echo 'you need to provide the password for the admin user'
exit 1 exit 1
fi fi
./artifacts/gosdnc login --controller 127.0.0.1:55055 --u admin --p $1
./artifacts/gosdnc pnd use 5f20f34b-cbd0-4511-9ddc-c50cf6a3b49d
./artifacts/gosdnc device create -a 172.100.0.11:6030 -u admin -p admin --name="test-ceos-1" ./artifacts/gosdnc device create -a 172.100.0.11:6030 -u admin -p admin --name="test-ceos-1"
./artifacts/gosdnc device list ./artifacts/gosdnc device list
...@@ -5,4 +5,5 @@ if [ $# -eq 0 ] ...@@ -5,4 +5,5 @@ if [ $# -eq 0 ]
fi fi
./artifacts/gosdnc login --controller 127.0.0.1:55055 --u admin --p $1 ./artifacts/gosdnc login --controller 127.0.0.1:55055 --u admin --p $1
./artifacts/gosdnc pnd use 5f20f34b-cbd0-4511-9ddc-c50cf6a3b49d
./artifacts/gosdnc device list ./artifacts/gosdnc device list
...@@ -5,4 +5,5 @@ if [ $# -eq 0 ] ...@@ -5,4 +5,5 @@ if [ $# -eq 0 ]
fi fi
./artifacts/gosdnc login --controller 127.0.0.1:55055 --u admin --p $1 ./artifacts/gosdnc login --controller 127.0.0.1:55055 --u admin --p $1
./artifacts/gosdnc pnd use 5f20f34b-cbd0-4511-9ddc-c50cf6a3b49d
./artifacts/gosdnc list ./artifacts/gosdnc list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment