
This plugin allows to create a VRF with the given name (or use the existing one if any) in the target namespace, and to allocate the interface to it. VRFs make it possible to use multiple routing tables on the same namespace and allows isolation among interfaces within the same namespace. On top of that, this allow different interfaces to have overlapping CIDRs (or even addresses). This is only useful in addition to other plugins. The configuration is pretty simple and looks like: { "type": "vrf", "vrfname": "blue" } Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
28 lines
774 B
Go
28 lines
774 B
Go
// Copyright 2020 CNI authors
|
|
//
|
|
// 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.
|
|
|
|
package main
|
|
|
|
import (
|
|
. "github.com/onsi/ginkgo"
|
|
. "github.com/onsi/gomega"
|
|
|
|
"testing"
|
|
)
|
|
|
|
func TestVRF(t *testing.T) {
|
|
RegisterFailHandler(Fail)
|
|
RunSpecs(t, "plugins/meta/vrf")
|
|
}
|