Skip to content

Avoid create operation on NP containers #162

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

yuekyang
Copy link
Collaborator

@yuekyang yuekyang commented May 2, 2025

In the light of current ConfD behavior, it is better to avoid 'create' operation on non-presence containers. More details can be found in the Tail-F ticket PS-47089.

The ticket mentions that the expected behavior of 'delete' operation on non-presence containers is ambiguous. This update avoids 'delete' operation on non-presence containers, too.

Unit test is added.

(pyats-dev) [yuekyang@yangtest-lnx tests]$ python -m unittest test_ncdiff
/auto/ottawa-xe-mpls/users/yuekyang/pyats-dev/github/genielibs/pkgs/conf-pkg/src/genie/libs/conf/device/__init__.py:46: UnsupportedDeviceOsWarning: Device dummy OS is unknown; Extended Device functionality will not be available: mandatory field 'os' was not given in the yaml file
  warnings.warn(
2025-05-02T11:35:07: %NETCONF-INFO: NETCONF CONNECTED
Error in Netconf reply when getting /netconf-state/schemas from YANG module 'ietf-netconf-monitoring':
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <rpc-error>
    <error-type>rpc</error-type>
    <error-tag>missing-attribute</error-tag>
    <error-severity>error</error-severity>
    <error-info>
      <bad-attribute>message-id</bad-attribute>
      <bad-element>rpc</bad-element>
    </error-info>
  </rpc-error>
</rpc-reply>

Error in Netconf reply when getting /modules-state/module from YANG module 'ietf-yang-library':
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <rpc-error>
    <error-type>rpc</error-type>
    <error-tag>missing-attribute</error-tag>
    <error-severity>error</error-severity>
    <error-info>
      <bad-attribute>message-id</bad-attribute>
      <bad-element>rpc</bad-element>
    </error-info>
  </rpc-error>
</rpc-reply>

.......................................
----------------------------------------------------------------------
Ran 39 tests in 0.412s

OK
(pyats-dev) [yuekyang@yangtest-lnx tests]$

@yuekyang yuekyang requested a review from a team as a code owner May 2, 2025 15:38
@yuekyang yuekyang requested review from Taarini and lsheikal May 2, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant