Skip to content
Snippets Groups Projects
Commit d1f6bfbe authored by S.H.'s avatar S.H.
Browse files

Minor changes to output

parent 33890c0b
No related branches found
No related tags found
No related merge requests found
Pipeline #265243 failed
...@@ -25,7 +25,7 @@ func FetchPnd(conn *grpc.ClientConn, auth *rtdt_auth.RtdtAuth) (*pnd.PrincipalNe ...@@ -25,7 +25,7 @@ func FetchPnd(conn *grpc.ClientConn, auth *rtdt_auth.RtdtAuth) (*pnd.PrincipalNe
return nil, fmt.Errorf("Failed to retrieve PND information:\npndresponse: %v\nerror: %w\n", pndResponse, err) return nil, fmt.Errorf("Failed to retrieve PND information:\npndresponse: %v\nerror: %w\n", pndResponse, err)
} }
if pndList := pndResponse.GetPnd(); pndList != nil { if pndList := pndResponse.GetPnd(); pndList != nil {
fmt.Println("pndUUID is now: ", pndList[0].Id) fmt.Println("pndUUID set to: ", pndList[0].Id)
p = pndList[0] // TODO: Only supports one pnd for now p = pndList[0] // TODO: Only supports one pnd for now
return p, nil return p, nil
} else { } else {
......
...@@ -67,7 +67,7 @@ func (r *RtdtManager) LaunchRealnetVEnv(realnetName string, sdnConfig *sdnconfig ...@@ -67,7 +67,7 @@ func (r *RtdtManager) LaunchRealnetVEnv(realnetName string, sdnConfig *sdnconfig
fmt.Println("Successfully wrote realnet clab config file") fmt.Println("Successfully wrote realnet clab config file")
} }
fmt.Printf("Now trying to create realnet with config file: %s\n", realnetClabFName) fmt.Printf("Trying to create realnet with config file: %s\n", realnetClabFName)
// NewVEnv tasks: // NewVEnv tasks:
// - deploy the given clab config, // - deploy the given clab config,
// - establish connection to it // - establish connection to it
......
...@@ -128,11 +128,8 @@ func (v *VEnv) ApplyConfiguration(sdnConfig *sdnconfig.SdnConfig) error { ...@@ -128,11 +128,8 @@ func (v *VEnv) ApplyConfiguration(sdnConfig *sdnconfig.SdnConfig) error {
v.sdnConfig = sdnConfig v.sdnConfig = sdnConfig
sdnConfigParsed, err := json.Marshal(v.sdnConfig) sdnConfigParsed, err := json.Marshal(v.sdnConfig)
if err != nil { if err != nil {
fmt.Println("PARSING ERROR") return fmt.Errorf("Parsing Error in ApplyConfiguration(): %w", err)
return err
} }
fmt.Println("Going to try and upload this sdnconfig json:")
fmt.Println(string(sdnConfigParsed))
configService := configPb.NewConfigurationManagementServiceClient(v.auth.GetConn()) configService := configPb.NewConfigurationManagementServiceClient(v.auth.GetConn())
request := &configPb.ImportSDNConfigRequest{ request := &configPb.ImportSDNConfigRequest{
Timestamp: util.Now(), Timestamp: util.Now(),
...@@ -141,8 +138,7 @@ func (v *VEnv) ApplyConfiguration(sdnConfig *sdnconfig.SdnConfig) error { ...@@ -141,8 +138,7 @@ func (v *VEnv) ApplyConfiguration(sdnConfig *sdnconfig.SdnConfig) error {
} }
response, err := configService.ImportSDNConfig(v.auth.CreateContextWithAuthorization(), request) response, err := configService.ImportSDNConfig(v.auth.CreateContextWithAuthorization(), request)
if err != nil { if err != nil {
fmt.Println("RESPONSE ERROR") return fmt.Errorf("Response Error in ApplyConfiguration(): %w", err)
return err
} }
fmt.Println("Configuration Response:", response.String()) fmt.Println("Configuration Response:", response.String())
return nil return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment