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 A List, Delete All List #2329

Open
InterNALXz opened this issue Dec 21, 2024 · 1 comment
Open

Delete A List, Delete All List #2329

InterNALXz opened this issue Dec 21, 2024 · 1 comment
Labels
is:question Issue is actually a question.

Comments

@InterNALXz
Copy link

InterNALXz commented Dec 21, 2024

when I use a xml to delete index 2:

<edit-config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
  <target>
    <running/>
  </target>
  <config>
    <xacl nc:operation="delete" xmlns="x-acl">
      <rule>
        <index>2</index>
      </rule>
    </xacl >
  </config>
</edit-config>

yang is :

module x-acl{
	
    namespace "x-acl;
	
    prefix "x-acl";

    import ietf-inet-types{
        prefix "inet";
    }
	
    revision 2015-05-18{
        description "Initial revision";
    }

    container xacl{
        list rule{
            key index;
            leaf index{
                type uint32;
            }
            leaf xid{
                type uint8;
            }}}

and other index also be deleted, how can I modify this

@michalvasko
Copy link
Member

Use

<edit-config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
  <target>
    <running/>
  </target>
  <config>
    <xacl xmlns="x-acl">
      <rule nc:operation="delete">
        <index>2</index>
      </rule>
    </xacl >
  </config>
</edit-config>

to delete only rule with index 2.

@michalvasko michalvasko added the is:question Issue is actually a question. label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:question Issue is actually a question.
Projects
None yet
Development

No branches or pull requests

2 participants