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

clixon Version 6.5.0: CLI -- > Variables of type bits, can't set more than one bit. Only last set argument is recognized. #492

Open
coyote-dih opened this issue Feb 12, 2024 · 1 comment

Comments

@coyote-dih
Copy link

The yang file "ieee802-dot1ab-lldp.yang" defines the follwing 'tlvs-tx-enable' leaf variable with bits 0 ... 3

  **leaf tlvs-tx-enable {
    type bits {
      bit port-desc {
        position 0;
        description
          "Transmit 'Port Description TLV'.";
      }
      bit sys-name {
        position 1;
        description
          "Transmit 'System Name TLV'.";
      }
      bit sys-desc {
        position 2"; 
        description
          "Transmit 'System Description TLV'.";
      }
      bit sys-cap {
        position 3; 
        description
          "Transmit 'System Capabilities TLV'.";
      }
    }

CLI
device(/ieee802-dot1ab-lldp:lldp)> set port eth2 00-08-B0-02-03-04 tlvs-tx-enable port-desc
device(/ieee802-dot1ab-lldp:lldp)> commit
device(/ieee802-dot1ab-lldp:lldp)> show
port eth2 00-08-B0-02-03-04 {
tlvs-tx-enable port-desc;
}
device(/ieee802-dot1ab-lldp:lldp)> set port eth2 00-08-B0-02-03-04 tlvs-tx-enable sys-name port-desc
CLI syntax error: "set port eth2 00-08-B0-02-03-04 tlvs-tx-enable sys-name port-desc": Unknown command

device(/ieee802-dot1ab-lldp:lldp)> set port eth2 00-08-B0-02-03-04 tlvs-tx-enable "sys-name port-desc"
CLI syntax error: "set port eth2 00-08-B0-02-03-04 tlvs-tx-enable "sys-name port-desc"": Unknown command

device(/ieee802-dot1ab-lldp:lldp)> set port eth2 00-08-B0-02-03-04 tlvs-tx-enable sys-name
device(/ieee802-dot1ab-lldp:lldp)> commit
device(/ieee802-dot1ab-lldp:lldp)> show
port eth2 00-08-B0-02-03-04 {
tlvs-tx-enable sys-name;
}**

It isn't possible the set more than 1 bit in that tlvs-tx-enable variable at a time !
Maybe the syntax isn't quite correct?

@olofhagsand
Copy link
Member

Correct. This is an obvious flaw in the AUTOCLI. You can only set one bit.
See also: clicon/cligen#102

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

No branches or pull requests

2 participants