aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/nfn-agent/nfn-agent.go231
-rw-r--r--deploy/crds/k8s.plugin.opnfv.org_networks_crd.yaml121
-rw-r--r--deploy/crds/k8s.plugin.opnfv.org_providernetworks_crd.yaml157
-rw-r--r--go.mod12
-rw-r--r--go.sum30
-rw-r--r--internal/pkg/nfnNotify/proto/nfn.pb.go133
-rw-r--r--internal/pkg/nfnNotify/proto/nfn.proto8
-rw-r--r--internal/pkg/nfnNotify/server.go71
-rw-r--r--pkg/apis/k8s/v1alpha1/providernetwork_types.go9
-rw-r--r--pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go40
-rw-r--r--pkg/apis/k8s/v1alpha1/zz_generated.openapi.go167
11 files changed, 811 insertions, 168 deletions
diff --git a/cmd/nfn-agent/nfn-agent.go b/cmd/nfn-agent/nfn-agent.go
index 766e5f3..3c85dbd 100644
--- a/cmd/nfn-agent/nfn-agent.go
+++ b/cmd/nfn-agent/nfn-agent.go
@@ -56,8 +56,149 @@ func subscribeNotif(client pb.NfnNotifyClient) error {
}
}
-func handleNotif(msg *pb.Notification) {
+func createVlanProvidernetwork(payload *pb.Notification_ProviderNwCreate) error {
+ var err error
+ vlanID := payload.ProviderNwCreate.GetVlan().GetVlanId()
+ ln := payload.ProviderNwCreate.GetVlan().GetLogicalIntf()
+ pn := payload.ProviderNwCreate.GetVlan().GetProviderIntf()
+ name := payload.ProviderNwCreate.GetProviderNwName()
+ if ln == "" {
+ ln = name + "." + vlanID
+ }
+ err = ovn.CreateVlan(vlanID, pn, ln)
+ if err != nil {
+ log.Error(err, "Unable to create VLAN", "vlan", ln)
+ return err
+ }
+ err = ovn.CreatePnBridge("nw_"+name, "br-"+name, ln)
+ if err != nil {
+ log.Error(err, "Unable to create vlan direct bridge", "vlan", pn)
+ return err
+ }
+ return nil
+}
+
+func createDirectProvidernetwork(payload *pb.Notification_ProviderNwCreate) error {
var err error
+ pn := payload.ProviderNwCreate.GetDirect().GetProviderIntf()
+ name := payload.ProviderNwCreate.GetProviderNwName()
+ err = ovn.CreatePnBridge("nw_"+name, "br-"+name, pn)
+ if err != nil {
+ log.Error(err, "Unable to create direct bridge", "direct", pn)
+ return err
+ }
+ return nil
+}
+
+func deleteVlanProvidernetwork(payload *pb.Notification_ProviderNwRemove) {
+ ln := payload.ProviderNwRemove.GetVlanLogicalIntf()
+ name := payload.ProviderNwRemove.GetProviderNwName()
+ ovn.DeleteVlan(ln)
+ ovn.DeletePnBridge("nw_"+name, "br-"+name)
+}
+
+func deleteDirectProvidernetwork(payload *pb.Notification_ProviderNwRemove) {
+ ln := payload.ProviderNwRemove.GetVlanLogicalIntf()
+ name := payload.ProviderNwRemove.GetProviderNwName()
+ ovn.DeleteVlan(ln)
+ ovn.DeletePnBridge("nw_"+name, "br-"+name)
+}
+
+func inSyncVlanProvidernetwork() {
+ var err error
+ // Read config from node
+ vlanList := ovn.GetVlan()
+ pnBridgeList := ovn.GetPnBridge("nfn")
+ diffVlan := make(map[string]bool)
+ diffPnBridge := make(map[string]bool)
+VLAN:
+ for _, pn := range pnCreateStore {
+ if pn.ProviderNwCreate.GetVlan() != nil {
+ continue
+ }
+ id := pn.ProviderNwCreate.GetVlan().GetVlanId()
+ ln := pn.ProviderNwCreate.GetVlan().GetLogicalIntf()
+ pn := pn.ProviderNwCreate.GetVlan().GetProviderIntf()
+ if ln == "" {
+ ln = pn + "." + id
+ }
+ for _, vlan := range vlanList {
+ if vlan == ln {
+ // VLAN already present
+ diffVlan[vlan] = true
+ continue VLAN
+ }
+ }
+ // Vlan not found
+ err = ovn.CreateVlan(id, pn, ln)
+ if err != nil {
+ log.Error(err, "Unable to create VLAN", "vlan", ln)
+ return
+ }
+ }
+PRNETWORK:
+ for _, pn := range pnCreateStore {
+ if pn.ProviderNwCreate.GetVlan() != nil {
+ continue
+ }
+ ln := pn.ProviderNwCreate.GetVlan().GetLogicalIntf()
+ name := pn.ProviderNwCreate.GetProviderNwName()
+ for _, br := range pnBridgeList {
+ pnName := strings.Replace(br, "br-", "", -1)
+ if name == pnName {
+ diffPnBridge[br] = true
+ continue PRNETWORK
+ }
+ }
+ // Provider Network not found
+ ovn.CreatePnBridge("nw_"+name, "br-"+name, ln)
+ }
+ // Delete VLAN not in the list
+ for _, vlan := range vlanList {
+ if diffVlan[vlan] == false {
+ ovn.DeleteVlan(vlan)
+ }
+ }
+ // Delete Provider Bridge not in the list
+ for _, br := range pnBridgeList {
+ if diffPnBridge[br] == false {
+ name := strings.Replace(br, "br-", "", -1)
+ ovn.DeletePnBridge("nw_"+name, "br-"+name)
+ }
+ }
+}
+
+func inSyncDirectProvidernetwork() {
+ // Read config from node
+ pnBridgeList := ovn.GetPnBridge("nfn")
+ diffPnBridge := make(map[string]bool)
+DIRECTPRNETWORK:
+ for _, pn := range pnCreateStore {
+ if pn.ProviderNwCreate.GetDirect() != nil {
+ continue
+ }
+ pr := pn.ProviderNwCreate.GetDirect().GetProviderIntf()
+ name := pn.ProviderNwCreate.GetProviderNwName()
+ for _, br := range pnBridgeList {
+ pnName := strings.Replace(br, "br-", "", -1)
+ if name == pnName {
+ diffPnBridge[br] = true
+ continue DIRECTPRNETWORK
+ }
+ }
+ // Provider Network not found
+ ovn.CreatePnBridge("nw_"+name, "br-"+name, pr)
+ }
+ // Delete Provider Bridge not in the list
+ for _, br := range pnBridgeList {
+ if diffPnBridge[br] == false {
+ name := strings.Replace(br, "br-", "", -1)
+ ovn.DeletePnBridge("nw_"+name, "br-"+name)
+ }
+ }
+}
+
+func handleNotif(msg *pb.Notification) {
switch msg.GetCniType() {
case "ovn4nfv":
switch payload := msg.Payload.(type) {
@@ -67,84 +208,36 @@ func handleNotif(msg *pb.Notification) {
pnCreateStore = append(pnCreateStore, payload)
return
}
- vlanID := payload.ProviderNwCreate.GetVlan().GetVlanId()
- ln := payload.ProviderNwCreate.GetVlan().GetLogicalIntf()
- pn := payload.ProviderNwCreate.GetVlan().GetProviderIntf()
- name := payload.ProviderNwCreate.GetProviderNwName()
- if ln == "" {
- ln = name + "." + vlanID
+ if payload.ProviderNwCreate.GetVlan() != nil {
+ err := createVlanProvidernetwork(payload)
+ if err != nil {
+ return
+ }
}
- err = ovn.CreateVlan(vlanID, pn, ln)
- if err != nil {
- log.Error(err, "Unable to create VLAN", "vlan", ln)
- return
+
+ if payload.ProviderNwCreate.GetDirect() != nil {
+ err := createDirectProvidernetwork(payload)
+ if err != nil {
+ return
+ }
}
- ovn.CreatePnBridge("nw_"+name, "br-"+name, ln)
case *pb.Notification_ProviderNwRemove:
if !inSync {
// Unexpected Remove message
return
}
- ln := payload.ProviderNwRemove.GetVlanLogicalIntf()
- name := payload.ProviderNwRemove.GetProviderNwName()
- ovn.DeleteVlan(ln)
- ovn.DeletePnBridge("nw_"+name, "br-"+name)
- case *pb.Notification_InSync:
- // Read config from node
- vlanList := ovn.GetVlan()
- pnBridgeList := ovn.GetPnBridge("nfn")
- diffVlan := make(map[string]bool)
- diffPnBridge := make(map[string]bool)
- VLAN:
- for _, pn := range pnCreateStore {
- id := pn.ProviderNwCreate.GetVlan().GetVlanId()
- ln := pn.ProviderNwCreate.GetVlan().GetLogicalIntf()
- pn := pn.ProviderNwCreate.GetVlan().GetProviderIntf()
- if ln == "" {
- ln = pn + "." + id
- }
- for _, vlan := range vlanList {
- if vlan == ln {
- // VLAN already present
- diffVlan[vlan] = true
- continue VLAN
- }
- }
- // Vlan not found
- err = ovn.CreateVlan(id, pn, ln)
- if err != nil {
- log.Error(err, "Unable to create VLAN", "vlan", ln)
- return
- }
- }
- PRNETWORK:
- for _, pn := range pnCreateStore {
- ln := pn.ProviderNwCreate.GetVlan().GetLogicalIntf()
- name := pn.ProviderNwCreate.GetProviderNwName()
- for _, br := range pnBridgeList {
- pnName := strings.Replace(br, "br-", "", -1)
- if name == pnName {
- diffPnBridge[br] = true
- continue PRNETWORK
- }
- }
- // Provider Network not found
- ovn.CreatePnBridge("nw_"+name, "br-"+name, ln)
- }
- // Delete VLAN not in the list
- for _, vlan := range vlanList {
- if diffVlan[vlan] == false {
- ovn.DeleteVlan(vlan)
- }
+
+ if payload.ProviderNwRemove.GetVlanLogicalIntf() != "" {
+ deleteVlanProvidernetwork(payload)
}
- // Delete Provider Bridge not in the list
- for _, br := range pnBridgeList {
- if diffPnBridge[br] == false {
- name := strings.Replace(br, "br-", "", -1)
- ovn.DeletePnBridge("nw_"+name, "br-"+name)
- }
+
+ if payload.ProviderNwRemove.GetDirectProviderIntf() != "" {
+ deleteDirectProvidernetwork(payload)
}
+ case *pb.Notification_InSync:
+ inSyncVlanProvidernetwork()
+ inSyncDirectProvidernetwork()
pnCreateStore = nil
inSync = true
diff --git a/deploy/crds/k8s.plugin.opnfv.org_networks_crd.yaml b/deploy/crds/k8s.plugin.opnfv.org_networks_crd.yaml
new file mode 100644
index 0000000..a92fdda
--- /dev/null
+++ b/deploy/crds/k8s.plugin.opnfv.org_networks_crd.yaml
@@ -0,0 +1,121 @@
+apiVersion: apiextensions.k8s.io/v1beta1
+kind: CustomResourceDefinition
+metadata:
+ name: networks.k8s.plugin.opnfv.org
+spec:
+ group: k8s.plugin.opnfv.org
+ names:
+ kind: Network
+ listKind: NetworkList
+ plural: networks
+ singular: network
+ scope: Namespaced
+ subresources:
+ status: {}
+ validation:
+ openAPIV3Schema:
+ description: Network is the Schema for the networks API
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: NetworkSpec defines the desired state of Network
+ properties:
+ cniType:
+ description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
+ Important: Run "operator-sdk generate k8s" to regenerate code after
+ modifying this file Add custom validation using kubebuilder tags:
+ https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html'
+ type: string
+ dns:
+ properties:
+ domain:
+ type: string
+ nameservers:
+ items:
+ type: string
+ type: array
+ options:
+ items:
+ type: string
+ type: array
+ search:
+ items:
+ type: string
+ type: array
+ type: object
+ ipv4Subnets:
+ items:
+ properties:
+ excludeIps:
+ type: string
+ gateway:
+ type: string
+ name:
+ type: string
+ subnet:
+ type: string
+ required:
+ - name
+ - subnet
+ type: object
+ type: array
+ ipv6Subnets:
+ items:
+ properties:
+ excludeIps:
+ type: string
+ gateway:
+ type: string
+ name:
+ type: string
+ subnet:
+ type: string
+ required:
+ - name
+ - subnet
+ type: object
+ type: array
+ routes:
+ items:
+ properties:
+ dst:
+ type: string
+ gw:
+ type: string
+ required:
+ - dst
+ type: object
+ type: array
+ required:
+ - cniType
+ - ipv4Subnets
+ type: object
+ status:
+ description: NetworkStatus defines the observed state of Network
+ properties:
+ state:
+ description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
+ of cluster Important: Run "operator-sdk generate k8s" to regenerate
+ code after modifying this file Add custom validation using kubebuilder
+ tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html'
+ type: string
+ required:
+ - state
+ type: object
+ type: object
+ version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: true
diff --git a/deploy/crds/k8s.plugin.opnfv.org_providernetworks_crd.yaml b/deploy/crds/k8s.plugin.opnfv.org_providernetworks_crd.yaml
new file mode 100644
index 0000000..fa058ff
--- /dev/null
+++ b/deploy/crds/k8s.plugin.opnfv.org_providernetworks_crd.yaml
@@ -0,0 +1,157 @@
+apiVersion: apiextensions.k8s.io/v1beta1
+kind: CustomResourceDefinition
+metadata:
+ name: providernetworks.k8s.plugin.opnfv.org
+spec:
+ group: k8s.plugin.opnfv.org
+ names:
+ kind: ProviderNetwork
+ listKind: ProviderNetworkList
+ plural: providernetworks
+ singular: providernetwork
+ scope: Namespaced
+ subresources:
+ status: {}
+ validation:
+ openAPIV3Schema:
+ description: ProviderNetwork is the Schema for the providernetworks API
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: ProviderNetworkSpec defines the desired state of ProviderNetwork
+ properties:
+ cniType:
+ description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
+ Important: Run "operator-sdk generate k8s" to regenerate code after
+ modifying this file Add custom validation using kubebuilder tags:
+ https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html'
+ type: string
+ direct:
+ properties:
+ directNodeSelector:
+ type: string
+ nodeLabelList:
+ items:
+ type: string
+ type: array
+ providerInterfaceName:
+ type: string
+ required:
+ - directNodeSelector
+ - providerInterfaceName
+ type: object
+ dns:
+ properties:
+ domain:
+ type: string
+ nameservers:
+ items:
+ type: string
+ type: array
+ options:
+ items:
+ type: string
+ type: array
+ search:
+ items:
+ type: string
+ type: array
+ type: object
+ ipv4Subnets:
+ items:
+ properties:
+ excludeIps:
+ type: string
+ gateway:
+ type: string
+ name:
+ type: string
+ subnet:
+ type: string
+ required:
+ - name
+ - subnet
+ type: object
+ type: array
+ ipv6Subnets:
+ items:
+ properties:
+ excludeIps:
+ type: string
+ gateway:
+ type: string
+ name:
+ type: string
+ subnet:
+ type: string
+ required:
+ - name
+ - subnet
+ type: object
+ type: array
+ providerNetType:
+ type: string
+ routes:
+ items:
+ properties:
+ dst:
+ type: string
+ gw:
+ type: string
+ required:
+ - dst
+ type: object
+ type: array
+ vlan:
+ properties:
+ logicalInterfaceName:
+ type: string
+ nodeLabelList:
+ items:
+ type: string
+ type: array
+ providerInterfaceName:
+ type: string
+ vlanId:
+ type: string
+ vlanNodeSelector:
+ type: string
+ required:
+ - providerInterfaceName
+ - vlanId
+ - vlanNodeSelector
+ type: object
+ required:
+ - cniType
+ - ipv4Subnets
+ - providerNetType
+ type: object
+ status:
+ description: ProviderNetworkStatus defines the observed state of ProviderNetwork
+ properties:
+ state:
+ description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
+ of cluster Important: Run "operator-sdk generate k8s" to regenerate
+ code after modifying this file Add custom validation using kubebuilder
+ tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html'
+ type: string
+ required:
+ - state
+ type: object
+ type: object
+ version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: true
diff --git a/go.mod b/go.mod
index ec9c202..d98f1e5 100644
--- a/go.mod
+++ b/go.mod
@@ -14,11 +14,11 @@ require (
github.com/emicklei/go-restful v2.11.1+incompatible // indirect
github.com/fogleman/gg v1.3.0 // indirect
github.com/go-logr/logr v0.1.0
- github.com/go-openapi/spec v0.19.5 // indirect
+ github.com/go-openapi/spec v0.19.5
github.com/go-openapi/swag v0.19.6 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 // indirect
- github.com/golang/protobuf v1.3.2
+ github.com/golang/protobuf v1.3.5
github.com/google/btree v1.0.0 // indirect
github.com/google/go-cmp v0.3.1 // indirect
github.com/gophercloud/gophercloud v0.2.0 // indirect
@@ -48,24 +48,26 @@ require (
golang.org/x/image v0.0.0-20191214001246-9130b4cfad52 // indirect
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 // indirect
golang.org/x/mobile v0.0.0-20191210151939-1a1fef82734d // indirect
- golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
- golang.org/x/sys v0.0.0-20191224085550-c709ea063b76 // indirect
+ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4 // indirect
golang.org/x/tools/gopls v0.1.3 // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
gonum.org/v1/gonum v0.6.2 // indirect
gonum.org/v1/netlib v0.0.0-20191031114514-eccb95939662 // indirect
gonum.org/v1/plot v0.0.0-20191107103940-ca91d9d40d0a // indirect
- google.golang.org/grpc v1.23.0
+ google.golang.org/genproto v0.0.0-20200325114520-5b2d0af7952b // indirect
+ google.golang.org/grpc v1.28.0
gopkg.in/gcfg.v1 v1.2.3
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.2.7 // indirect
+ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc // indirect
k8s.io/api v0.0.0-20190918155943-95b840bb6a1f
k8s.io/apimachinery v0.17.0
//k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
k8s.io/code-generator v0.17.0 // indirect
k8s.io/gengo v0.0.0-20191120174120-e74f70b9b27e // indirect
+ k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a
k8s.io/utils v0.0.0-20190801114015-581e00157fb1
sigs.k8s.io/controller-runtime v0.2.0-beta.4
sigs.k8s.io/controller-tools v0.1.10
diff --git a/go.sum b/go.sum
index d4c9bfd..ee74113 100644
--- a/go.sum
+++ b/go.sum
@@ -80,8 +80,10 @@ github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4=
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/containernetworking/cni v0.7.1 h1:fE3r16wpSEyaqY4Z4oFrLMmIGfBYIKpPrHK31EJ9FzE=
github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
github.com/containernetworking/plugins v0.8.1 h1:dJbykiiSIS3Xvo8d+A6rSXcUEFGfvCjUA+bUED4qegQ=
@@ -141,8 +143,13 @@ github.com/emicklei/go-restful v2.8.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT
github.com/emicklei/go-restful v2.9.3+incompatible h1:2OwhVdhtzYUp5P5wuGsVDPagKSRd9JK72sJCHVCXh5g=
github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+github.com/emicklei/go-restful v2.11.1+incompatible h1:CjKsv3uWcCMvySPQYKxO8XX3f9zD4FeZRsW4G0B4ffE=
github.com/emicklei/go-restful v2.11.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ=
+github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
@@ -186,6 +193,7 @@ github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwds
github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8=
github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
+github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9 h1:tF+augKRWlWx0J0B7ZyyKSiTyV6E1zZe+7b3qQlcEf8=
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
@@ -194,6 +202,7 @@ github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3Hfo
github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk=
github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
+github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o=
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
@@ -210,6 +219,7 @@ github.com/go-openapi/spec v0.19.0 h1:A4SZ6IWh3lnjH0rG0Z5lkxazMGBECtrZcbyYQi+64k
github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
+github.com/go-openapi/spec v0.19.5 h1:Xm0Ao53uqnk9QE/LlYV5DEU09UAgpliA85QoT9LzqPw=
github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
@@ -223,6 +233,7 @@ github.com/go-openapi/swag v0.19.0 h1:Kg7Wl7LkTPlmc393QZQ/5rQadPhi7pBVEMZxyTi0Ii
github.com/go-openapi/swag v0.19.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-openapi/swag v0.19.6 h1:JSUbVWlaTLMhXeOMyArSUNCdroxZu2j1TcrsOV8Mj7Q=
github.com/go-openapi/swag v0.19.6/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY=
github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
@@ -266,6 +277,9 @@ github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls=
+github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
@@ -385,6 +399,7 @@ github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983 h1:wL11wNW7dhKIcRC
github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM=
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs=
github.com/martinlindhe/base36 v0.0.0-20180729042928-5cda0030da17/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8=
@@ -474,6 +489,8 @@ github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f h1:BVwpUVJ
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e h1:n/3MEhJQjQxrOUCzh1Y3Re6aJUUWRp2M9+Oc3eVn/54=
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
@@ -661,6 +678,8 @@ golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
+golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -714,6 +733,8 @@ golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76 h1:Dho5nD6R3PcW2SH1or8vS0dszDaXRxIw55lBX7XiE5g=
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -804,6 +825,10 @@ google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRn
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20200325114520-5b2d0af7952b h1:j5eujPLMak6H9l2EM381rW9X47/HPUyESXWJW9lVSsQ=
+google.golang.org/genproto v0.0.0-20200325114520-5b2d0af7952b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
@@ -812,6 +837,11 @@ google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM=
google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
+google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4=
+google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/internal/pkg/nfnNotify/proto/nfn.pb.go b/internal/pkg/nfnNotify/proto/nfn.pb.go
index 7f9a182..d419af8 100644
--- a/internal/pkg/nfnNotify/proto/nfn.pb.go
+++ b/internal/pkg/nfnNotify/proto/nfn.pb.go
@@ -167,11 +167,12 @@ func (*Notification) XXX_OneofWrappers() []interface{} {
}
type ProviderNetworkCreate struct {
- ProviderNwName string `protobuf:"bytes,1,opt,name=provider_nw_name,json=providerNwName,proto3" json:"provider_nw_name,omitempty"`
- Vlan *VlanInfo `protobuf:"bytes,2,opt,name=vlan,proto3" json:"vlan,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ ProviderNwName string `protobuf:"bytes,1,opt,name=provider_nw_name,json=providerNwName,proto3" json:"provider_nw_name,omitempty"`
+ Vlan *VlanInfo `protobuf:"bytes,2,opt,name=vlan,proto3" json:"vlan,omitempty"`
+ Direct *DirectInfo `protobuf:"bytes,3,opt,name=direct,proto3" json:"direct,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *ProviderNetworkCreate) Reset() { *m = ProviderNetworkCreate{} }
@@ -213,9 +214,17 @@ func (m *ProviderNetworkCreate) GetVlan() *VlanInfo {
return nil
}
+func (m *ProviderNetworkCreate) GetDirect() *DirectInfo {
+ if m != nil {
+ return m.Direct
+ }
+ return nil
+}
+
type ProviderNetworkRemove struct {
ProviderNwName string `protobuf:"bytes,1,opt,name=provider_nw_name,json=providerNwName,proto3" json:"provider_nw_name,omitempty"`
VlanLogicalIntf string `protobuf:"bytes,2,opt,name=vlan_logical_intf,json=vlanLogicalIntf,proto3" json:"vlan_logical_intf,omitempty"`
+ DirectProviderIntf string `protobuf:"bytes,3,opt,name=direct_provider_intf,json=directProviderIntf,proto3" json:"direct_provider_intf,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -260,6 +269,13 @@ func (m *ProviderNetworkRemove) GetVlanLogicalIntf() string {
return ""
}
+func (m *ProviderNetworkRemove) GetDirectProviderIntf() string {
+ if m != nil {
+ return m.DirectProviderIntf
+ }
+ return ""
+}
+
type VlanInfo struct {
VlanId string `protobuf:"bytes,1,opt,name=vlan_id,json=vlanId,proto3" json:"vlan_id,omitempty"`
ProviderIntf string `protobuf:"bytes,2,opt,name=provider_intf,json=providerIntf,proto3" json:"provider_intf,omitempty"`
@@ -315,6 +331,45 @@ func (m *VlanInfo) GetLogicalIntf() string {
return ""
}
+type DirectInfo struct {
+ ProviderIntf string `protobuf:"bytes,1,opt,name=provider_intf,json=providerIntf,proto3" json:"provider_intf,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *DirectInfo) Reset() { *m = DirectInfo{} }
+func (m *DirectInfo) String() string { return proto.CompactTextString(m) }
+func (*DirectInfo) ProtoMessage() {}
+func (*DirectInfo) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5b809db4a7814953, []int{5}
+}
+
+func (m *DirectInfo) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DirectInfo.Unmarshal(m, b)
+}
+func (m *DirectInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DirectInfo.Marshal(b, m, deterministic)
+}
+func (m *DirectInfo) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DirectInfo.Merge(m, src)
+}
+func (m *DirectInfo) XXX_Size() int {
+ return xxx_messageInfo_DirectInfo.Size(m)
+}
+func (m *DirectInfo) XXX_DiscardUnknown() {
+ xxx_messageInfo_DirectInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DirectInfo proto.InternalMessageInfo
+
+func (m *DirectInfo) GetProviderIntf() string {
+ if m != nil {
+ return m.ProviderIntf
+ }
+ return ""
+}
+
type InSync struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -325,7 +380,7 @@ func (m *InSync) Reset() { *m = InSync{} }
func (m *InSync) String() string { return proto.CompactTextString(m) }
func (*InSync) ProtoMessage() {}
func (*InSync) Descriptor() ([]byte, []int) {
- return fileDescriptor_5b809db4a7814953, []int{5}
+ return fileDescriptor_5b809db4a7814953, []int{6}
}
func (m *InSync) XXX_Unmarshal(b []byte) error {
@@ -352,46 +407,52 @@ func init() {
proto.RegisterType((*ProviderNetworkCreate)(nil), "ProviderNetworkCreate")
proto.RegisterType((*ProviderNetworkRemove)(nil), "ProviderNetworkRemove")
proto.RegisterType((*VlanInfo)(nil), "VlanInfo")
+ proto.RegisterType((*DirectInfo)(nil), "DirectInfo")
proto.RegisterType((*InSync)(nil), "InSync")
}
-func init() { proto.RegisterFile("nfn.proto", fileDescriptor_5b809db4a7814953) }
+func init() {
+ proto.RegisterFile("nfn.proto", fileDescriptor_5b809db4a7814953)
+}
var fileDescriptor_5b809db4a7814953 = []byte{
- // 380 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x4f, 0xaf, 0xd2, 0x40,
- 0x14, 0xc5, 0xa9, 0x90, 0xfe, 0xb9, 0x80, 0xc2, 0x24, 0x6a, 0xd5, 0x98, 0x60, 0xdd, 0x10, 0x17,
- 0xc5, 0xe0, 0xd6, 0x95, 0x24, 0x86, 0x26, 0xa6, 0x31, 0xc5, 0xb8, 0xad, 0xc3, 0x74, 0x6a, 0x26,
- 0xb4, 0x77, 0x9a, 0x32, 0x82, 0xfd, 0xc6, 0xef, 0x63, 0xbc, 0x74, 0x4a, 0x79, 0x85, 0xc7, 0xe6,
- 0xed, 0xda, 0x73, 0xee, 0x9c, 0xdf, 0xf4, 0xf6, 0x80, 0x83, 0x29, 0xfa, 0x45, 0x29, 0x95, 0xf4,
- 0x16, 0x30, 0xd9, 0xfc, 0xdb, 0xee, 0x59, 0x29, 0xb6, 0x7c, 0x25, 0x51, 0xf1, 0xff, 0x8a, 0xbc,
- 0x03, 0x07, 0x65, 0xc2, 0x63, 0xa4, 0x39, 0x77, 0x8d, 0x99, 0x31, 0x77, 0x22, 0xbb, 0x16, 0x42,
- 0x9a, 0x73, 0xef, 0xce, 0x80, 0x51, 0x28, 0x95, 0x48, 0x05, 0xa3, 0x4a, 0x48, 0x24, 0x6f, 0xc0,
- 0x66, 0x28, 0x62, 0x55, 0x15, 0xed, 0xb0, 0xc5, 0x50, 0xfc, 0xaa, 0x0a, 0x4e, 0x3c, 0xb0, 0x04,
- 0xc6, 0xfb, 0x0a, 0x99, 0xfb, 0x6c, 0x66, 0xcc, 0x87, 0x4b, 0xcb, 0x0f, 0x70, 0x53, 0x21, 0x5b,
- 0xf7, 0x22, 0x53, 0xe8, 0x27, 0xf2, 0x1d, 0x48, 0x51, 0xca, 0x83, 0x48, 0x78, 0x19, 0xe3, 0x31,
- 0x66, 0x25, 0xa7, 0x8a, 0xbb, 0x7d, 0x3d, 0xfe, 0xca, 0xff, 0x79, 0xb2, 0x42, 0xae, 0x8e, 0xb2,
- 0xdc, 0xad, 0xb4, 0xbb, 0xee, 0x45, 0x93, 0xf6, 0x4c, 0x78, 0x6c, 0xb4, 0xeb, 0x9c, 0x92, 0xe7,
- 0xf2, 0xc0, 0xdd, 0xc1, 0xed, 0x9c, 0x48, 0xbb, 0x97, 0x39, 0x8d, 0xf6, 0xcd, 0x01, 0xab, 0xa0,
- 0x55, 0x26, 0x69, 0xe2, 0xfd, 0x81, 0x97, 0x37, 0xf9, 0x64, 0x0e, 0x93, 0x2e, 0xab, 0xb3, 0xa7,
- 0xe7, 0x0f, 0x79, 0xf5, 0xb6, 0xc8, 0x7b, 0x18, 0x1c, 0x32, 0x8a, 0xa7, 0xcf, 0x77, 0xfc, 0xdf,
- 0x19, 0xc5, 0x00, 0x53, 0x19, 0x69, 0xd9, 0xcb, 0x1f, 0x11, 0x9a, 0x5b, 0x3c, 0x81, 0xf0, 0x09,
- 0xa6, 0x75, 0x54, 0x9c, 0xc9, 0xbf, 0x82, 0xd1, 0x2c, 0x16, 0xa8, 0x52, 0x8d, 0x73, 0xa2, 0x17,
- 0xb5, 0xf1, 0xa3, 0xd1, 0x03, 0x54, 0xa9, 0xb7, 0x03, 0xbb, 0xbd, 0x00, 0x79, 0x0d, 0x96, 0x3e,
- 0x27, 0x92, 0x53, 0xb0, 0x59, 0xbf, 0x06, 0x09, 0xf9, 0x08, 0xe3, 0x33, 0xba, 0x13, 0x36, 0x6a,
- 0xc5, 0x3a, 0x89, 0x7c, 0x80, 0xd1, 0x05, 0xb0, 0xaf, 0x67, 0x86, 0x59, 0x07, 0x66, 0x83, 0xd9,
- 0xfc, 0xec, 0xe5, 0x57, 0x5d, 0x38, 0x5d, 0x9a, 0x8a, 0x2c, 0xc0, 0x39, 0x17, 0x8e, 0x4c, 0xfd,
- 0xeb, 0xf2, 0xbd, 0x1d, 0xfb, 0xdd, 0x76, 0x7d, 0x36, 0xb6, 0xa6, 0x2e, 0xea, 0x97, 0xfb, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0xa6, 0xd9, 0x3e, 0x9e, 0xb5, 0x02, 0x00, 0x00,
+ // 431 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x5d, 0x6f, 0xd3, 0x30,
+ 0x14, 0x5d, 0xd8, 0x94, 0x34, 0xb7, 0x1d, 0x74, 0x16, 0x1f, 0x05, 0x84, 0x34, 0xbc, 0x97, 0x8a,
+ 0x87, 0x6c, 0x8c, 0x57, 0x9e, 0x18, 0x42, 0x8b, 0x84, 0x22, 0x94, 0x21, 0x5e, 0x2d, 0xd7, 0x71,
+ 0x90, 0xb5, 0xf4, 0x3a, 0xf2, 0x4c, 0x4b, 0x7e, 0x00, 0xbf, 0x83, 0xbf, 0xc7, 0xcf, 0x40, 0xb1,
+ 0x93, 0x35, 0x5d, 0xf7, 0xb2, 0x37, 0xfb, 0x9e, 0xeb, 0x73, 0xce, 0xbd, 0x3a, 0x86, 0x18, 0x4b,
+ 0x4c, 0x6a, 0xa3, 0xad, 0xa6, 0xa7, 0x30, 0xbd, 0xfa, 0xb5, 0xb8, 0x11, 0x46, 0x2d, 0xe4, 0x85,
+ 0x46, 0x2b, 0x7f, 0x5b, 0xf2, 0x1a, 0x62, 0xd4, 0x85, 0x64, 0xc8, 0x97, 0x72, 0x16, 0x1c, 0x07,
+ 0xf3, 0x38, 0x1f, 0xb5, 0x85, 0x8c, 0x2f, 0x25, 0xfd, 0x17, 0xc0, 0x24, 0xd3, 0x56, 0x95, 0x4a,
+ 0x70, 0xab, 0x34, 0x92, 0x97, 0x30, 0x12, 0xa8, 0x98, 0x6d, 0xea, 0xbe, 0x39, 0x12, 0xa8, 0xbe,
+ 0x37, 0xb5, 0x24, 0x14, 0x22, 0x85, 0xec, 0xa6, 0x41, 0x31, 0x7b, 0x74, 0x1c, 0xcc, 0xc7, 0xe7,
+ 0x51, 0x92, 0xe2, 0x55, 0x83, 0xe2, 0x72, 0x2f, 0x0f, 0x95, 0x3b, 0x91, 0x2f, 0x40, 0x6a, 0xa3,
+ 0x57, 0xaa, 0x90, 0x86, 0xe1, 0x9a, 0x09, 0x23, 0xb9, 0x95, 0xb3, 0x7d, 0xd7, 0xfe, 0x3c, 0xf9,
+ 0xd6, 0x41, 0x99, 0xb4, 0x6b, 0x6d, 0xae, 0x2f, 0x1c, 0x7a, 0xb9, 0x97, 0x4f, 0xfb, 0x37, 0xd9,
+ 0xda, 0xd7, 0xee, 0xf2, 0x18, 0xb9, 0xd4, 0x2b, 0x39, 0x3b, 0xb8, 0x9f, 0x27, 0x77, 0xe8, 0x36,
+ 0x8f, 0xaf, 0x7d, 0x8a, 0x21, 0xaa, 0x79, 0x53, 0x69, 0x5e, 0xd0, 0x3f, 0x01, 0x3c, 0xbb, 0xd7,
+ 0x00, 0x99, 0xc3, 0x74, 0x28, 0x36, 0x58, 0xd4, 0xe3, 0x0d, 0x61, 0xbb, 0x2e, 0xf2, 0x06, 0x0e,
+ 0x56, 0x15, 0xc7, 0x6e, 0xfe, 0x38, 0xf9, 0x51, 0x71, 0x4c, 0xb1, 0xd4, 0xb9, 0x2b, 0x93, 0x13,
+ 0x08, 0x0b, 0x65, 0xa4, 0xb0, 0xdd, 0xc4, 0xe3, 0xe4, 0xb3, 0xbb, 0xba, 0x96, 0x0e, 0xa2, 0x7f,
+ 0x77, 0x7d, 0x78, 0xb3, 0x0f, 0xf0, 0xf1, 0x0e, 0x8e, 0x5a, 0x41, 0x56, 0xe9, 0x9f, 0x4a, 0xf0,
+ 0x8a, 0x29, 0xb4, 0xa5, 0x33, 0x15, 0xe7, 0x4f, 0x5a, 0xe0, 0xab, 0xaf, 0xa7, 0x68, 0x4b, 0x72,
+ 0x06, 0x4f, 0xbd, 0x32, 0xbb, 0x25, 0x77, 0xed, 0xfb, 0xae, 0x9d, 0x78, 0xac, 0x37, 0xd4, 0xbe,
+ 0xa0, 0xd7, 0x30, 0xea, 0x07, 0x23, 0x2f, 0x20, 0x72, 0x4a, 0xaa, 0xe8, 0xac, 0x84, 0xed, 0x35,
+ 0x2d, 0xc8, 0x09, 0x1c, 0x6e, 0xf3, 0x79, 0xf9, 0x49, 0x3d, 0x60, 0x22, 0x6f, 0x61, 0xb2, 0x65,
+ 0xd1, 0x6b, 0x8e, 0xab, 0x8d, 0x3d, 0xfa, 0x1e, 0x60, 0xb3, 0xa4, 0x5d, 0xd6, 0x60, 0x97, 0x95,
+ 0x8e, 0x20, 0xf4, 0xc1, 0x3b, 0xff, 0xe8, 0xc2, 0xef, 0x02, 0xdc, 0x90, 0x53, 0x88, 0x6f, 0xc3,
+ 0x4f, 0x8e, 0x92, 0xbb, 0x1f, 0xe1, 0xd5, 0x61, 0x32, 0x4c, 0xfa, 0x59, 0xb0, 0x08, 0xdd, 0xa7,
+ 0xf9, 0xf0, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x24, 0xa2, 0x9f, 0x85, 0x41, 0x03, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
-var _ grpc.ClientConn
+var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion4
+const _ = grpc.SupportPackageIsVersion6
// NfnNotifyClient is the client API for NfnNotify service.
//
@@ -401,10 +462,10 @@ type NfnNotifyClient interface {
}
type nfnNotifyClient struct {
- cc *grpc.ClientConn
+ cc grpc.ClientConnInterface
}
-func NewNfnNotifyClient(cc *grpc.ClientConn) NfnNotifyClient {
+func NewNfnNotifyClient(cc grpc.ClientConnInterface) NfnNotifyClient {
return &nfnNotifyClient{cc}
}
diff --git a/internal/pkg/nfnNotify/proto/nfn.proto b/internal/pkg/nfnNotify/proto/nfn.proto
index 85e2131..02855e7 100644
--- a/internal/pkg/nfnNotify/proto/nfn.proto
+++ b/internal/pkg/nfnNotify/proto/nfn.proto
@@ -25,12 +25,14 @@ message Notification {
message ProviderNetworkCreate {
string provider_nw_name = 1;
VlanInfo vlan = 2;
+ DirectInfo direct =3;
// Add other types supported here beyond vlan
}
message ProviderNetworkRemove {
string provider_nw_name = 1;
string vlan_logical_intf = 2;
+ string direct_provider_intf = 3;
// Add other types supported here
}
@@ -40,5 +42,9 @@ message VlanInfo {
string logical_intf = 3;
}
+message DirectInfo {
+ string provider_intf = 1;
+}
+
message InSync {
-} \ No newline at end of file
+}
diff --git a/internal/pkg/nfnNotify/server.go b/internal/pkg/nfnNotify/server.go
index 6ec4a98..ac22d68 100644
--- a/internal/pkg/nfnNotify/server.go
+++ b/internal/pkg/nfnNotify/server.go
@@ -2,17 +2,18 @@ package nfn
import (
"fmt"
- "google.golang.org/grpc"
- "google.golang.org/grpc/reflection"
"net"
pb "ovn4nfv-k8s-plugin/internal/pkg/nfnNotify/proto"
v1alpha1 "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1"
- logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
+ clientset "ovn4nfv-k8s-plugin/pkg/generated/clientset/versioned"
"strings"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/reflection"
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
- clientset "ovn4nfv-k8s-plugin/pkg/generated/clientset/versioned"
+ logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
)
var log = logf.Log.WithName("rpc-server")
@@ -90,7 +91,7 @@ func updatePnStatus(pn *v1alpha1.ProviderNetwork, status string) error {
return err
}
-func createMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
+func createVlanMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
msg := pb.Notification{
CniType: "ovn4nfv",
Payload: &pb.Notification_ProviderNwCreate{
@@ -107,7 +108,7 @@ func createMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
return msg
}
-func deleteMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
+func deleteVlanMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
msg := pb.Notification{
CniType: "ovn4nfv",
Payload: &pb.Notification_ProviderNwRemove{
@@ -120,6 +121,34 @@ func deleteMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
return msg
}
+func createDirectMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
+ msg := pb.Notification{
+ CniType: "ovn4nfv",
+ Payload: &pb.Notification_ProviderNwCreate{
+ ProviderNwCreate: &pb.ProviderNetworkCreate{
+ ProviderNwName: pn.Name,
+ Direct: &pb.DirectInfo{
+ ProviderIntf: pn.Spec.Direct.ProviderInterfaceName,
+ },
+ },
+ },
+ }
+ return msg
+}
+
+func deleteDirectMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
+ msg := pb.Notification{
+ CniType: "ovn4nfv",
+ Payload: &pb.Notification_ProviderNwRemove{
+ ProviderNwRemove: &pb.ProviderNetworkRemove{
+ ProviderNwName: pn.Name,
+ DirectProviderIntf: pn.Spec.Direct.ProviderInterfaceName,
+ },
+ },
+ }
+ return msg
+}
+
//SendNotif to client
func SendNotif(pn *v1alpha1.ProviderNetwork, msgType string, nodeReq string) error {
var msg pb.Notification
@@ -130,9 +159,9 @@ func SendNotif(pn *v1alpha1.ProviderNetwork, msgType string, nodeReq string) err
switch {
case pn.Spec.ProviderNetType == "VLAN":
if msgType == "create" {
- msg = createMsg(pn)
+ msg = createVlanMsg(pn)
} else if msgType == "delete" {
- msg = deleteMsg(pn)
+ msg = deleteVlanMsg(pn)
}
if strings.EqualFold(pn.Spec.Vlan.VlanNodeSelector, "SPECIFIC") {
for _, label := range pn.Spec.Vlan.NodeLabelList {
@@ -154,6 +183,32 @@ func SendNotif(pn *v1alpha1.ProviderNetwork, msgType string, nodeReq string) err
}
}
}
+ case pn.Spec.ProviderNetType == "DIRECT":
+ if msgType == "create" {
+ msg = createDirectMsg(pn)
+ } else if msgType == "delete" {
+ msg = deleteDirectMsg(pn)
+ }
+ if strings.EqualFold(pn.Spec.Direct.DirectNodeSelector, "SPECIFIC") {
+ for _, label := range pn.Spec.Direct.NodeLabelList {
+ l := strings.Split(label, "=")
+ if len(l) == 0 {
+ log.Error(fmt.Errorf("Syntax error label: %v", label), "NodeListIterator")
+ return nil
+ }
+ }
+ labels := strings.Join(pn.Spec.Direct.NodeLabelList[:], ",")
+ err = sendMsg(msg, labels, "specific", nodeReq)
+ } else if strings.EqualFold(pn.Spec.Direct.DirectNodeSelector, "ALL") {
+ err = sendMsg(msg, "", "all", nodeReq)
+ } else if strings.EqualFold(pn.Spec.Direct.DirectNodeSelector, "ANY") {
+ if pn.Status.State != v1alpha1.Created {
+ err = sendMsg(msg, "", "any", nodeReq)
+ if err == nil {
+ updatePnStatus(pn, v1alpha1.Created)
+ }
+ }
+ }
default:
return fmt.Errorf("Unsupported Provider Network type")
}
diff --git a/pkg/apis/k8s/v1alpha1/providernetwork_types.go b/pkg/apis/k8s/v1alpha1/providernetwork_types.go
index 573a107..e404575 100644
--- a/pkg/apis/k8s/v1alpha1/providernetwork_types.go
+++ b/pkg/apis/k8s/v1alpha1/providernetwork_types.go
@@ -19,7 +19,8 @@ type ProviderNetworkSpec struct {
DNS DnsSpec `json:"dns,omitempty"`
Routes []Route `json:"routes,omitempty"`
ProviderNetType string `json:"providerNetType"`
- Vlan VlanSpec `json:"vlan"` // For now VLAN is the only supported type
+ Vlan VlanSpec `json:"vlan,omitempty"` // For now VLAN & Direct only supported type
+ Direct DirectSpec `json:"direct,omitempty"`
}
type VlanSpec struct {
@@ -30,6 +31,12 @@ type VlanSpec struct {
LogicalInterfaceName string `json:"logicalInterfaceName,omitempty"`
}
+type DirectSpec struct {
+ DirectNodeSelector string `json:"directNodeSelector"` // "all"/"any"(in which case a node will be randomly selected)/"specific"(see below)
+ NodeLabelList []string `json:"nodeLabelList,omitempty"` // if DirectNodeSelector is value "specific" then this array provides a list of nodes labels
+ ProviderInterfaceName string `json:"providerInterfaceName"`
+}
+
// ProviderNetworkStatus defines the observed state of ProviderNetwork
// +k8s:openapi-gen=true
type ProviderNetworkStatus struct {
diff --git a/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go
index cf716cd..49cc157 100644
--- a/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go
@@ -1,22 +1,6 @@
// +build !ignore_autogenerated
-/*
-Copyright The Kubernetes 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.
-*/
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
+// Code generated by operator-sdk. DO NOT EDIT.
package v1alpha1
@@ -25,6 +9,27 @@ import (
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DirectSpec) DeepCopyInto(out *DirectSpec) {
+ *out = *in
+ if in.NodeLabelList != nil {
+ in, out := &in.NodeLabelList, &out.NodeLabelList
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectSpec.
+func (in *DirectSpec) DeepCopy() *DirectSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(DirectSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DnsSpec) DeepCopyInto(out *DnsSpec) {
*out = *in
if in.Nameservers != nil {
@@ -355,6 +360,7 @@ func (in *ProviderNetworkSpec) DeepCopyInto(out *ProviderNetworkSpec) {
copy(*out, *in)
}
in.Vlan.DeepCopyInto(&out.Vlan)
+ in.Direct.DeepCopyInto(&out.Direct)
return
}
diff --git a/pkg/apis/k8s/v1alpha1/zz_generated.openapi.go b/pkg/apis/k8s/v1alpha1/zz_generated.openapi.go
index 7343285..6e4ef6c 100644
--- a/pkg/apis/k8s/v1alpha1/zz_generated.openapi.go
+++ b/pkg/apis/k8s/v1alpha1/zz_generated.openapi.go
@@ -1,4 +1,4 @@
-// +build !
+// +build !ignore_autogenerated
// This file was autogenerated by openapi-gen. Do not edit it manually!
@@ -11,12 +11,15 @@ import (
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
return map[string]common.OpenAPIDefinition{
- "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.Network": schema_pkg_apis_k8s_v1alpha1_Network(ref),
- "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.NetworkSpec": schema_pkg_apis_k8s_v1alpha1_NetworkSpec(ref),
- "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.NetworkStatus": schema_pkg_apis_k8s_v1alpha1_NetworkStatus(ref),
- "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.ProviderNetwork": schema_pkg_apis_k8s_v1alpha1_ProviderNetwork(ref),
- "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.ProviderNetworkSpec": schema_pkg_apis_k8s_v1alpha1_ProviderNetworkSpec(ref),
- "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.ProviderNetworkStatus": schema_pkg_apis_k8s_v1alpha1_ProviderNetworkStatus(ref),
+ "./pkg/apis/k8s/v1alpha1.Network": schema_pkg_apis_k8s_v1alpha1_Network(ref),
+ "./pkg/apis/k8s/v1alpha1.NetworkChaining": schema_pkg_apis_k8s_v1alpha1_NetworkChaining(ref),
+ "./pkg/apis/k8s/v1alpha1.NetworkChainingSpec": schema_pkg_apis_k8s_v1alpha1_NetworkChainingSpec(ref),
+ "./pkg/apis/k8s/v1alpha1.NetworkChainingStatus": schema_pkg_apis_k8s_v1alpha1_NetworkChainingStatus(ref),
+ "./pkg/apis/k8s/v1alpha1.NetworkSpec": schema_pkg_apis_k8s_v1alpha1_NetworkSpec(ref),
+ "./pkg/apis/k8s/v1alpha1.NetworkStatus": schema_pkg_apis_k8s_v1alpha1_NetworkStatus(ref),
+ "./pkg/apis/k8s/v1alpha1.ProviderNetwork": schema_pkg_apis_k8s_v1alpha1_ProviderNetwork(ref),
+ "./pkg/apis/k8s/v1alpha1.ProviderNetworkSpec": schema_pkg_apis_k8s_v1alpha1_ProviderNetworkSpec(ref),
+ "./pkg/apis/k8s/v1alpha1.ProviderNetworkStatus": schema_pkg_apis_k8s_v1alpha1_ProviderNetworkStatus(ref),
}
}
@@ -25,17 +28,18 @@ func schema_pkg_apis_k8s_v1alpha1_Network(ref common.ReferenceCallback) common.O
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "Network is the Schema for the networks API",
+ Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
Type: []string{"string"},
Format: "",
},
},
"apiVersion": {
SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
+ Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
Type: []string{"string"},
Format: "",
},
@@ -47,19 +51,111 @@ func schema_pkg_apis_k8s_v1alpha1_Network(ref common.ReferenceCallback) common.O
},
"spec": {
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.NetworkSpec"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.NetworkSpec"),
},
},
"status": {
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.NetworkStatus"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.NetworkStatus"),
},
},
},
},
},
Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.NetworkSpec", "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.NetworkStatus"},
+ "./pkg/apis/k8s/v1alpha1.NetworkSpec", "./pkg/apis/k8s/v1alpha1.NetworkStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
+ }
+}
+
+func schema_pkg_apis_k8s_v1alpha1_NetworkChaining(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NetworkChaining is the Schema for the networkchainings API",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "kind": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "apiVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "metadata": {
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
+ },
+ },
+ "spec": {
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("./pkg/apis/k8s/v1alpha1.NetworkChainingSpec"),
+ },
+ },
+ "status": {
+ SchemaProps: spec.SchemaProps{
+ Ref: ref("./pkg/apis/k8s/v1alpha1.NetworkChainingStatus"),
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "./pkg/apis/k8s/v1alpha1.NetworkChainingSpec", "./pkg/apis/k8s/v1alpha1.NetworkChainingStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
+ }
+}
+
+func schema_pkg_apis_k8s_v1alpha1_NetworkChainingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NetworkChainingSpec defines the desired state of NetworkChaining",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "chainType": {
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "routingSpec": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Currently only Routing type is supported",
+ Ref: ref("./pkg/apis/k8s/v1alpha1.RouteSpec"),
+ },
+ },
+ },
+ Required: []string{"chainType", "routingSpec"},
+ },
+ },
+ Dependencies: []string{
+ "./pkg/apis/k8s/v1alpha1.RouteSpec"},
+ }
+}
+
+func schema_pkg_apis_k8s_v1alpha1_NetworkChainingStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NetworkChainingStatus defines the observed state of NetworkChaining",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "state": {
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ Required: []string{"state"},
+ },
+ },
}
}
@@ -68,6 +164,7 @@ func schema_pkg_apis_k8s_v1alpha1_NetworkSpec(ref common.ReferenceCallback) comm
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "NetworkSpec defines the desired state of Network",
+ Type: []string{"object"},
Properties: map[string]spec.Schema{
"cniType": {
SchemaProps: spec.SchemaProps{
@@ -82,7 +179,7 @@ func schema_pkg_apis_k8s_v1alpha1_NetworkSpec(ref common.ReferenceCallback) comm
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.IpSubnet"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.IpSubnet"),
},
},
},
@@ -94,7 +191,7 @@ func schema_pkg_apis_k8s_v1alpha1_NetworkSpec(ref common.ReferenceCallback) comm
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.IpSubnet"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.IpSubnet"),
},
},
},
@@ -102,7 +199,7 @@ func schema_pkg_apis_k8s_v1alpha1_NetworkSpec(ref common.ReferenceCallback) comm
},
"dns": {
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.DnsSpec"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.DnsSpec"),
},
},
"routes": {
@@ -111,7 +208,7 @@ func schema_pkg_apis_k8s_v1alpha1_NetworkSpec(ref common.ReferenceCallback) comm
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.Route"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.Route"),
},
},
},
@@ -122,7 +219,7 @@ func schema_pkg_apis_k8s_v1alpha1_NetworkSpec(ref common.ReferenceCallback) comm
},
},
Dependencies: []string{
- "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.DnsSpec", "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.IpSubnet", "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.Route"},
+ "./pkg/apis/k8s/v1alpha1.DnsSpec", "./pkg/apis/k8s/v1alpha1.IpSubnet", "./pkg/apis/k8s/v1alpha1.Route"},
}
}
@@ -131,6 +228,7 @@ func schema_pkg_apis_k8s_v1alpha1_NetworkStatus(ref common.ReferenceCallback) co
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "NetworkStatus defines the observed state of Network",
+ Type: []string{"object"},
Properties: map[string]spec.Schema{
"state": {
SchemaProps: spec.SchemaProps{
@@ -143,7 +241,6 @@ func schema_pkg_apis_k8s_v1alpha1_NetworkStatus(ref common.ReferenceCallback) co
Required: []string{"state"},
},
},
- Dependencies: []string{},
}
}
@@ -152,17 +249,18 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetwork(ref common.ReferenceCallback)
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "ProviderNetwork is the Schema for the providernetworks API",
+ Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
Type: []string{"string"},
Format: "",
},
},
"apiVersion": {
SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
+ Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
Type: []string{"string"},
Format: "",
},
@@ -174,19 +272,19 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetwork(ref common.ReferenceCallback)
},
"spec": {
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.ProviderNetworkSpec"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.ProviderNetworkSpec"),
},
},
"status": {
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.ProviderNetworkStatus"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.ProviderNetworkStatus"),
},
},
},
},
},
Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.ProviderNetworkSpec", "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.ProviderNetworkStatus"},
+ "./pkg/apis/k8s/v1alpha1.ProviderNetworkSpec", "./pkg/apis/k8s/v1alpha1.ProviderNetworkStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
}
}
@@ -195,6 +293,7 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetworkSpec(ref common.ReferenceCallba
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "ProviderNetworkSpec defines the desired state of ProviderNetwork",
+ Type: []string{"object"},
Properties: map[string]spec.Schema{
"cniType": {
SchemaProps: spec.SchemaProps{
@@ -209,7 +308,7 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetworkSpec(ref common.ReferenceCallba
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.IpSubnet"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.IpSubnet"),
},
},
},
@@ -221,7 +320,7 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetworkSpec(ref common.ReferenceCallba
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.IpSubnet"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.IpSubnet"),
},
},
},
@@ -229,7 +328,7 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetworkSpec(ref common.ReferenceCallba
},
"dns": {
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.DnsSpec"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.DnsSpec"),
},
},
"routes": {
@@ -238,7 +337,7 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetworkSpec(ref common.ReferenceCallba
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.Route"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.Route"),
},
},
},
@@ -252,15 +351,21 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetworkSpec(ref common.ReferenceCallba
},
"vlan": {
SchemaProps: spec.SchemaProps{
- Ref: ref("ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.VlanSpec"),
+ Ref: ref("./pkg/apis/k8s/v1alpha1.VlanSpec"),
+ },
+ },
+ "direct": {
+ SchemaProps: spec.SchemaProps{
+ Description: "For now VLAN & Direct only supported type",
+ Ref: ref("./pkg/apis/k8s/v1alpha1.DirectSpec"),
},
},
},
- Required: []string{"cniType", "ipv4Subnets", "providerNetType", "vlan"},
+ Required: []string{"cniType", "ipv4Subnets", "providerNetType"},
},
},
Dependencies: []string{
- "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.DnsSpec", "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.IpSubnet", "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.Route", "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1.VlanSpec"},
+ "./pkg/apis/k8s/v1alpha1.DirectSpec", "./pkg/apis/k8s/v1alpha1.DnsSpec", "./pkg/apis/k8s/v1alpha1.IpSubnet", "./pkg/apis/k8s/v1alpha1.Route", "./pkg/apis/k8s/v1alpha1.VlanSpec"},
}
}
@@ -269,6 +374,7 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetworkStatus(ref common.ReferenceCall
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "ProviderNetworkStatus defines the observed state of ProviderNetwork",
+ Type: []string{"object"},
Properties: map[string]spec.Schema{
"state": {
SchemaProps: spec.SchemaProps{
@@ -281,6 +387,5 @@ func schema_pkg_apis_k8s_v1alpha1_ProviderNetworkStatus(ref common.ReferenceCall
Required: []string{"state"},
},
},
- Dependencies: []string{},
}
}