Example test is in controller/src/cat/test/basic_test.go
cd $SANDBOX
./src/contrail-api-client/generateds/generateDS.py -f -o controller/src/cat/types -g golang-api src/contrail-api-client/schema/ietf-l3vpn-schema.xsd
./src/contrail-api-client/generateds/generateDS.py -f -o controller/src/cat/types -g golang-api src/contrail-api-client/schema/bgp_schema.xsd
./src/contrail-api-client/generateds/generateDS.py -f -o controller/src/cat/types -g golang-api src/contrail-api-client/schema/vnc_cfg.xsd
Create Agent Binary:
scons contrail-vrouter-agent -uj4
Create Control-node test binary for CAT:
cd controller
NO_HEAPCHECK=1 scons -uj4 src/bgp:bgp_cat_control_node_test
Run CAT:
cd src/cat/test
../../../../third_party/go/bin/go test
- Instantiate and terminate arbitrary number of mock control-nodes
- Instantiate and terminate arbitrary number of mock agents
- Instantiate and terminate arbitrary number of CRPDs
- XMPP peering among control-nodes and agents
- BGP peering among control-nodes
- BGP peering among control-nodes and CRPDs
- Ability to add a mock port/VMI to agent (partial)
Following configuration elements can be added to the mock db file before launching control-nodes.
1 global-system-config
2 domain
3 project
4 bgp-router
5 virtual-router
6 virtual-network
7 routing-instance
8 virtual-machine
9 virtual-machine-interface
10 network-ipam
11 instance-ip
- Add support for configuration updates by mocking rabbitmq messaging At present, this can still be done by config reinit (SIGHUP) to control-nodes.
- Integration with dpdk
- Integration with a contrail-collector (Analytics) for flows and uves
etc.