diff options
Diffstat (limited to 'src/ncm/pkg/module/network.go')
-rw-r--r-- | src/ncm/pkg/module/network.go | 14 |
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) |