When java api try to read some object from api server, the gson library
can't de-serialize the object since these two unsigned long number can't
fit in Java Long type:
{"uuid_mslong": 5976865681521722305, "uuid_lslong": 10854624204062833991},
generateDS.sh map xsd:unsignedLong to java Long is not enough, It need
more precise.
在 2015年04月18日 00:05, Pedro Marques 写道:
The UuidType stores UUIDs as 2 longs. While this is how uuids get
propagated to the control-node/vrouter, you shouldn’t use this field
when using the java API. There are members to access/set the Uuid
property as a Java uuid type.
On Jan 22, 2015, at 11:03 AM, Shaogang Chen <[email protected]
<mailto:[email protected]>> wrote:
Pedro
Thank you for ur reply. We have started to use
Juniper/contrail-java-api. There is one issue we found on Java API.
We use generateDS.sh to generate the Java types. One of the types is
IdPermsType.java, in which we have the following
Public class IdPermsType extends ApiPropertyBase {
Public static class UuidType {
Long uuid_mslong;
Long uid_lslong;
However, we have found out that the uuid from DB is too large to fit
into a Java Long. How to solve this issue? We modify the type from
Long to String locally, then it works.
Thanks
Shaogang
From: Pedro Marques <[email protected] <mailto:[email protected]>>
Date: Thursday, January 15, 2015 at 5:18 PM
To: Shaogang Chen <[email protected] <mailto:[email protected]>>
Cc: "[email protected] <mailto:[email protected]>"
<[email protected] <mailto:[email protected]>>,
Sachchidanand Vaidya <[email protected] <mailto:[email protected]>>
Subject: Re: [opencontrail-dev] about Java API
Shaogang,
github.com/Juniper/contrail-java-api
<http://github.com/Juniper/contrail-java-api> is the most up-to date
version.
We should delete the previous version in the controller repository.
Pedro.
On Jan 15, 2015, at 5:10 PM, Shaogang Chen <[email protected]
<mailto:[email protected]>> wrote:
Contrail has Java API under the following two places.
Juniper <https://github.com/Juniper>/*contrail-java-api
<https://github.com/Juniper/contrail-java-api>*
Juniper/contrail-controller
<https://github.com/Juniper/contrail-controller>/src
<https://github.com/Juniper/contrail-controller/tree/master/src>/api-lib
<https://github.com/Juniper/contrail-controller/tree/master/src/api-lib>/*java*/
I would like to know which one we should use. Do your team intend to
maintain both repository
Thanks
Shaogang
_______________________________________________
Dev mailing list
[email protected] <mailto:[email protected]>
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
_______________________________________________
Dev mailing list
[email protected]
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
_______________________________________________
Dev mailing list
[email protected]
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org