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
return nil, fmt.Errorf("Failed to retrieve PND information:\npndresponse: %v\nerror: %w\n", pndResponse, err)
}
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
return p, nil
} else {
......
......@@ -67,7 +67,7 @@ func (r *RtdtManager) LaunchRealnetVEnv(realnetName string, sdnConfig *sdnconfig
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:
// - deploy the given clab config,
// - establish connection to it
......
......@@ -128,11 +128,8 @@ func (v *VEnv) ApplyConfiguration(sdnConfig *sdnconfig.SdnConfig) error {
v.sdnConfig = sdnConfig
sdnConfigParsed, err := json.Marshal(v.sdnConfig)
if err != nil {
fmt.Println("PARSING ERROR")
return err
return fmt.Errorf("Parsing Error in ApplyConfiguration(): %w", err)
}
fmt.Println("Going to try and upload this sdnconfig json:")
fmt.Println(string(sdnConfigParsed))
configService := configPb.NewConfigurationManagementServiceClient(v.auth.GetConn())
request := &configPb.ImportSDNConfigRequest{
Timestamp: util.Now(),
......@@ -141,8 +138,7 @@ func (v *VEnv) ApplyConfiguration(sdnConfig *sdnconfig.SdnConfig) error {
}
response, err := configService.ImportSDNConfig(v.auth.CreateContextWithAuthorization(), request)
if err != nil {
fmt.Println("RESPONSE ERROR")
return err
return fmt.Errorf("Response Error in ApplyConfiguration(): %w", err)
}
fmt.Println("Configuration Response:", response.String())
return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment