pyang icon indicating copy to clipboard operation
pyang copied to clipboard

pyang errors on Cisco-IOS-XE-native.yang 17.2.1

Open ravaghi opened this issue 4 years ago • 4 comments

Running pyang on /yang/vendor/cisco/xe/1721/Cisco-IOS-XE-native.yang gives me the errors below, however when I run libyang on the same model, it doesn't produce the same errors. It was suggested to me that the problem is caused by a bug in pyang.

Cisco-IOS-XE-ip.yang:3180: error: Cisco-IOS-XE-ip:native in the path for Tunnel at Cisco-IOS-XE-native.yang:2204 (at Cisco-IOS-XE-ip.yang:3176) is not found Cisco-IOS-XE-ip.yang:3188: error: Cisco-IOS-XE-ip:native in the path for Tunnel at Cisco-IOS-XE-native.yang:2204 (at Cisco-IOS-XE-ip.yang:3184) is not found

ravaghi avatar Feb 23 '21 08:02 ravaghi

Where can we find the YANG modules you use?

mbj4668 avatar Feb 23 '21 09:02 mbj4668

Here is a link to the official YangModels Github repository and the specific YANG model that fails.

ravaghi avatar Feb 23 '21 10:02 ravaghi

Based on my own analysis I think there is a combination of pyang bugs and model issues in this scenario.

First is that the following couple of fixes are needed when dealing with submodules: https://github.com/mbj4668/pyang/pull/711 https://github.com/mbj4668/pyang/pull/713

However even with those fixes in place this particular model (Cisco-IOS-XE-native.yang) will still generate errors because the Cisco-IOS-XE-ip submodule has a leafref to a path defined in another submodule (Cisco-IOS-XE-ip-interfaces) and the models are all on yang version 1. As per RFC 6020 this means Cisco-IOS-XE-ip needs to include Cisco-IOS-XE-interfaces - which it does not do in the published versions: https://tools.ietf.org/html/rfc6020#page-25

So either the Cisco-IOS-XE-ip submodule needs to be fixed to include Cisco-IOS-XE-interfaces or the models need to be migrated to yang 1.1 where I think this rule has been relaxed.

pmerlo74 avatar Mar 07 '21 22:03 pmerlo74

I have similar issue when I use the pyang (2.5.0) on the /yang/vendor/cisco/xe/1711/Cisco-IOS-XE-bgp.yang

Pyang Version used (1.6, 1.7 and the latest 2.5.0)

I see the #711 and #713 are merged and probably included in the 2.5.0. Does that mean that the Yang Modules are invalid and should be corrected ? The latest one which is working is 16101.

pyang Cisco-IOS-XE-bgp.yang
Cisco-IOS-XE-interfaces.yang:2970: error: "Cisco-IOS-XE-interfaces:native" in the path for BD-VIF at Cisco-IOS-XE-bgp.yang:11470 (at Cisco-IOS-XE-interfaces.yang:2966) is not found
Cisco-IOS-XE-interfaces.yang:2970: error: "Cisco-IOS-XE-interfaces:native" in the path for BD-VIF at Cisco-IOS-XE-bgp.yang:11470 (at Cisco-IOS-XE-interfaces.yang:2966) is not found

atarlov avatar Jul 08 '21 08:07 atarlov

Yes, the YANG models are incorrect. In YANG 1, a submodule can only reference names defined in its own submodule, or an included submodule (recursively).

However, if we patch all these modules/submodules to have yang-version 1.1, they still don't compile (you get warnings but no errors). See #194.

mbj4668 avatar Nov 01 '23 11:11 mbj4668

Yes, the YANG models are incorrect. In YANG 1, a submodule can only reference names defined in its own submodule, or an included submodule (recursively).

Hmm, looking at the RFC it does not really say if a sub-module can reference something in the parent module. IF it references something in a different submodule, it must include that. However I cannot include the "parent/belongs-to" module as it would create a circular-reference which is not allow..

I have been testing with libyang (yanglint) and that does not complain that a submodule are referencing something in its parent module.. Do you think that is a mistake from their end?

I assumed that referencing in the parent module was okay

hyberdk avatar Nov 01 '23 12:11 hyberdk

Hi @mbj4668

looking at the code models..

The native model implements the /native/interface/* here: https://github.com/hyberdk/yang_models_ios_xe/blob/c9f80756e96a305d6353c0a013de8d1192b38a4c/ios-xe_17.6.5/Cisco-IOS-XE-native.yang#L2531C10-L2531C16 so native "uses" a grouping in the interfaces submodule to build the /native/interfaces tree..

I think the problem is that the BGP model is referencing the "interface-with-dependency-grouping" here: https://github.com/hyberdk/yang_models_ios_xe/blob/c9f80756e96a305d6353c0a013de8d1192b38a4c/ios-xe_17.6.5/Cisco-IOS-XE-interfaces.yang#L3215C7-L3223

The problem might be (but I am not an yang expert), that the interface-with-dependency-grouping is using a leafref which is implemented in the upstream parent model (at least the "uses" are implemented there) although the grouping is in the same submodule.. I sorta assumed that it would be okay and in compliance with the yang 1.0 RFC..

But it might not be?

I talked with Cisco about this.. They claim religiously that the models are fault free (although they obviously are not). They keep saying that its a pyang issue and not a model issue.. I was inclined to believe them (at least about this very issue) since I could make libyang validate the model without errors (once I commented out all the circular references.)

Esben

hyberdk avatar Nov 01 '23 13:11 hyberdk

Right, so the solution to this in YANG 1 was to let the main module only include submodules, and not define any data nodes in the main module. Instead, you could define a "xxx-data" submodule which could contain the data nodes, and let all other submodules include xxx-data.

The three bullets in 5.1 in RFC 6020 define what is allowed; anything NOT mentioned there is not allowed. Specifically there is no text that says that a submodule can reference data defined in the main module.

In 1.1 this was relaxed.

mbj4668 avatar Nov 01 '23 13:11 mbj4668

Instead, you could define a "xxx-data" submodule which could contain the data nodes, and let all other submodules include xxx-data.

by data nodes you mean move the "native" container into a submodule? if that is the case, then the "main" module would be empty..

I also tried the "mbj/submodules-xpath" branch on the newer 17.12.1 models (https://github.com/YangModels/yang/blob/main/vendor/cisco/xe/17121/Cisco-IOS-XE-bgp.yang). Cisco switched to yang 1.1 in 17.10.1, but it gives me the same error..

image

hyberdk avatar Nov 01 '23 13:11 hyberdk

@mbj4668, I think I managed to create a testcase yang model that shows the problem..

// native.yang
module native {
  yang-version 1.1;
  namespace "http://example.com/native";
  prefix ios;

  include native-sub;

  container native {
    container router;
    container ip {
      container routing-conf {
        leaf routing {
          type string;
        }
      }
    }
    uses config-interface-grouping;
  }
}
// native-sub.yang
submodule native-sub {
  yang-version 1.1;
  belongs-to native {
    prefix ios;
  }

  grouping interface-with-dependency-grouping {
    choice interface-choice {
      leaf GigabitEthernet {
        description
          "Service-Context Virtual Interface Compress";
        type leafref {
          path "/ios:native/ios:interface/ios:GigabitEthernet/ios:name";
        }
      }
    }
  }

  grouping config-interface-grouping {
    container interface {
      description
        "Configure Interfaces";
      list GigabitEthernet {
        description
          "Service-Context Virtual Interface Compress";
        key "name";
        leaf name {
          type uint16;
        }
        uses interface-common-grouping;
      }
    }
  }

  grouping interface-common-grouping {
    container switchport-conf {
      leaf switchport {
        type boolean;
      }
    }
  }
}
// bgp.yang
module bgp {
  yang-version 1.1;
  namespace "http://example.com/bgp";
  prefix ios-bgp;

  import native {
    prefix ios;
  }

  
  grouping config-bgp-grouping {
    list bgp {
      key "id";
      leaf id {
        type string;
      }

      container interface {
        uses ios:interface-with-dependency-grouping;
      }
    }
  }

  augment "/ios:native/ios:router" {
    uses config-bgp-grouping;
  }
}

when I run it, it looks like this:

(venv) eslau@N503476:~/repos-wsl/yang_models_ios-xe/augment_issue/take3$ pyang bgp.yang 
native-sub.yang:13: error: "native-sub:native" in the path for GigabitEthernet at bgp.yang:25 (at native-sub.yang:9) is not found

I will try and see if I can make a test-case for pyang. as my understanding is that this should work with yang 1.1, but it should fail under yang 1.0

hyberdk avatar Nov 01 '23 19:11 hyberdk

Hi @mbj4668,

I just noticed that you added ce528573b0c565e430ee250ee7a874f93f089d41 and 050c6cc86d2a31ca57da10622aeb73c8fbc0fc9e.. Thanks a lot for your continued help!

I tried it on the above yang model.. This version (050c6cc86d2a31ca57da10622aeb73c8fbc0fc9e) seems to work, but both for yang v1.0 and v1.1. that is not what I expected.

Anyways, I tried on the Cisco-IOS-XE-bgp.yang. It fails when using yang v1.0, so I changed it to v1.1 and it seems to fix it!

image

OMG.. if this works its going to be awesome!

I will for sure do more testing and let you know.. again, so many thanks from here!

hyberdk avatar Nov 01 '23 20:11 hyberdk

The latest commits are not sufficient - I am working on some other fixes that I hope to finish tomorrow. I will try with your simplified test as well, thank you for that!

mbj4668 avatar Nov 01 '23 20:11 mbj4668

okay, thanks.. I can actually validate the models.. I have created a new branch for the "default" models from my router, but with the native model upgraded to yang 1.1. pyang-test

Both Cisco-IOS-XE-native.yang and Cisco-IOS-XE-bgp.yang now validates (with a few warnings)..

My ultimative goal is to convert the yang models to python modules using YDK-GEN to do some of my configs as "code" and some I will probably end up using some JSON/YAML with Jinja2 template to convert to XML and send to the box as NetConf..

Anyways.. I tried to "build" the "bundle models", but unfortunately it seems like pyang does not like to convert it to python packages.. here is the stacktrace:

(ydk_vne) eslau@N503476:~/repos-wsl/ydk-gen$ python3 generate.py --python --bundle profiles/bundles/cisco-ios-xe_17.6.5-local.json
/home/eslau/repos-wsl/ydk-gen/generate.py:20: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils import dir_util, file_util
Traceback (most recent call last):
  File "/home/eslau/repos-wsl/ydk-gen/generate.py", line 486, in <module>
    output_directory = (generator.generate(options.bundle))
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/__init__.py", line 98, in generate
    return self._generate_bundle(description_file)
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/__init__.py", line 140, in _generate_bundle
    packages = self._get_packages(curr_bundle)
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/__init__.py", line 212, in _get_packages
    modules = pyang_builder.parse_and_return_modules()
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/builder/_pyang_model_builder.py", line 58, in parse_and_return_modules
    self._validate_pyang_modules(filenames)
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/builder/_pyang_model_builder.py", line 235, in _validate_pyang_modules
    self.ctx.validate()
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/context.py", line 348, in validate
    statements.validate_module(self, m)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 417, in validate_module
    iterate(module, phase)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 412, in iterate
    iterate(s, phase)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 412, in iterate
    iterate(s, phase)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 382, in iterate
    res = f(ctx, stmt)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 181, in <lambda>
    ('init', '$extension'):lambda ctx, s: v_init_extension(ctx, s),
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 503, in v_init_extension
    (modname, revision) = util.prefix_to_modulename_and_revision(
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/util.py", line 75, in prefix_to_modulename_and_revision
    if prefix == module.i_prefix:
AttributeError: 'ModSubmodStatement' object has no attribute 'i_prefix'. Did you mean: 'i_prefixes'?

You know the code, you can probably see exactly what is wrong ;-)

hyberdk avatar Nov 01 '23 21:11 hyberdk

@hyberdk could you try the ydk-gen test again on the branch mbj/submodules-xpath?

If it still fails I have another idea...

mbj4668 avatar Nov 02 '23 13:11 mbj4668

@mbj4668,

slightly different error now:

(ydk_vne) eslau@N503476:~/repos-wsl/ydk-gen$ python3 generate.py --python --bundle profiles/bundles/cisco-ios-xe_17.6.5-local.json
/home/eslau/repos-wsl/ydk-gen/generate.py:20: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils import dir_util, file_util
Traceback (most recent call last):
  File "/home/eslau/repos-wsl/ydk-gen/generate.py", line 486, in <module>
    output_directory = (generator.generate(options.bundle))
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/__init__.py", line 98, in generate
    return self._generate_bundle(description_file)
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/__init__.py", line 140, in _generate_bundle
    packages = self._get_packages(curr_bundle)
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/__init__.py", line 212, in _get_packages
    modules = pyang_builder.parse_and_return_modules()
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/builder/_pyang_model_builder.py", line 58, in parse_and_return_modules
    self._validate_pyang_modules(filenames)
  File "/home/eslau/repos-wsl/ydk-gen/ydkgen/builder/_pyang_model_builder.py", line 235, in _validate_pyang_modules
    self.ctx.validate()
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/context.py", line 349, in validate
    statements.validate_module(self, m)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 417, in validate_module
    iterate(module, phase)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 374, in iterate
    res = f(ctx, stmt)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 187, in <lambda>
    ('grammar', 'submodule'):lambda ctx, s: v_grammar_module(ctx, s),
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/statements.py", line 526, in v_grammar_module
    grammar.chk_module_statements(ctx, stmt, canonical)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/grammar.py", line 575, in chk_module_statements
    return chk_statement(ctx, module_stmt, top_stmts, canonical)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/grammar.py", line 590, in chk_statement
    _chk_stmts(ctx, stmt.pos, [stmt], None, (grammar, canspec), canonical)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/grammar.py", line 663, in _chk_stmts
    _chk_stmts(ctx, stmt.pos, stmt.substmts, stmt,
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/grammar.py", line 663, in _chk_stmts
    _chk_stmts(ctx, stmt.pos, stmt.substmts, stmt,
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/grammar.py", line 663, in _chk_stmts
    _chk_stmts(ctx, stmt.pos, stmt.substmts, stmt,
  [Previous line repeated 1 more time]
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/grammar.py", line 607, in _chk_stmts
    match_res = _match_stmt(ctx, stmt, spec, canonical)
  File "/home/eslau/ydk_vne/lib/python3.10/site-packages/pyang/grammar.py", line 699, in _match_stmt
    if (stmt.i_module.i_version == '1' and
AttributeError: 'ModSubmodStatement' object has no attribute 'i_version'

hyberdk avatar Nov 02 '23 13:11 hyberdk

@hyberdk thanks for testing this. I tried to use YDK-GEN, but didn't manage to install it... I made a less intrusive change to the original problem in branch mbj/submodules-xpath-2. Could you run the ydk-gen tests w/ this branch?

mbj4668 avatar Nov 03 '23 09:11 mbj4668

yeah, ydk-gen install process is a nightmare and a little buggy also..

But the new pyang branch found another fault in the Cisco-IOS-XE-acl.yang (it was a simple regex fault so an easy fix), so good that it found it! :-)

Anyways @mbj4668:

image

IT WORKS!!!

here is the output..

(ydk_vne) eslau@N503476:~/repos-wsl/ydk-gen$ python3 generate.py --python --bundle profiles/bundles/cisco-ios-xe_17.6.5-local.json
/home/eslau/repos-wsl/ydk-gen/generate.py:20: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils import dir_util, file_util
Processing 1 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/ATM-FORUM-TC-MIB.yang
Processing 2 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/ATM-MIB.yang
Processing 3 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/ATM-TC-MIB.yang
Processing 4 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/BGP4-MIB.yang
Processing 5 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/BRIDGE-MIB.yang
Processing 6 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-AAA-SERVER-MIB.yang
Processing 7 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-AAA-SESSION-MIB.yang
Processing 8 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-AAL5-MIB.yang
Processing 9 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-ATM-EXT-MIB.yang
Processing 10 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-ATM-PVCTRAP-EXTN-MIB.yang
Processing 11 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-ATM-QOS-MIB.yang
Processing 12 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-BGP4-MIB.yang
Processing 13 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-BGP-POLICY-ACCOUNTING-MIB.yang
Processing 14 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-BULK-FILE-MIB.yang
Processing 15 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-CBP-TARGET-MIB.yang
Processing 16 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-CBP-TARGET-TC-MIB.yang
Processing 17 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/CISCO-CBP-TC-MIB.yang

<snip>

Processing 434 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/ietf-interfaces.yang
Processing 435 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/ietf-netconf.yang
Processing 436 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/ietf-netconf-monitoring.yang
Processing 437 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/ietf-routing.yang
Processing 438 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/ietf-yang-smiv2.yang
Processing 439 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/ietf-yang-types.yang
Processing 440 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/nvo.yang
Processing 441 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/pim.yang
Processing 442 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/policy-attr.yang
Processing 443 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/policy-types.yang
Processing 444 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/tailf-cli-extensions.yang
Processing 445 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/tailf-common.yang
Processing 446 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/tailf-common-monitoring.yang
Processing 447 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/tailf-common-query.yang
Processing 448 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/tailf-confd-monitoring.yang
Processing 449 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/tailf-meta-extensions.yang
Processing 450 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/tailf-netconf-extensions.yang
Processing 451 of 451 /home/eslau/repos-wsl/ydk-gen/gen-api/.cache/models/[email protected]/tailf-netconf-monitoring.yang
running sdist
running egg_info
creating ydk_models_cisco_ios_xe.egg-info
writing ydk_models_cisco_ios_xe.egg-info/PKG-INFO
writing dependency_links to ydk_models_cisco_ios_xe.egg-info/dependency_links.txt
writing namespace_packages to ydk_models_cisco_ios_xe.egg-info/namespace_packages.txt
writing requirements to ydk_models_cisco_ios_xe.egg-info/requires.txt
writing top-level names to ydk_models_cisco_ios_xe.egg-info/top_level.txt
writing manifest file 'ydk_models_cisco_ios_xe.egg-info/SOURCES.txt'
reading manifest file 'ydk_models_cisco_ios_xe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'ydk_models_cisco_ios_xe.egg-info/SOURCES.txt'
running check
creating ydk-models-cisco-ios-xe-17.6.5.dev1
creating ydk-models-cisco-ios-xe-17.6.5.dev1/ydk
creating ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models
creating ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
creating ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
creating ydk-models-cisco-ios-xe-17.6.5.dev1/ydk_models_cisco_ios_xe.egg-info
copying files to ydk-models-cisco-ios-xe-17.6.5.dev1...
copying MANIFEST.in -> ydk-models-cisco-ios-xe-17.6.5.dev1
copying README.md -> ydk-models-cisco-ios-xe-17.6.5.dev1
copying setup.cfg -> ydk-models-cisco-ios-xe-17.6.5.dev1
copying setup.py -> ydk-models-cisco-ios-xe-17.6.5.dev1
copying ydk/__init__.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk
copying ydk/models/__init__.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models
copying ydk/models/cisco_ios_xe/ATM_FORUM_TC_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/ATM_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/ATM_TC_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/BGP4_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/BRIDGE_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/CISCO_AAA_SERVER_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/CISCO_AAA_SESSION_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/CISCO_ATM_EXT_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/CISCO_ATM_PVCTRAP_EXTN_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/CISCO_ATM_QOS_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/CISCO_BGP4_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe
copying ydk/models/cisco_ios_xe/CISCO_BGP_POLICY_ACCOUNTING_MIB.py -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe

<snip>

copying ydk/models/cisco_ios_xe/_yang/pim.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/policy-attr.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/policy-types.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/tailf-cli-extensions.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/tailf-common-monitoring.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/tailf-common-query.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/tailf-common.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/tailf-confd-monitoring.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/tailf-meta-extensions.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/tailf-netconf-extensions.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk/models/cisco_ios_xe/_yang/tailf-netconf-monitoring.yang -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk/models/cisco_ios_xe/_yang
copying ydk_models_cisco_ios_xe.egg-info/PKG-INFO -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk_models_cisco_ios_xe.egg-info
copying ydk_models_cisco_ios_xe.egg-info/SOURCES.txt -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk_models_cisco_ios_xe.egg-info
copying ydk_models_cisco_ios_xe.egg-info/dependency_links.txt -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk_models_cisco_ios_xe.egg-info
copying ydk_models_cisco_ios_xe.egg-info/namespace_packages.txt -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk_models_cisco_ios_xe.egg-info
copying ydk_models_cisco_ios_xe.egg-info/requires.txt -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk_models_cisco_ios_xe.egg-info
copying ydk_models_cisco_ios_xe.egg-info/top_level.txt -> ydk-models-cisco-ios-xe-17.6.5.dev1/ydk_models_cisco_ios_xe.egg-info
Writing ydk-models-cisco-ios-xe-17.6.5.dev1/setup.cfg
creating dist
Creating tar archive
removing 'ydk-models-cisco-ios-xe-17.6.5.dev1' (and everything under it)

Successfully created source distribution at /home/eslau/repos-wsl/ydk-gen/gen-api/python/cisco_ios_xe-bundle/dist

=================================================
Successfully generated Python YDK cisco-ios-xe bundle package at /home/eslau/repos-wsl/ydk-gen/gen-api/python/cisco_ios_xe-bundle
Please refer to the README for information on how to install the package in your environment

Code generation completed successfully!  Manual installation required!

Total time taken: 2 minutes 1 seconds

thank you sooooo much, this is awesome.. now I have a path forward and I do have some I can shoot to Cisco so they can fix their freaking models, but at least now I can fix them for myself and get going using netconf..

I started on this almost a year ago trying to get it working together with Cisco.. you fixed it in a couple of days.. hats off from here!

Esben

hyberdk avatar Nov 03 '23 09:11 hyberdk

Ok, great, thanks again for your help in testing this! Sorry for not fixing this earlier, but when I first looked at these models they had quite a lot of bugs... Anyway, I will now go ahead and make a new release of pyang.

mbj4668 avatar Nov 03 '23 09:11 mbj4668

Im happy to help :-)

Im just so happy that you found the time to actually fix it.. and yes you would think that Cisco would be in more control of their models then they are.

hyberdk avatar Nov 03 '23 09:11 hyberdk