Skip to content
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

Delete and show config are oblivious to the leaf value #157

Closed
navaneethyv opened this issue Dec 2, 2020 · 3 comments
Closed

Delete and show config are oblivious to the leaf value #157

navaneethyv opened this issue Dec 2, 2020 · 3 comments
Labels

Comments

@navaneethyv
Copy link

navaneethyv commented Dec 2, 2020

Consider the below config

cli: cfg> show config
{
  "data": {
    "onfig:forwarding-options": {
      "class-of-service": {
        "interface": [
          {
            "name": "ifp-0/0/3",
            "egress-header-compensation": {
              "bytes": 40
            }
          }
        ]
      }
    }
  }
}

Now I do the following to delete.

cli: cfg> delete forwarding-options class-of-service interface ifp-0/0/3 egress-header-compensation bytes 32
cli: cfg> show diff
             name ifp-0/0/3;
-            egress-header-compensation {
-                bytes 40;
-            }
         }

So irrespective of the value input to the delete , the deletion operation succeeds.
The same also is applicable for show config.

cli: cfg> show config forwarding-options class-of-service interface ifp-0/0/3 egress-header-compensation bytes 34
{
  "config:bytes": 40
}

This will confuse the user, wouldn't throwing an error in case of a wrong input be a better option ?

@navaneethyv
Copy link
Author

Note that this is not the case when input is a string, I have observed this with numerical values.

@olofhagsand olofhagsand added the bug label Dec 2, 2020
olofhagsand added a commit that referenced this issue Dec 16, 2020
  * Added equality of values necessary condition in edit-config delete/remove of leafs
@olofhagsand
Copy link
Member

Should be fixed by above commit.
Please verify.

@navaneethyv
Copy link
Author

Thanks for fixing !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants