ydk-gen icon indicating copy to clipboard operation
ydk-gen copied to clipboard

gNMI: spurious top object returned for empty data

Open 111pontes opened this issue 5 years ago • 0 comments

When a 'get' RPC returns no data, the entity returned includes the top model object. If no data is returned, the entity returned should be an empty string.

Expected Behavior

2019-12-13 08:10:45,820 - gnmi_client.gnmi_client.commands.rpc - INFO - Decoded rpc
2019-12-13 08:10:45,824 - ydk - ERROR - Cannot find model with module name 'Cisco-IOS-XR-clns-isis-oper'
2019-12-13 08:10:45,825 - ydk - ERROR - Cannot find model with module name 'Cisco-IOS-XR-clns-isis-oper'
2019-12-13 08:10:45,901 - ydk - INFO - 
=============== Get Request Sent ================
path {
  origin: "Cisco-IOS-XR-clns-isis-oper"
  elem {
    name: "isis"
  }
}
type: CONFIG
encoding: JSON_IETF


2019-12-13 08:10:46,142 - ydk - INFO - 
============= Get Response Received =============
notification {
  timestamp: 1576251007851446763
  update {
    path {
      origin: "Cisco-IOS-XR-clns-isis-oper"
      elem {
        name: "isis"
      }
    }
    val {
      json_ietf_val: ""
    }
  }
}
error {
}

2019-12-13 08:10:46,143 - ydk - INFO - Get Operation Succeeded

Current Behavior

2019-12-13 08:10:45,820 - gnmi_client.gnmi_client.commands.rpc - INFO - Decoded rpc
2019-12-13 08:10:45,824 - ydk - ERROR - Cannot find model with module name 'Cisco-IOS-XR-clns-isis-oper'
2019-12-13 08:10:45,825 - ydk - ERROR - Cannot find model with module name 'Cisco-IOS-XR-clns-isis-oper'
2019-12-13 08:10:45,901 - ydk - INFO - 
=============== Get Request Sent ================
path {
  origin: "Cisco-IOS-XR-clns-isis-oper"
  elem {
    name: "isis"
  }
}
type: CONFIG
encoding: JSON_IETF


2019-12-13 08:10:46,142 - ydk - INFO - 
============= Get Response Received =============
notification {
  timestamp: 1576251007851446763
  update {
    path {
      origin: "Cisco-IOS-XR-clns-isis-oper"
      elem {
        name: "isis"
      }
    }
    val {
      json_ietf_val: ""
    }
  }
}
error {
}

2019-12-13 08:10:46,143 - ydk - INFO - Get Operation Succeeded
{
  "Cisco-IOS-XR-clns-isis-oper:isis": {}
}

System Information

$ pip list | grep ydk
ydk              0.8.4      
ydk-service-gnmi 0.4.0.post4
$

111pontes avatar Dec 13 '19 16:12 111pontes