Merge branch 'master' of github.com:open-cloud/xos
diff --git a/xos/configurations/cord/cord.yaml b/xos/configurations/cord/cord.yaml
index faa71ad..df13312 100644
--- a/xos/configurations/cord/cord.yaml
+++ b/xos/configurations/cord/cord.yaml
@@ -145,6 +145,7 @@
"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",
diff --git a/xos/core/xoslib/methods/ceilometerview.py b/xos/core/xoslib/methods/ceilometerview.py
index c2ecb15..5f99b61 100644
--- a/xos/core/xoslib/methods/ceilometerview.py
+++ b/xos/core/xoslib/methods/ceilometerview.py
@@ -222,6 +222,7 @@
self._kwapi_meters_info = self._get_kwapi_meters_info()
self._ipmi_meters_info = self._get_ipmi_meters_info()
self._vcpe_meters_info = self._get_vcpe_meters_info()
+ self._volt_meters_info = self._get_volt_meters_info()
self._sdn_meters_info = self._get_sdn_meters_info()
# Storing the meters info of all services together.
@@ -233,6 +234,7 @@
self._kwapi_meters_info,
self._ipmi_meters_info,
self._vcpe_meters_info,
+ self._volt_meters_info,
self._sdn_meters_info)
self._all_meters_info = {}
for service_meters in all_services_meters:
@@ -335,6 +337,16 @@
return self._list(only_meters=self._vcpe_meters_info.keys(),
except_meters=except_meters)
+ def list_volt(self, except_meters=None):
+ """Returns a list of meters tied to volt service
+
+ :Parameters:
+ - `except_meters`: The list of meter names we don't want to show
+ """
+
+ return self._list(only_meters=self._volt_meters_info.keys(),
+ except_meters=except_meters)
+
def list_sdn(self, except_meters=None):
"""Returns a list of meters tied to sdn service
@@ -949,6 +961,39 @@
}),
])
+ def _get_volt_meters_info(self):
+ """Returns additional info for each meter
+
+ That will be used for augmenting the Ceilometer meter
+ """
+
+ # TODO(lsmola) Unless the Ceilometer will provide the information
+ # below, I need to define it as a static here. I will be joining this
+ # to info that I am able to obtain from Ceilometer meters, hopefully
+ # some day it will be supported all.
+ return datastructures.SortedDict([
+ ('volt.device', {
+ 'type': _("VOLT"),
+ 'label': '',
+ 'description': _("Existence of olt device"),
+ }),
+ ('volt.device.disconnect', {
+ 'type': _("VOLT"),
+ 'label': '',
+ 'description': _("Olt device disconnected"),
+ }),
+ ('volt.device.subscriber', {
+ 'type': _("VOLT"),
+ 'label': '',
+ 'description': _("Existence of olt subscriber"),
+ }),
+ ('volt.device.subscriber.unregister', {
+ 'type': _("VOLT"),
+ 'label': '',
+ 'description': _("Olt subscriber unregistered"),
+ }),
+ ])
+
def _get_sdn_meters_info(self):
"""Returns additional info for each meter
@@ -1121,6 +1166,7 @@
_('Nova'): meters.list_nova(),
_('Neutron'): meters.list_neutron(),
_('VCPE'): meters.list_vcpe(),
+ _('VOLT'): meters.list_volt(),
_('SDN'): meters.list_sdn(),
}
meters = []
@@ -1191,6 +1237,7 @@
_('Nova'): meters.list_nova(),
_('Neutron'): meters.list_neutron(),
_('VCPE'): meters.list_vcpe(),
+ _('VOLT'): meters.list_volt(),
_('SDN'): meters.list_sdn(),
}
report_rows = []
@@ -1343,6 +1390,7 @@
_('Nova'): meters.list_nova(except_meters=exclude_nova_meters_info),
_('Neutron'): meters.list_neutron(except_meters=exclude_neutron_meters_info),
_('VCPE'): meters.list_vcpe(),
+ _('VOLT'): meters.list_volt(),
_('SDN'): meters.list_sdn(),
}
for service,meters in services.items():
diff --git a/xos/synchronizers/onos/onos-ext-notifier-1.0-SNAPSHOT.oar b/xos/synchronizers/onos/onos-ext-notifier-1.0-SNAPSHOT.oar
index 3d44818..e593c30 100644
--- a/xos/synchronizers/onos/onos-ext-notifier-1.0-SNAPSHOT.oar
+++ b/xos/synchronizers/onos/onos-ext-notifier-1.0-SNAPSHOT.oar
Binary files differ
diff --git a/xos/synchronizers/onos/onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar b/xos/synchronizers/onos/onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar
index e9a4593..ffe0502 100644
--- a/xos/synchronizers/onos/onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar
+++ b/xos/synchronizers/onos/onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar
Binary files differ
diff --git a/xos/synchronizers/onos/steps/sync_onosapp.py b/xos/synchronizers/onos/steps/sync_onosapp.py
index 87ed89c..2dfdfbd 100644
--- a/xos/synchronizers/onos/steps/sync_onosapp.py
+++ b/xos/synchronizers/onos/steps/sync_onosapp.py
@@ -7,6 +7,7 @@
import time
import re
import json
+from collections import OrderedDict
from django.db.models import F, Q
from xos.config import Config
from synchronizers.base.ansible import run_template
@@ -169,7 +170,7 @@
file(os.path.join(o.files_dir, fn),"w").write(" " +value)
o.rest_configs.append( {"endpoint": endpoint, "fn": fn} )
if name.startswith("component_config"):
- components = json.loads(value)
+ components = json.loads(value,object_pairs_hook=OrderedDict)
for component in components.keys():
config = components[component]
for key in config.keys():