0

I've just started to use Netconf server and I want to play with it. I installed OpenYuma as netconf server, and for a client I would use the provided yangcli as a first approach.

My problem is that I cannot use filtering in get commands, since in the tutorials and docs are not any usable example, only previously written (outer) xml files are used, which are not shown in these docs.

I know that there are two types of filtering : subtree and xpath. I do not care, which should be used, I only want to use one of them properly.

If I type get in yangcli, I get a lot of data. In this case, I only want to get the memInfo part with all the leafs.

Please supplement/correct my command!!!

yangcli>get filter=('xpath','memInfo') ???

This command does not throw any errors, but only empty data object is received. Thanks

predi
  • 5,528
  • 32
  • 60
cs.lev
  • 182
  • 1
  • 11

2 Answers2

0

use this one instead:

yangcli> sget /proc/meminfo

cs.lev
  • 182
  • 1
  • 11
0

You must add @ before the filter name

yangcli> get filter=@stack.xml

RPC Data Reply 12 for session 24:

rpc-reply {
  data {
    proc {
      meminfo {
        MemTotal '7956336 kB'
        MemFree '7079064 kB'
        Buffers '47460 kB'
        Cached '294076 kB'
        SwapCached '0 kB'
        Active '582144 kB'
        Inactive '226840 kB'
        Active_anon_ '517864 kB'
        Inactive_anon_ '29680 kB'
        Active_file_ '64280 kB'
        Inactive_file_ '197160 kB'
        Unevictable '0 kB'
        Mlocked '0 kB'
        SwapTotal '0 kB'
        SwapFree '0 kB'
        Dirty '0 kB'
        Writeback '0 kB'
        AnonPages '467456 kB'
        Mapped '50240 kB'
        Shmem '80100 kB'
        Slab '33104 kB'
        SReclaimable '12804 kB'
        SUnreclaim '20300 kB'
        KernelStack '2512 kB'
        PageTables '7464 kB'
        NFS_Unstable '0 kB'
        Bounce '0 kB'
        WritebackTmp '0 kB'
        CommitLimit '3978168 kB'
        Committed_AS '677912 kB'
        VmallocTotal '135290159040 kB'
        VmallocUsed '3516 kB'
        VmallocChunk '0 kB'
        HardwareCorrupted '0 kB'
        HugePages_Total 0
        HugePages_Free 0
        HugePages_Rsvd 0
        HugePages_Surp 0
        Hugepagesize '2048 kB'
      }
    }
  }
}

Where stack.xml is:

<proc>
    <meminfo/>
</proc>
Jac
  • 38
  • 6