Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 6a1c8bf

Browse files
authored
Merge pull request #597 from WeiZhang555/cni-network-support-up
Enhance network functions
2 parents c7bc085 + 01239f9 commit 6a1c8bf

25 files changed

+758
-207
lines changed

api/descriptions.pb.go

Lines changed: 90 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/descriptions.proto

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ syntax = "proto3";
22

33
package api;
44

5+
// To generate description.pb.go, run:
6+
// $ protoc --go_out=plugins=grpc:. descriptions.proto
7+
58
message SandboxConfig {
69
string hostname = 1;
710
repeated string dns = 2;
@@ -52,13 +55,15 @@ message VolumeDescription {
5255

5356
message InterfaceDescription {
5457
string id = 1;
55-
bool lo = 2;
56-
string bridge = 3;
57-
string ip = 4;
58-
string mac = 5;
59-
string gw = 6;
60-
string tapName = 7;
61-
string options = 8;
58+
string name = 2;
59+
bool lo = 3;
60+
string bridge = 4;
61+
string ip = 5;
62+
string mac = 6;
63+
uint64 mtu = 7;
64+
string gw = 8;
65+
string tapName = 9;
66+
string options = 10;
6267
}
6368

6469
message PortDescription {

cli/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func createContainer(options runvOptions, vm *hypervisor.Vm, container, bundle,
148148
}
149149

150150
// If runv is launched via docker/containerd, we start netlistener to watch/collect network changes.
151-
// TODO: if runv is launched by cni compatible tools, the cni script can use `runv cni` cmdline to update the network.
151+
// TODO: if runv is launched by cni compatible tools, the cni script can use `runv interface` cmdline to update the network.
152152
// Create the listener process which will enters into the netns of the shim
153153
options.withContainer = state
154154
if err = startNsListener(options, vm); err != nil {

0 commit comments

Comments
 (0)