Generate vOLT component config
diff --git a/xos/configurations/cord-pod/cord-vtn-vsg.yaml b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
index bf5d4d9..39f03bd 100644
--- a/xos/configurations/cord-pod/cord-vtn-vsg.yaml
+++ b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
@@ -80,20 +80,8 @@
properties:
install_dependencies: onos-ext-notifier-1.0-SNAPSHOT.oar, onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar
dependencies: org.onosproject.openflow-base, org.onosproject.olt, org.ciena.onos.ext_notifier, org.ciena.onos.volt_event_publisher
- component_config: >
- {
- "org.ciena.onos.ext_notifier.KafkaNotificationBridge":{
- "rabbit.user": "<rabbit_user>",
- "rabbit.password": "<rabbit_password>",
- "rabbit.host": "<rabbit_host>",
- "publish.kafka": "false",
- "publish.rabbit": "true",
- "volt.events.rabbit.topic": "notifications.info",
- "volt.events.rabbit.exchange": "voltlistener",
- "volt.events.opaque.info": "{project_id: <keystone_tenant_id>, user_id: <keystone_user_id>}",
- "publish.volt.events": "true"
- }
- }
+ autogenerate: volt-network-cfg
+ autogenerate: volt-component-cfg
Private:
type: tosca.nodes.NetworkTemplate
diff --git a/xos/synchronizers/onos/steps/sync_onosapp.py b/xos/synchronizers/onos/steps/sync_onosapp.py
index 4c70877..1185e22 100644
--- a/xos/synchronizers/onos/steps/sync_onosapp.py
+++ b/xos/synchronizers/onos/steps/sync_onosapp.py
@@ -242,7 +242,7 @@
return json.dumps(data, indent=4, sort_keys=True)
- def get_volt_config(self, o, attrs):
+ def get_volt_network_config(self, o, attrs):
data = {
"devices" : {
"of:1000000000000001" : {
@@ -258,6 +258,22 @@
}
return json.dumps(data, indent=4, sort_keys=True)
+ def get_volt_component_config(self, o, attrs):
+ data = {
+ "org.ciena.onos.ext_notifier.KafkaNotificationBridge":{
+ "rabbit.user": "<rabbit_user>",
+ "rabbit.password": "<rabbit_password>",
+ "rabbit.host": "<rabbit_host>",
+ "publish.kafka": "false",
+ "publish.rabbit": "true",
+ "volt.events.rabbit.topic": "notifications.info",
+ "volt.events.rabbit.exchange": "voltlistener",
+ "volt.events.opaque.info": "{project_id: <keystone_tenant_id>, user_id: <keystone_user_id>}",
+ "publish.volt.events": "true"
+ }
+ }
+ return json.dumps(data, indent=4, sort_keys=True)
+
def write_configs(self, o):
o.config_fns = []
o.rest_configs = []
@@ -308,7 +324,10 @@
value = self.get_vtn_config(o, attrs)
elif label == "volt-network-cfg":
config = "rest_onos/v1/network/configuration/"
- value = self.get_volt_config(o, attrs)
+ value = self.get_volt_network_config(o, attrs)
+ elif label == "volt-component-cfg":
+ config = "component_config"
+ value = self.get_volt_component_config(o, attrs)
if config:
tas = TenantAttribute.objects.filter(tenant=o, name=config)