Skip to Content.
Sympa Menu

rare-dev - Re: [rare-dev] netconf

Subject: Rare project developers

List archive

Re: [rare-dev] netconf


Chronological Thread 
  • From: David Schmitz <>
  • To:
  • Cc: mc36 <>
  • Subject: Re: [rare-dev] netconf
  • Date: Fri, 17 Feb 2023 13:06:18 +0100 (CET)
  • Authentication-results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=lrz.de

Hi,

I maybe found the culprit, why
ncclient is now throwing the exception

MainProcess[1631064] 2023-02-17 12:01:48,117 utils.proxy ERROR: proxy::fetch_xml():
got exception StartTag: invalid element name, line 2, column 37513 (<string>,
line 2)
(the column number 37513 is probably dependent on my actual configuration
and the actual contents returned in the response)

on parsing response of get-config query.

Here is the section of the response
(just reformatted for indentation):

...
<router>
<uni2flow4>
<1>
<no>
<description></description>
</no>
<no>

<identifier-value>identifier-escapeupgrade-cli</identifier-value>
</no>
<vrf>
<v1></v1>
</vrf>
<distance>
<identifier-value>identifier-escape10</identifier-value>
</distance>
<direction>
<target></target>
</direction>
<as>
<identifier-value>identifier-escape0</identifier-value>
</as>
<rate>
<identifier-value>identifier-escape0</identifier-value>
</rate>
<justadvert>
<loopback1></loopback1>
</justadvert>
<no>
<automesh></automesh>
</no>
</1>
</uni2flow4>
...

It is the <1> ... </1> tag.
I think, number are not allowed at the beginning of XML tag names.
(<uni2flow6> tags following in the response may have the same issue).

In my current stub config regarding uni2flow4, I have
...
router uni2flow4 1
vrf v1
distance 10
justadvert loopback1
exit
!
router uni2flow6 1
vrf v1
distance 10
justadvert loopback1
exit
!
...

Trying to change the "1"-s to a string starting with a letter, e.g., "u41"
fails,
as this parameter obviously is supposed to be a number:

...
info cfgInit.executeSWcommands:cfgInit.java:764 line 75: "router uni2flow4 u1" : % bad process number ...

I have no idea what is the best way to resolve this,
i.e., what to use instead as a mean to encode the uni2flow4 router process
number
in an XML-compatible way.
Maybe "int_1", "int_2", ... ? Of course this should apply to all numbers which might appear in the config returned as tags.
And I have no idea whether such encoding with prepending a fixed letter
prefix,
like "int_", for some occasions might lead to an ambiguity with
an potentially used actual string id "int_...".
In the case of router process number is probably not a problem, as these
are all supposed to be numbers and never arbitrary strings?


Best Regards
David

On Wed, 15 Feb 2023, David Schmitz wrote:

Date: Wed, 15 Feb 2023 15:15:14 +0100 (CET)
From: David Schmitz <>
Reply-To:
To: mc36 <>
Cc:
Subject: Re: [rare-dev] netconf

Hi,

ok, we are progressing.

mc36@fod:~/FOD$ sudo docker run -ti --security-opt apparmor=unconfined netconfget1 bash
You just need to run the "docker build ..." command
before the "docker run ..." command.

Now after docker + apparmor is working, it should be no problem any more.
Sorry, for having to go through all that mess.


docker.io may be interesting too, but I have no experience with it at all.

Best Regards
David

On Wed, 15 Feb 2023, mc36 wrote:

Date: Wed, 15 Feb 2023 15:00:23 +0100
From: mc36 <>
To: David Schmitz <>
Cc:
Subject: Re: [rare-dev] netconf

hi,

On 2/15/23 12:32, David Schmitz wrote:
I do not know the details of this tasksel command and the stuff behind it.

so this is what the text installer starts to install debian system, at least the same tui is what i get...

But, if it basically a wrapper around debian package system,
you may try "apt-get install apt-file"

it was that, thanks.... seemingly i have to create an account on docker.io?

thanks,
cs



mc36@fod:~/FOD$ sudo apt-file search apparmor_parser
apparmor: /sbin/apparmor_parser
apparmor: /usr/share/man/man8/apparmor_parser.8.gz
mc36@fod:~/FOD$
mc36@fod:~/FOD$ sudo apt-get install apparmor
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
apparmor-profiles-extra apparmor-utils
The following NEW packages will be installed:
apparmor
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 640 kB of archives.
After this operation, 2,615 kB of additional disk space will be used.
Get:1 http://ftp.at.debian.org/debian stable/main amd64 apparmor amd64 2.13.6-10 [640 kB]
Fetched 640 kB in 0s (8,423 kB/s)
Preconfiguring packages ...
Selecting previously unselected package apparmor.
(Reading database ... 39512 files and directories currently installed.)
Preparing to unpack .../apparmor_2.13.6-10_amd64.deb ...
Unpacking apparmor (2.13.6-10) ...
Setting up apparmor (2.13.6-10) ...
Reloading AppArmor profiles
Processing triggers for man-db (2.9.4-2) ...
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.
mc36@fod:~/FOD$
mc36@fod:~/FOD$
mc36@fod:~/FOD$
mc36@fod:~/FOD$ sudo docker run -ti --security-opt apparmor=unconfined netconfget1 bash
Unable to find image 'netconfget1:latest' locally
docker: Error response from daemon: pull access denied for netconfget1, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
mc36@fod:~/FOD$
mc36@fod:~/FOD$
mc36@fod:~/FOD$
mc36@fod:~/FOD$
mc36@fod:~/FOD$
mc36@fod:~/FOD$ sudo docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: mc36
Password:
Error response from daemon: Get "https://registry-1.docker.io/v2/": unauthorized: incorrect username or password
mc36@fod:~/FOD$
mc36@fod:~/FOD$
mc36@fod:~/FOD$






--

David Schmitz

Boltzmannstrasse 1, 85748 Garching
Telefon: +49 89 35831-8765
Leibniz-Rechenzentrum, Germany
Mail:





Archive powered by MHonArc 2.6.24.

Top of Page