project-arlo / sonic-mgmt-framework

SONiC Management Framework
Other
5 stars 15 forks source link

Translib back end framework failed to handle attribute get from swagger ui. #33

Closed rvasanthm closed 5 years ago

rvasanthm commented 5 years ago

translib framework reporting error for for handling individual attribute get from swagger UI, While handling the attribute get there is noting to validate as there is no input data associated with attribute get request.

Jul 17 18:45:54.515268 sonic INFO mgmt-framework#supervisord: rest-server I0717 18:45:54.511293     155 translib.go:519] Error in request binding: /device/system: /device/system/config: /device/system/config/hostname: length 0 is outside range 1..253 for schema hostname

Jul 17 18:50:32.623688 sonic INFO mgmt-framework#supervisord: rest-server I0717 18:50:32.621976     155 translib.go:519] Error in request binding: /device/system: /device/system/state: /device/system/state/hostname: length 0 is outside range 1..253 for schema hostname
Jul 17 18:51:19.839260 sonic INFO mgmt-framework#supervisord: rest-server I0717 18:51:19.836533     155 translib.go:519] Error in request binding: /device/system: /device/system/state: /device/system/state/current-datetime: "" does not match regular expression pattern "^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z[+-][0-9]{2}:[0-9]{2}$" for schema current-datetime
mbalachandar commented 5 years ago

I have started looking in to this issue, looks like YGOT's validate method throws this error while validating this leaf node without value.

mbalachandar commented 5 years ago

Fix has been checked in for this issue, please pull the changes and try it

maheshwari-mayank commented 5 years ago

Issue Fixed.