AETHER-3440 Generate enterprise Entities from list
Change-Id: I5a082b51373314d6578b6572f7e86415d6663123
diff --git a/aether-roc-umbrella/Chart.yaml b/aether-roc-umbrella/Chart.yaml
index 1d505a5..bab08ff 100644
--- a/aether-roc-umbrella/Chart.yaml
+++ b/aether-roc-umbrella/Chart.yaml
@@ -7,7 +7,7 @@
description: Aether ROC Umbrella chart to deploy all Aether ROC
kubeVersion: ">=1.18.0"
type: application
-version: 2.1.9
+version: 2.1.10
appVersion: v0.0.0
keywords:
- aether
diff --git a/aether-roc-umbrella/templates/topo.yaml b/aether-roc-umbrella/templates/topo.yaml
index faeb0b9..d648841 100644
--- a/aether-roc-umbrella/templates/topo.yaml
+++ b/aether-roc-umbrella/templates/topo.yaml
@@ -33,14 +33,15 @@
onos.topo.Asset:
name: 5G Core
onos.topo.MastershipState: {}
+{{- range .Values.enterprises }}
---
# The 4G/5G v2.1.0 sdcore-adapter
apiVersion: topo.onosproject.org/v1beta1
kind: Entity
metadata:
- name: starbucks
+ name: {{ .id }}
spec:
- uri: starbucks
+ uri: {{ .id }}
kind:
name: aether
aspects:
@@ -49,56 +50,11 @@
version: 2.1.x
type: aether
onos.topo.Location:
- lat: 52.5150
- lng: 13.3885
+ lat: {{ .lat }}
+ lng: {{ .long }}
onos.topo.TLSOptions:
insecure: true
onos.topo.Asset:
- name: Starbucks Enterprise
+ name: {{ .name }}
onos.topo.MastershipState: {}
----
-# The 4G/5G v2.1.0 sdcore-adapter
-apiVersion: topo.onosproject.org/v1beta1
-kind: Entity
-metadata:
- name: acme
-spec:
- uri: acme
- kind:
- name: aether
- aspects:
- onos.topo.Configurable:
- address: sdcore-adapter-v2-1:5150
- version: 2.1.x
- type: aether
- onos.topo.Location:
- lat: 52.5150
- lng: 13.3885
- onos.topo.TLSOptions:
- insecure: true
- onos.topo.Asset:
- name: ACME Enterprise
- onos.topo.MastershipState: {}
----
-# The 4G/5G v2.1.0 sdcore-adapter
-apiVersion: topo.onosproject.org/v1beta1
-kind: Entity
-metadata:
- name: defaultent
-spec:
- uri: defaultent
- kind:
- name: aether
- aspects:
- onos.topo.Configurable:
- address: sdcore-adapter-v2-1:5150
- version: 2.1.x
- type: aether
- onos.topo.Location:
- lat: 52.5150
- lng: 13.3885
- onos.topo.TLSOptions:
- insecure: true
- onos.topo.Asset:
- name: Default Enterprise
- onos.topo.MastershipState: {}
+{{- end }}
diff --git a/aether-roc-umbrella/values.yaml b/aether-roc-umbrella/values.yaml
index f5bc379..737a9ed 100644
--- a/aether-roc-umbrella/values.yaml
+++ b/aether-roc-umbrella/values.yaml
@@ -374,3 +374,17 @@
openpolicyagent:
enabled: true
regoConfigMap: aether-roc-umbrella-opa-rbac
+
+enterprises:
+ - id: starbucks
+ name: Starbucks Enterprise
+ lat: 52.5150
+ long: 13.3885
+ - id: acme
+ name: ACME Enterprise
+ lat: 52.5150
+ long: 13.3885
+ - id: defaultent
+ name: Default Enterprise
+ lat: 52.5150
+ long: 13.3885