Comments (17)
The vpp-agent-ctl
app simply puts the model (in your case tap interface) filled with the data to the Etcd. If the vpp-agent
is running or started after this it should read the data from the Etcd or be notified about the change and execute relevant commands needed to create interface in VPP.
Here's document showing the data flow: https://github.com/ligato/vpp-agent/blob/master/docs/Deployment.md#key-value-data-store-for-nb-north-bound
from the document:
In your case you could say that:
- Control Plane APP is the
vpp-agent-ctl
- Data Store is the Etcd
- and rest is
vpp-agent
+ VPP
If you don't want to use Etcd and want to run everything in single application, you could use the Embedded deployment.
You can find several examples that use this method, for example: https://github.com/ligato/vpp-agent/blob/master/examples/localclient_vpp/plugins/main.go
from vpp-agent.
@ondrej-fabry while looking at the above example of embedded deployment,after initializing my example plugin and here while putting my initial configuration, this line
is sending me here https://github.com/ligato/vpp-agent/blob/master/clientv1/vpp/data_resync_api.go
and from there i am sending data to this
this struct in case of memif Interface.
my question is where and how from data after dumping into these structs are going?
from vpp-agent.
my question is where and how from data after dumping into these structs are going?
To be honest, I'm not really sure what you're asking here.
Just to summarize, when using embedded deployment (localclient) the data is going in the following flow:
- Created and filled model using clientv1 DSL
- Data is then committed and propagated to watchers of relevant prefixes
- VPP linux plugin is notified about new Resync Event
- Resync is processed and dispatched to relevant configurators
- Configurators then dump current state from VPP
- Dumped state from VPP is compared to northbound configuration (defined from localclient)
- All residual config (not defined in NB) is removed from VPP
- Config defined in NB and missing in VPP is then configured
Steps 5-8 are done for each configurator individually. - Resync is done when all configurators finish resync
from vpp-agent.
@ondrej-fabry if i am using key value data store (etcd) then what will be change in above steps?
in my opinion there will be changes before step 3.
step 3,4,5,6,7 and 8 will be same.
from vpp-agent.
That's correct.
from vpp-agent.
@ondrej-fabry why we write these test files ?
can i use them to send data to vpp for testing purpose without using north bound api and proto models?
from vpp-agent.
These tests are testing behaviour of vppcalls handlers and they mock VPP replies as you can see in bdTestSetup
, they create handler instance using mock channel:
from vpp-agent.
@ondrej-fabry how to run this test file ?
from vpp-agent.
$ go test -v -run 'Vpp.*BridgeDomain' ./plugins/vpp/l2plugin/vppcalls
from vpp-agent.
@ondrej-fabry as you have told me earlier that vpp-agent-ctl or every example is a plugin because we first register it with cn-infra.
my question is each plugin of vpp which you have defined here, In which files are you registering these plugins ?
from vpp-agent.
The plugins inside vpp folder are registered in plugin_impl_vpp.go
file.
vpp-agent/plugins/vpp/plugin_impl_vpp.go
Lines 300 to 320 in d2ae51e
from vpp-agent.
@ondrej-fabry when i run go test via this command
go test -v -run 'Vpp.*BridgeDomain' ./plugins/vpp/l2plugin/vppcalls
why it gives me this error?
root@60d852874a4d:~/go/src/github.com/ligato/vpp-agent# go test -v -run 'Vpp.*BridgeDomain' ./plugins/vpp/l2plugin/vppcalls
plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls.go:22:2: cannot find package "git.fd.io/govpp.git/api" in any of:
/usr/local/go/src/git.fd.io/govpp.git/api (from $GOROOT)
/go/src/git.fd.io/govpp.git/api (from $GOPATH)
plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls.go:23:2: cannot find package "github.com/ligato/cn-infra/logging" in any of:
/usr/local/go/src/github.com/ligato/cn-infra/logging (from $GOROOT)
/go/src/github.com/ligato/cn-infra/logging (from $GOPATH)
plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls.go:24:2: cannot find package "github.com/ligato/cn-infra/logging/measure" in any of:
/usr/local/go/src/github.com/ligato/cn-infra/logging/measure (from $GOROOT)
/go/src/github.com/ligato/cn-infra/logging/measure (from $GOPATH)
plugins/vpp/l2plugin/vppcalls/arp_term_vppcalls.go:25:2: cannot find package "github.com/ligato/cn-infra/utils/addrs" in any of:
/usr/local/go/src/github.com/ligato/cn-infra/utils/addrs (from $GOROOT)
/go/src/github.com/ligato/cn-infra/utils/addrs (from $GOPATH)
root@60d852874a4d:~/go/src/github.com/ligato/vpp-agent#
from vpp-agent.
Did you by any chance alter contents of vendor directory? What go version are you running?
from vpp-agent.
@ondrej-fabry i want to know that where this function is implemented?
I have asked the above question because here in point 1 you have said :
Created and filled model using clientv1 DSL.
The clientv1 DSL has no interface such as this name here.
from vpp-agent.
@zurrehma the function is implemented here. Notice that there are two folders in the clientv1 package - vpp, and linux. The vpp package contains only vpp calls, the linux package contains linux and vpp calls (a kind of extension of the vpp clientv1).
from vpp-agent.
@ondrej-fabry , suppose i have written a new plugin, and want to integrate it with clientv1/vpp.
To my understanding following will be done in case of local-client:
1: implementing interface signature here .
2: implementing above interface signature functionality here.
When this will be done and whenever this function will be invoked, after this line invocation this will now be the job of "github.com/ligato/cn-infra/db/keyval" because txn is of keyval.ProtoTxn type.
now my question are:
1: is my perceiving is right?
2: Do we have to write some code in cn-infra/db/keyval part because our txn is of that type?
from vpp-agent.
Closing as this issue is obsolete for Agent v2.
from vpp-agent.
Related Issues (20)
- CNAT plugin added HOT 1
- BUG: rest plugin return 500 /vpp/telemetry HOT 2
- Unable to start the `vpp-agent` Docker container in WSL
- kvscheduler internal graph bug HOT 4
- Deprecate clientv2 package
- Update k8s directory
- restful-api got configuration error. HOT 4
- BUG: srv6 ad failed to create ip neighbor HOT 1
- Is there any plan about supporting VPP 22.06 or 22.10? HOT 2
- How do I save my /confiuration interface configuration to etcd?
- Remove robot tests
- How to del some configuration by http ? HOT 1
- Unable to use REST plugin to configure vpp loopback interface
- Question: why telementry plugin use api sock to dump memory telemetry rather than stats.sock? HOT 2
- Question: does vpp-agent support linux-cp plugin? or how to send vpp cli commands through gRPC? HOT 2
- connect: No such file or directory HOT 1
- ligato Delivers the configuration of the linux host interface
- why (*InterfaceVppHandler).DumpInterfaces fail? HOT 3
- how to get interface status?
- Can we run the VPP Agent as part of the host process instead of container HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vpp-agent.