summaryrefslogtreecommitdiffstats
path: root/src/ncm/pkg/module/providernet.go
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2020-04-14 17:54:45 -0700
committerEric Multanen <eric.w.multanen@intel.com>2020-04-16 16:58:05 -0700
commitb7a4e00a6cd9d4ce903448ea958d85f17c8d68ab (patch)
tree5ac53a49fd1efd559494755ca666ecf9550b1014 /src/ncm/pkg/module/providernet.go
parentc898a84208d20f0040778450cc401a35c3f8ee41 (diff)
Add apply API for network intents
Support POST API to 'apply' and 'terminate' network and providernetwork intents for a given cluster. Issue-ID: MULTICLOUD-1029 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: I8c9bae9e93aeeb68654eaab1f15de9883c22215c
Diffstat (limited to 'src/ncm/pkg/module/providernet.go')
-rw-r--r--src/ncm/pkg/module/providernet.go18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ncm/pkg/module/providernet.go b/src/ncm/pkg/module/providernet.go
index 5e2c0343..0435f2ba 100644
--- a/src/ncm/pkg/module/providernet.go
+++ b/src/ncm/pkg/module/providernet.go
@@ -29,12 +29,22 @@ type ProviderNet struct {
}
type ProviderNetSpec struct {
- CniType string `json:"cniType"`
- Ipv4Subnets []Ipv4Subnet `json:"ipv4Subnets"`
- ProviderNetType string `json:"providerNetType"`
- Vlan Vlan `json:"vlan"`
+ CniType string `json:"cniType" yaml:"cniType"`
+ Ipv4Subnets []Ipv4Subnet `json:"ipv4Subnets" yaml:"ipv4Subnets"`
+ ProviderNetType string `json:"providerNetType" yaml:"providerNetType"`
+ Vlan Vlan `json:"vlan" yaml:"vlan"`
}
+// structure for the Network Custom Resource
+type CrProviderNet struct {
+ ApiVersion string `yaml:"apiVersion"`
+ Kind string `yaml:"kind"`
+ ProviderNet ProviderNet
+}
+
+const PROVIDER_NETWORK_APIVERSION = "k8s.plugin.opnfv.org/v1alpha1"
+const PROVIDER_NETWORK_KIND = "ProviderNetwork"
+
// ProviderNetKey is the key structure that is used in the database
type ProviderNetKey struct {
ClusterProviderName string `json:"provider"`