diff options
author | Ritu Sood <Ritu.Sood@intel.com> | 2020-04-17 22:45:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-17 22:45:23 +0000 |
commit | e49d4f0f4b4252b2e3acc713e8dba7084e285273 (patch) | |
tree | d964b0c07c7ae1da00f74590d79023163503f0cb /src/ncm/pkg/module/module_definitions.go | |
parent | 1c3a22e3de0dd24b4161ae8b34794627620a208b (diff) | |
parent | b7a4e00a6cd9d4ce903448ea958d85f17c8d68ab (diff) |
Merge "Add apply API for network intents"
Diffstat (limited to 'src/ncm/pkg/module/module_definitions.go')
-rw-r--r-- | src/ncm/pkg/module/module_definitions.go | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/ncm/pkg/module/module_definitions.go b/src/ncm/pkg/module/module_definitions.go index 729a9dbd..36c865a5 100644 --- a/src/ncm/pkg/module/module_definitions.go +++ b/src/ncm/pkg/module/module_definitions.go @@ -31,28 +31,32 @@ const CNI_TYPE_OVN4NFV string = "ovn4nfv" var CNI_TYPES = [...]string{CNI_TYPE_OVN4NFV} +const YAML_START = "---\n" +const YAML_END = "...\n" + // It implements the interface for managing the ClusterProviders const MAX_DESCRIPTION_LEN int = 1024 const MAX_USERDATA_LEN int = 4096 type Metadata struct { - Name string `json:"name"` - Description string `json:"description"` - UserData1 string `json:"userData1"` - UserData2 string `json:"userData2"` + Name string `json:"name" yaml:"name"` + Description string `json:"description" yaml:"-"` + UserData1 string `json:"userData1" yaml:"-"` + UserData2 string `json:"userData2" yaml:"-"` } type ClientDbInfo struct { storeName string // name of the mongodb collection to use for client documents tagMeta string // attribute key name for the json data of a client document tagContent string // attribute key name for the file data of a client document + tagContext string // attribute key name for context object in App Context } type Ipv4Subnet struct { - Subnet string `json:"subnet"` // CIDR notation, e.g. 172.16.33.0/24 - Name string `json:"name"` - Gateway string `json:"gateway"` // IPv4 addre, e.g. 172.16.33.1/24 - Exclude string `json:"excludeIps"` // space separated list of single IPs or ranges e.g. "172.16.33.2 172.16.33.5..172.16.33.10" + Subnet string `json:"subnet" yaml:"subnet"` // CIDR notation, e.g. 172.16.33.0/24 + Name string `json:"name" yaml:"name"` + Gateway string `json:"gateway" yaml:"gateway"` // IPv4 addre, e.g. 172.16.33.1/24 + Exclude string `json:"excludeIps" yaml:"excludeIps"` // space separated list of single IPs or ranges e.g. "172.16.33.2 172.16.33.5..172.16.33.10" } const VLAN_NODE_ANY = "any" @@ -61,11 +65,11 @@ const VLAN_NODE_SPECIFIC = "specific" var VLAN_NODE_SELECTORS = [...]string{VLAN_NODE_ANY, VLAN_NODE_SPECIFIC} type Vlan struct { - VlanId int `json:"vlanID"` - ProviderInterfaceName string `json:"providerInterfaceName"` - LogicalInterfaceName string `json:"logicalInterfaceName"` - VlanNodeSelector string `json:"vlanNodeSelector"` - NodeLabelList []string `json:"nodeLabelList"` + VlanId int `json:"vlanID" yaml:"vlanId"` + ProviderInterfaceName string `json:"providerInterfaceName" yaml:"providerInterfaceName"` + LogicalInterfaceName string `json:"logicalInterfaceName" yaml:"logicalInterfaceName"` + VlanNodeSelector string `json:"vlanNodeSelector" yaml:"vlanNodeSelector"` + NodeLabelList []string `json:"nodeLabelList" yaml:"nodeLabelList"` } // Check for valid format Metadata |