cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
192
Views
0
Helpful
2
Replies
Cisco Employee

ydk-gen fails to create .py module but others in bundle are created

Trying to generate a package for the following openconfig yang models.   The generate is successful and I'm able to execute python setup.py sdist and pip install dist/ydk-*.tar.gz.    

The problem is I don't get the openconfig-access-points.py file and generate.py doesn't produce any errors.

 

 openconfig-extensions.yang

 openconfig-wifi-types.yang

 openconfig-wifi-phy.yang

 openconfig-wifi-mac.yang

 openconfig-ap-manager.yang

 openconfig-access-points.yang

 

I don't see openconfig-access-point.yang in the Processing output:

 

./generate.py --python --bundle ~/wireless_yang/wireless.json

Processing 1 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/iana-if-type.yang

Processing 2 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/ietf-inet-types@2013-07-15.yang

Processing 3 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/ietf-interfaces@2014-05-08.yang

Processing 4 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/ietf-yang-types.yang

Processing 5 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aaa.yang

Processing 6 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aaa-radius.yang

Processing 7 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aaa-tacacs.yang

Processing 8 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aaa-types.yang

Processing 9 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-acl.yang

Processing 10 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aft.yang

Processing 11 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aft-common.yang

Processing 12 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aft-ethernet.yang

Processing 13 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aft-ipv4.yang

Processing 14 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aft-ipv6.yang

Processing 15 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aft-mpls.yang

Processing 16 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aft-network-instance.yang

Processing 17 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aft-pf.yang

Processing 18 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-aft-types.yang

Processing 19 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-alarm-types.yang

Processing 20 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-alarms.yang

Processing 21 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-ap-manager.yang

Processing 22 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-bfd.yang

Processing 23 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-bgp.yang

Processing 24 of 143 /Users/scoroger/ydk-gen/gen-api/.cache/models/wireless@0.1.0/openconfig-bgp-common.yang

 

wireless.json:

{

  "name": "wireless",

  "version": "0.1.0",

  "author": "Cisco",

  "copyright": "Cisco",

  "description": "YDK bundle for openconfig wireless",

  "models":

  {

      "git": [

        {

          "url": "https://github.com/YangModels/yang.git",

          "commits": [

            {

              "file": [

                        "standard/ietf/RFC/ietf-interfaces@2014-05-08.yang",

                        "standard/ietf/RFC/ietf-yang-types.yang",

                        "standard/ietf/RFC/iana-if-type.yang"

              ]

            }

          ]

 

        },

        {

        "url": "https://github.com/openconfig/public.git",

        "commits": [

            {

                "dir": [

                        "release/models/system",

                        "release/models/platform",

                        "release/models/interfaces",

                        "release/models/vlan",

                        "release/models/optical-transport",

                        "release/models/lldp",

                        "release/models/types"

                  ],

                "file": [

                        "release/models/openconfig-extensions.yang",

                        "release/models/wifi/types/openconfig-wifi-types.yang",

                        "release/models/wifi/phy/openconfig-wifi-phy.yang",

                        "release/models/wifi/mac/openconfig-wifi-mac.yang",

                        "release/models/wifi/ap-manager/openconfig-ap-manager.yang",

                        "release/models/wifi/access-points/openconfig-access-points.yang"

                        ]

            }

        ]

 

        }

  ]

  }

}

 

 

2 REPLIES 2
Cisco Employee

Re: ydk-gen fails to create .py module but others in bundle are created

The output python files do not necessarily correspond 1:1 to yang files. If in a yang file there are no top level nodes defined, meaning that it contains only typedef statements and augments that are used in other yang module, then corresponding API will appear only in those modules.

Highlighted
Cisco Employee

Re: ydk-gen fails to create .py module but others in bundle are created

Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.