Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing Netalloc plugin + E2E tests #1452

Merged
merged 29 commits into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ac10847
Linux interface plugin enhancements
Aug 19, 2019
1e98644
vpp ifplugin: exclude DHCP-assigned IPs from InterfaceAddressDescriptor
Aug 19, 2019
3dac62a
Distinguish localclient from other kvdb data sources
Aug 13, 2019
9b70744
Merge remote-tracking branch 'upstream/dev' into linux-impr
Aug 21, 2019
ccfdfc5
Fix resync of EXISTING linux interfaces.
Aug 21, 2019
3620928
Netalloc plugin model and skeleton.
Aug 21, 2019
1afe7d9
Netalloc descriptor.
Aug 22, 2019
ac167bf
Finalize Netalloc plugin.
Aug 22, 2019
25592a6
Enable Netalloc features in VPP ifplugin
Aug 22, 2019
cd59abe
Prepare mock netalloc plugin for unit testing.
Aug 23, 2019
2f1110f
Enable Netalloc features in Linux ifplugin.
Aug 23, 2019
5aa7269
Example demonstrating netalloc plugin
Aug 23, 2019
27b2e84
Merge remote-tracking branch 'upstream/dev' into netalloc
Aug 23, 2019
0bd6b83
Fix netalloc documentation.
Aug 23, 2019
e1b9586
Refactor netalloc plugin.
Aug 26, 2019
262d242
Allow to use netalloc'd IP addresses in Linux ARPs
Aug 26, 2019
cc823fc
Allow to use netalloc'd IP addresses in Linux Routes.
Aug 26, 2019
bb9aa7c
Agent E2E tests
Aug 27, 2019
16fe564
Merge remote-tracking branch 'upstream/dev' into netalloc
Aug 30, 2019
59843e7
Attempt to fix travis e2e tests.
Aug 30, 2019
e309bc7
Fix netalloc documentation.
Aug 30, 2019
2e68558
Update cn-infra
Sep 2, 2019
5433109
Integrate netalloc with vpp routes.
Sep 3, 2019
97ed15d
Merge remote-tracking branch 'upstream/dev' into netalloc
Sep 3, 2019
d5e7fc6
E2E tests: run agent in a separate process
Sep 4, 2019
c9130bb
Fix E2E tests.
Sep 5, 2019
1a76f0b
E2E tests: use REST API to wait for agent to initialize
Sep 5, 2019
f59ab6e
Address review comments.
Sep 5, 2019
6e394ec
Add function to Linux ifidx to get interface by hostname.
Sep 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ stages:
- Test
- Build
- Integration
- name: E2E
if: type IN (cron) OR (type IN (push) AND branch IN (master, dev))

jobs:
include:
Expand Down Expand Up @@ -71,6 +73,17 @@ jobs:
- make verify-binapi
- make integration-tests

- stage: E2E
ondrej-fabry marked this conversation as resolved.
Show resolved Hide resolved
env: VPP_VERSION=1904
script:
- make e2e-tests
- env: VPP_VERSION=1908
script:
- make e2e-tests
- env: VPP_VERSION=1901
script:
- make e2e-tests

notifications:
slack:
rooms:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ integration-tests:
@echo "=> running integration tests"
VPP_IMG=$(VPP_IMG) ./tests/integration/vpp_integration.sh

e2e-tests:
@echo "=> running end-to-end tests"
VPP_IMG=$(VPP_IMG) ./tests/e2e/run_e2e.sh

# -------------------------------
# Code generation
# -------------------------------
Expand Down
89 changes: 50 additions & 39 deletions api/configurator/configurator.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/configurator/configurator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ option go_package = "github.com/ligato/vpp-agent/api/configurator;configurator";

import "models/vpp/vpp.proto";
import "models/linux/linux.proto";
import "models/netalloc/netalloc.proto";

