forked from sonic-net/sonic-mgmt-framework
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transformer get for leafref(key) to uint16 fails #280
Comments
module sonic-mclag {
} |
Note that domain_id get on the mclag_domain table works fine. Which was the earlier defect. After taking in the transformer changes this issue is not there. Now the issue is when we have a leafref as in the table mclag_interface table. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Curl request:
curl -X GET "https://10.59.142.85/restconf/data/sonic-mclag:sonic-mclag/MCLAG_INTERFACE" -H "accept: application/yang-data+json"
Logs:
Nov 15 05:20:43.623481 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.619884 17 router.go:126] [REST-5] Recevied GetSonicMclagSonicMclagMclagInterface request from 10.230.26.158:63431
Nov 15 05:20:43.623481 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.622717 17 handler.go:46] [REST-5] GET /restconf/data/sonic-mclag:sonic-mclag/MCLAG_INTERFACE; content-len=0
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.623092 17 handler.go:91] [REST-5] No body
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.628063 17 handler.go:54] [REST-5] Translated path = /sonic-mclag:sonic-mclag/MCLAG_INTERFACE
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.628139 17 translib.go:465] Received Get request for path = /sonic-mclag:sonic-mclag/MCLAG_INTERFACE
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.628188 17 app_interface.go:130] getAppModule called for path =/sonic-mclag:sonic-mclag/MCLAG_INTERFACE
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.628224 17 app_interface.go:137] found the entry in the map for path =/sonic-
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.628275 17 app_interface.go:165] cast to appInterface worked&{ [] map[]}
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.629991 17 common_app.go:64] initialize:path =/sonic-mclag:sonic-mclag/MCLAG_INTERFACE
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.630949 17 db.go:335] NewDB: Init indication not requested
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.631294 17 common_app.go:111] translateGet:path =/sonic-mclag:sonic-mclag/MCLAG_INTERFACE
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.631543 17 common_app.go:183] processGet:path =/sonic-mclag:sonic-mclag/MCLAG_INTERFACE
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.631748 17 xlate.go:307] received xpath =/sonic-mclag:sonic-mclag/MCLAG_INTERFACE
Nov 15 05:20:43.634164 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.633693 17 xlate.go:96] key separator for table MCLAG_INTERFACE in Db 4 is |
Nov 15 05:20:43.639171 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.636708 17 xlate.go:122] keys for table MCLAG_INTERFACE in Db 4 are [{ Comp: [5 PortChannel50] } { Comp: [5 PortChannel60] }]
Nov 15 05:20:43.639171 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.638174 17 xlate.go:96] key separator for table MCLAG_INTERFACE in Db 4 is |
Nov 15 05:20:43.639171 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.638600 17 xlate.go:96] key separator for table MCLAG_INTERFACE in Db 4 is |
Nov 15 05:20:43.643316 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.641379 17 xlate_from_db.go:253] tbl(MCLAG_INTERFACE), k(5|PortChannel50), yc(domain_id)
Nov 15 05:20:43.643316 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.641671 17 xlate_from_db.go:253] tbl(MCLAG_INTERFACE), k(5|PortChannel50), yc(if_name)
Nov 15 05:20:43.643316 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.641903 17 xlate_from_db.go:253] tbl(MCLAG_INTERFACE), k(5|PortChannel50), yc(if_type)
Nov 15 05:20:43.643316 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.642143 17 xlate_from_db.go:97] Received FieldXpath MCLAG_INTERFACE/if_type, yngTerminalNdDtType string and Db field value PortChannel to be converted to yang data-type.
Nov 15 05:20:43.643316 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.642433 17 xlate_from_db.go:140] Yenum/Ystring/Yunion(having all members as strings) type for yangXpath MCLAG_INTERFACE/if_type
Nov 15 05:20:43.643316 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.642635 17 xlate_from_db.go:97] Received FieldXpath MCLAG_INTERFACE/domain_id, yngTerminalNdDtType leafref and Db field value 5 to be converted to yang data-type.
Nov 15 05:20:43.643316 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.642827 17 xlate_from_db.go:140] Yenum/Ystring/Yunion(having all members as strings) type for yangXpath MCLAG_INTERFACE/domain_id
Nov 15 05:20:43.643316 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.643076 17 xlate_from_db.go:97] Received FieldXpath MCLAG_INTERFACE/if_name, yngTerminalNdDtType leafref and Db field value PortChannel50 to be converted to yang data-type.
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.647527 17 xlate_from_db.go:140] Yenum/Ystring/Yunion(having all members as strings) type for yangXpath MCLAG_INTERFACE/if_name
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.647959 17 xlate_from_db.go:253] tbl(MCLAG_INTERFACE), k(5|PortChannel60), yc(domain_id)
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.648203 17 xlate_from_db.go:253] tbl(MCLAG_INTERFACE), k(5|PortChannel60), yc(if_name)
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.648438 17 xlate_from_db.go:253] tbl(MCLAG_INTERFACE), k(5|PortChannel60), yc(if_type)
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.648727 17 xlate_from_db.go:97] Received FieldXpath MCLAG_INTERFACE/if_type, yngTerminalNdDtType string and Db field value PortChannel to be converted to yang data-type.
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.648921 17 xlate_from_db.go:140] Yenum/Ystring/Yunion(having all members as strings) type for yangXpath MCLAG_INTERFACE/if_type
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.649132 17 xlate_from_db.go:97] Received FieldXpath MCLAG_INTERFACE/domain_id, yngTerminalNdDtType leafref and Db field value 5 to be converted to yang data-type.
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.649336 17 xlate_from_db.go:140] Yenum/Ystring/Yunion(having all members as strings) type for yangXpath MCLAG_IRFACE/domain_id
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.649352 17 xlate_from_db.go:97] Received FieldXpath MCLAG_INTERFACE/if_name, yngTerminalNdDtType leafref and Dbeld value PortChannel60 to be converted to yang data-type.
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.649364 17 xlate_from_db.go:140] Yenum/Ystring/Yunion(having all members as strings) type for yangXpath MCLAG_IRFACE/if_name
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.650166 17 xlate.go:368] Payload generated:{"MCLAG_INTERFACE_LIST":[{"domain_id":"5","if_name":"PortChannel50",_type":"PortChannel"},{"domain_id":"5","if_name":"PortChannel60","if_type":"PortChannel"}]}
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server E1115 05:20:43.650748 17 common_app.go:222] ocbinds.Unmarshal() failed. error:got string type for field domain_id, expect fl64
Nov 15 05:20:43.651664 sonic INFO mgmt-framework#supervisord: rest-server E1115 05:20:43.651376 17 handler.go:58] [REST-5] Translib error *errors.errorString - got string type for field domain_id, ext float64
Nov 15 05:20:43.653842 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.652861 17 handler.go:71] [REST-5] Sending response 500, type=application/yang-data+json, data={"ietf-restconf:ors":{"error":[{"error-type":"application","error-tag":"operation-failed"}]}}
Nov 15 05:20:43.653842 sonic INFO mgmt-framework#supervisord: rest-server I1115 05:20:43.653212 17 router.go:132] [REST-5] GetSonicMclagSonicMclagMclagInterface took 30.666283ms
The text was updated successfully, but these errors were encountered: