aboutsummaryrefslogtreecommitdiffstats
path: root/src/ncm/pkg/module/network.go
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2020-04-17 22:45:23 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-17 22:45:23 +0000
commite49d4f0f4b4252b2e3acc713e8dba7084e285273 (patch)
treed964b0c07c7ae1da00f74590d79023163503f0cb /src/ncm/pkg/module/network.go
parent1c3a22e3de0dd24b4161ae8b34794627620a208b (diff)
parentb7a4e00a6cd9d4ce903448ea958d85f17c8d68ab (diff)
Merge "Add apply API for network intents"
Diffstat (limited to 'src/ncm/pkg/module/network.go')
-rw-r--r--src/ncm/pkg/module/network.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ncm/pkg/module/network.go b/src/ncm/pkg/module/network.go
index 2d4121e9..cfb414c5 100644
--- a/src/ncm/pkg/module/network.go
+++ b/src/ncm/pkg/module/network.go
@@ -24,8 +24,8 @@ import (
// Network contains the parameters needed for dynamic networks
type Network struct {
- Metadata Metadata `json:"metadata"`
- Spec NetworkSpec `json:"spec"`
+ Metadata Metadata `json:"metadata" yaml:"metadata"`
+ Spec NetworkSpec `json:"spec" yaml:"spec"`
}
type NetworkSpec struct {
@@ -40,6 +40,16 @@ type NetworkKey struct {
NetworkName string `json:"network"`
}
+// structure for the Network Custom Resource
+type CrNetwork struct {
+ ApiVersion string `yaml:"apiVersion"`
+ Kind string `yaml:"kind"`
+ Network Network
+}
+
+const NETWORK_APIVERSION = "k8s.plugin.opnfv.org/v1alpha1"
+const NETWORK_KIND = "Network"
+
// Manager is an interface exposing the Network functionality
type NetworkManager interface {
CreateNetwork(pr Network, clusterProvider, cluster string, exists bool) (Network, error)