// Config groups all supported config data into single message.
message Config {
vpp.ConfigData vpp_config = 1;
linux.ConfigData linux_config = 2;
netalloc.ConfigData netalloc_config = 3;
}

// Notification groups all notification data into single message.
Expand Down
49 changes: 35 additions & 14 deletions api/models/linux/interfaces/interface.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 47 additions & 18 deletions api/models/linux/interfaces/interface.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,73 @@ message Interface {
enum Type {
UNDEFINED = 0;
VETH = 1;
TAP_TO_VPP = 2; /* TAP created by VPP to have the Linux-side further configured */
TAP_TO_VPP = 2; // TAP created by VPP to have the Linux-side further configured
LOOPBACK = 3;
EXISTING = 4;
};

string name = 1; /* Logical interface name unique across all configured interfaces (mandatory) */
Type type = 2; /* Interface type (mandatory) */
// Name is mandatory field representing logical name for the interface.
// It must be unique across all configured interfaces.
string name = 1;

// Type represents the type of interface and It must match with actual Link.
Type type = 2;

// Namespace is a reference to a Linux network namespace where the interface
// should be put into.
linux.namespace.NetNamespace namespace = 3;
string host_if_name = 4; /* Name of the interface in the host OS. If not set, the host name
is the same as the interface logical name. */

// Name of the interface in the host OS. If not set, the host name will be
// the same as the interface logical name.
string host_if_name = 4;

// Enabled controls if the interface should be UP.
bool enabled = 5;
repeated string ip_addresses = 6; /* IP addresses in the format <ipAddress>/<ipPrefix> */
string phys_address = 7; /* MAC address */
uint32 mtu = 8; /* Maximum transmission unit value */

// IPAddresses define list of IP addresses for the interface and must be
// defined in the following format: <ipAddress>/<ipPrefix>.
// Interface IP address can be also allocated via netalloc plugin and
// referenced here, see: api/models/netalloc/netalloc.proto
repeated string ip_addresses = 6;

// PhysAddress represents physical address (MAC) of the interface.
// Random address will be assigned if left empty.
string phys_address = 7;

/* MTU is the maximum transmission unit value. */
uint32 mtu = 8;

oneof link {
VethLink veth = 20; /* VETH-specific configuration */
TapLink tap = 21; /* TAP_TO_VPP-specific configuration */
// VETH-specific configuration
VethLink veth = 20;

// TAP_TO_VPP-specific configuration
TapLink tap = 21;
};
bool link_only = 9; /* Configure/Resync link only.
IP/MAC addresses are expected to be configured
externally - i.e. by a different agent
or manually via CLI. */

// Configure/Resync link only. IP/MAC addresses are expected to be configured
// externally - i.e. by a different agent or manually via CLI.
bool link_only = 9;
};

message VethLink {
string peer_if_name = 1; /* Name of the VETH peer, i.e. other end of the linux veth (mandatory for VETH) */
// Name of the VETH peer, i.e. other end of the linux veth (mandatory for VETH)
string peer_if_name = 1;

enum ChecksumOffloading {
CHKSM_OFFLOAD_DEFAULT = 0;
CHKSM_OFFLOAD_ENABLED = 1;
CHKSM_OFFLOAD_DISABLED = 2;
}
ChecksumOffloading rx_checksum_offloading = 2; /* checksum offloading - Rx side (enabled by default) */
ChecksumOffloading tx_checksum_offloading = 3; /* checksum offloading - Tx side (enabled by default) */

// Checksum offloading - Rx side (enabled by default)
ChecksumOffloading rx_checksum_offloading = 2;

// Checksum offloading - Tx side (enabled by default)
ChecksumOffloading tx_checksum_offloading = 3;
};

message TapLink {
string vpp_tap_if_name = 1; /* Logical name of the VPP TAP interface (mandatory for TAP_TO_VPP) */
// Logical name of the VPP TAP interface (mandatory for TAP_TO_VPP)
string vpp_tap_if_name = 1;
};
Loading