Skip to content

Commit

Permalink
Alpine kne node for Alpine Virtual Switch (#470)
Browse files Browse the repository at this point in the history
* Add Alpine KNE node

* Add Alpine node type

* Add alpine proto

* Fix test topo

* Add name of dataplane container

* Fix pod creation

* Add alpine test topology proto

* Add unittest

* Address review comments

* Address review comments

* Address review comments

* Add Todo for constraint

* Add Todo for constraint

* Add Todo for constraint

* Fix unittest and formatting

* Fix

* Fix

* Fix

* Fix linter error

* Fix linter error
  • Loading branch information
sonikajindal authored Dec 13, 2023
1 parent 3514841 commit 47b283f
Show file tree
Hide file tree
Showing 9 changed files with 766 additions and 8 deletions.
49 changes: 49 additions & 0 deletions examples/alpine/alpine.pb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "twodut-alpine"
nodes: {
name: "alpine"
vendor: ALPINE
config: {
image: "sonic-vs:latest"
vendor_data {
[type.googleapis.com/alpine.AlpineConfig] {
containers: {
name: "dataplane"
image: "us-west1-docker.pkg.dev/openconfig-lemming/release/lucius:ga"
command: "/lucius/lucius"
args: "-alsologtostderr"
}
}
}
}
services:{
key: 22
value: {
name: "ssh"
inside: 22
}
}
}
nodes: {
name: "host"
vendor: HOST
services:{
key: 22
value: {
name: "ssh"
inside: 22
}
}
}

links: {
a_node: "alpine"
a_int: "eth1"
z_node: "host"
z_int: "eth1"
}
links: {
a_node: "alpine"
a_int: "eth2"
z_node: "host"
z_int: "eth2"
}
30 changes: 30 additions & 0 deletions proto/alpine.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";

package alpine;

option go_package = "github.com/openconfig/kne/proto/alpine";

// Alpine specific vendor data for KNE
message AlpineConfig {
repeated Container containers = 1;
}

message Container {
string name = 1;
string image = 2;
repeated string command = 3;
repeated string args = 4;
}
251 changes: 251 additions & 0 deletions proto/alpine/alpine.pb.go

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

1 change: 1 addition & 0 deletions proto/generate.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package proto

//go:generate protoc --go_out=./alpine --go_opt=paths=source_relative ./alpine.proto
//go:generate protoc --go_out=./topo --go_opt=paths=source_relative ./topo.proto
//go:generate protoc --go_out=./ceos --go_opt=paths=source_relative ./ceos.proto
//go:generate protoc --go_out=./controller --go-grpc_out=./controller --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative ./controller.proto
Expand Down
1 change: 1 addition & 0 deletions proto/topo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ enum Vendor {
GOBGP = 8;
NOKIA = 9;
OPENCONFIG = 10;
ALPINE = 11;
}

// Node is a single container inside the topology
Expand Down
Loading

0 comments on commit 47b283f

Please sign in to comment.