Reduce Resource Consumption 47/7747/2 v6.0.1
authorbeierl <mbeierl@vmware.com>
Mon, 24 Jun 2019 19:51:33 +0000 (15:51 -0400)
committerdiazb <bdiaz@whitestack.com>
Wed, 3 Jul 2019 17:58:49 +0000 (18:58 +0100)
commit2e33fa017eea53a65c8d02c18c460d79ce28fc3b
treedeb375ba4a1b6d81cfee4fa71e762c206de7e907
parentc9debca32d33559e3b4db9c7318f67bb0d6826db
Reduce Resource Consumption

The vmware vnf collector requests a time series of data from
vROPS and then parses the whole block in order to retrieve the
most recent data element.  The time frame for the request
should be limited to a sane value, such as 1 hour.

The look ups for items that do not change should be outside
of the loop for looking up the metrics.

Add more metrics to list of supported metrics.

Improve error handling.

BUG 784

Change-Id: Ie3cef457eaf657c18ba682e3c5d3abf40a759e69
Signed-off-by: beierl <mbeierl@vmware.com>
(cherry picked from commit 730dfd82ef49e2dc1f6d54bb8a1d5e877d4d50b2)
osm_mon/collector/vnf_collectors/vmware.py
osm_mon/tests/unit/collector/vnf_collectors/vmware/__init__.py [new file with mode: 0644]
osm_mon/tests/unit/collector/vnf_collectors/vmware/mock_vcd.py [new file with mode: 0644]
osm_mon/tests/unit/collector/vnf_collectors/vmware/osm_mocks/VNFD.json [new file with mode: 0644]
osm_mon/tests/unit/collector/vnf_collectors/vmware/osm_mocks/VNFR.json [new file with mode: 0644]
osm_mon/tests/unit/collector/vnf_collectors/vmware/test_vcd_collector.py [new file with mode: 0644]
osm_mon/tests/unit/collector/vnf_collectors/vmware/vcd_mocks/OK.json [new file with mode: 0644]
osm_mon/tests/unit/collector/vnf_collectors/vmware/vcd_mocks/vrops_multi.json [new file with mode: 0644]
test-requirements.txt
tox.ini