openconfig / ygot

A YANG-centric Go toolkit - Go/Protobuf Code Generation; Validation; Marshaling/Unmarshaling
Apache License 2.0
286 stars 106 forks source link

Issue with proto-generator #725

Open 5abeel opened 2 years ago

5abeel commented 2 years ago

Hi, We are trying to come up with a OpenConfig compliant yang model for IPsec (I understand it is not supported by OpenConfig currently). Initial trial to generate proto file failed with what we had, so so went back to the original IETF file that it is based on, which is ietf-ipsec-ikeless. I see same problems there -- any thoughts on how to progress? Is this an issue in ygot's proto-generator or something specific to the yang model itself?

[root@localhost ygot]# go run proto_generator/protogenerator.go   -generate_fakeroot  -path=yang -output_dir=output_dir   -package_name=openconfig -enum_package_name=enums   yang_files/ietf-ipsec-ikeless.yang
F0901 11:34:52.577201 3340125 protogenerator.go:135] errors mapping element: [unimplemented type in scalar generation: bits]
exit status 1
[root@localhost ygot]#
wenovus commented 2 years ago

This is a problem with ygot where we don't support generating for the bits YANG type. If you remove them from the YANG files then you will get past this error.

There is an issue and design doc to track this: https://github.com/openconfig/ygot/issues/494