The main use-case is, that there are two laptops, connected via ethernet
cable. Both receive data from the network, in my case from several RPi-s.
When there's a problem with one of the laptops, it bridges the data trough
the ethernet cable to the other one, providing redundancy. There will be
several VLAN-s on the laptops - inside the VPP instances -, each for it's
own type of job. I should also use ACL-s. Sadly none of my co-workers has
any experience with VPP, they have a lot to do with their own work and
can't deep dive into this section. I got this task as a beginner apprentice
and can't really imagine, how Python API - which they told me I should use
for this system - can help me set up the VLAN-s, the ACL-s and the
interfaces on the VPP instances running on the laptops.

For the beginning - after I had done the visibility of the VPP instances on
separate laptops via DPDK - I wanted to have python API working on a "hello
world" level, like showing the interfaces, version etc.

Thanks
Krisztian

Pim van Pelt <p...@ipng.nl> ezt írta (időpont: 2022. júl. 20., Sze, 13:30):

> Hi Krisztian,
>
> You should not ever need to create a nondebug cli (I don't even know that
> that is), and you should not be using vpp_api_test in a production
> environment.
> I'm afraid you're presenting an XY Problem [ref
> <https://en.wikipedia.org/wiki/XY_problem#:~:text=The%20XY%20problem%20is%20a,root%20problem%20itself%20(X).>].
> Why don't you specify what you are trying to accomplish (rather than which
> actions you want to take), which documents you read, which code you tried,
> and what you are expecting the outcome to be?
>
> groet,
> Pim
>
> On Wed, Jul 20, 2022 at 1:13 PM Krisztián Varga <vargakris...@gmail.com>
> wrote:
>
>> Now the import worked fine, but I'm not sure how to create a nondebug
>> cli. You mentioned, that one should use vpp_api_test, but I have no idea
>> how to use that. Should I create a new *.conf file, that has the socket
>> file api.sock? Or when I'm about to use API calls, there's no conf file
>> needed?
>>
>> Sorry for these questions, im quite new to the VPP.
>>
>> Krisztián Varga via lists.fd.io <vargakrisz07=gmail....@lists.fd.io> ezt
>> írta (időpont: 2022. júl. 20., Sze, 12:13):
>>
>>> Thank you very much for the quick answer!
>>>
>>> On Wed, Jul 20, 2022, 12:01 Pim van Pelt <p...@ipng.nl> wrote:
>>>
>>>> The doc you referenced is outdated.
>>>> https://s3-docs.fd.io/vpp/22.06/index.html rather unfortunately
>>>> doesn't mention the Python API at all. I'll see if I can add a doc with my
>>>> example there, for future readers.
>>>>
>>>> The object to instantiate is now called VPPApiClient. Please take a
>>>> look at previous posts on this mailinglist (for example this one:
>>>> https://lists.fd.io/g/vpp-dev/message/21645) for additional tips on
>>>> how to use the VPP Python API.
>>>>
>>>> groet,
>>>> Pim
>>>>
>>>> On Wed, Jul 20, 2022 at 11:01 AM Krisztián Varga <
>>>> vargakris...@gmail.com> wrote:
>>>>
>>>>> Hello Everyone,
>>>>>
>>>>> I just ran into a problem, that I cannot resolve: both on my ubuntu
>>>>> nodes (20.04 and 18.04) I have VPP installed, I've set the LD_LIBRARY_PATH
>>>>> to /usr/lib/x86_64-linux-gnu/ on the 18.04 machine, and
>>>>> /vpp/build-root/build-vpp-native/vpp/lib/x86_64-linux-gnu on the 20.04, so
>>>>> the path to libvppapiclient.so is known for the system. After this I
>>>>> did sudo python setup.py install, it worked fine on both of my nodes.
>>>>> I'm using python3.6 (and 3.8 on the newer ubuntu), importing vpp_papi
>>>>> works, however from vpp_papi import VPP doesn't want to work for me. I 
>>>>> get ImportError:
>>>>> cannot import name 'VPP' from 'vpp_papi'
>>>>> (/usr/lib/python3/dist-packages/vpp_papi/__init__.py). I tried importing
>>>>> only vpp_papi and use vpp_papi.VPP but it doesn't seem to have such
>>>>> attribute.
>>>>>
>>>>> I tried with virtualenv also. I followed this:
>>>>> https://wiki.fd.io/view/VPP/Python_API. I have python3-vpp-api
>>>>> installed. Any idea for solving this import problem?
>>>>>
>>>>> Thank you for any answers.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Pim van Pelt <p...@ipng.nl>
>>>> PBVP1-RIPE - http://www.ipng.nl/
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> --
> Pim van Pelt <p...@ipng.nl>
> PBVP1-RIPE - http://www.ipng.nl/
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21692): https://lists.fd.io/g/vpp-dev/message/21692
Mute This Topic: https://lists.fd.io/mt/92500699/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to