aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2020-03-05 00:11:48 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-05 00:11:48 +0000
commit403455ec9a6486c75053bbde6370c528c0369c22 (patch)
tree2cdac7eaccac932df4324bbfd0040d34bb5d29d0 /src
parent7675032b345c87af17213941aba6cdacb64f6a70 (diff)
parente22e3d7253af689775f4f85dbb865c7587b04e4b (diff)
Merge "Updating AAI wit resource info : part2"
Diffstat (limited to 'src')
-rw-r--r--src/inventory/constants/const.go94
1 files changed, 94 insertions, 0 deletions
diff --git a/src/inventory/constants/const.go b/src/inventory/constants/const.go
new file mode 100644
index 00000000..a1ba2334
--- /dev/null
+++ b/src/inventory/constants/const.go
@@ -0,0 +1,94 @@
+/*
+Copyright 2020 Tech Mahindra.
+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.
+*/
+
+package constants
+
+import (
+
+//corev1 "k8s.io/api/core/v1"
+
+)
+
+const (
+ XFromAppId = "SO"
+ ContentType = "application/json"
+ Accept = "application/json"
+ XTransactionId = "get_aai_subscr"
+)
+
+const (
+ AAI_EP = "/aai/v14"
+ AAI_CREP = "/cloud-infrastructure/cloud-regions/"
+ AAI_NEP = "/network/generic-vnfs/generic-vnf/"
+)
+
+const (
+ MK8S_EP = "/api/multicloud-k8s/v1/v1/instance/"
+ MK8S_CEP = "/connectivity-info"
+)
+
+type PodInfoToAAI struct {
+ VserverName string
+ VserverName2 string
+ ProvStatus string
+ I3InterfaceIPv4Address string
+ I3InterfaceIPvPrefixLength int32
+ VnfId string
+ VfmId string
+ CloudRegion string
+}
+
+type RData struct {
+ RelationshipKey string `json:"relationship-key"`
+ RelationshipValue string `json:"relationship-value"`
+}
+
+type RelationList struct {
+ RelatedTo string `json:"related-to"`
+ RelatedLink string `json:"related-link"`
+ RelationshipData []RData `json:"relationship-data"`
+ RelatedToProperty []Property `json:"related-to-property"`
+}
+
+type TenantInfo struct {
+ TenantId string `json:"tenant-id"`
+ TenantName string `json:"tenant-name"`
+}
+
+type Tenant struct {
+ Tenants map[string][]TenantInfo `json:"tenants"`
+}
+
+type Property struct {
+ PropertyKey string `json:"property-key"`
+ PropertyValue string `json:"property-value"`
+}
+
+type VFModule struct {
+ VFModuleId string `json:"vf-module-id"`
+ VFModuleName string `json:"vf-module-name"`
+ HeatStackId string `json:"heat-stack-id"`
+ OrchestrationStatus string `json:"orchestration-status"`
+ ResourceVersion string `json:"resource-version"`
+ AutomatedAssignment string `json:"automated-assignment"`
+ IsBaseVfModule string `json:"is-base-vf-module"`
+ RelationshipList map[string][]RelationList `json:"relationship-list"`
+ ModelInvariantId string `json:"model-invariant-id"`
+ ModelVersionId string `json:"model-version-id"`
+ ModelCustomizationId string `json:"model-customization-id"`
+ ModuleIndex string `json:"module-index"`
+}
+
+type VFModules struct {
+ VFModules []VFModule `json:"vf-module"`
+}