Changed network bandwidth from B to MB
Change-Id: I97fcfe6f0f5a9a7a7859058eae93b926579f3328
This commit is contained in:
parent
f7e9102dcb
commit
9791135939
@ -273,9 +273,10 @@ class CeilometerCollector(collector.BaseCollector):
|
|||||||
tap)
|
tap)
|
||||||
tap = self._cacher.get_resource_detail('network.tap',
|
tap = self._cacher.get_resource_detail('network.tap',
|
||||||
tap_id)
|
tap_id)
|
||||||
|
tap_bw_mb = tap_stat.max / 1048576.0
|
||||||
bw_data.append(self.t_cloudkitty.format_item(tap,
|
bw_data.append(self.t_cloudkitty.format_item(tap,
|
||||||
'B',
|
'MB',
|
||||||
tap_stat.max))
|
tap_bw_mb))
|
||||||
ck_res_name = 'network.bw.{}'.format(direction)
|
ck_res_name = 'network.bw.{}'.format(direction)
|
||||||
if not bw_data:
|
if not bw_data:
|
||||||
raise collector.NoDataCollected(self.collector_name,
|
raise collector.NoDataCollected(self.collector_name,
|
||||||
|
@ -108,8 +108,8 @@ NETWORK_BW_OUT = {
|
|||||||
"type": "network.bw.out",
|
"type": "network.bw.out",
|
||||||
"desc": {},
|
"desc": {},
|
||||||
"vol": {
|
"vol": {
|
||||||
"qty": 4546.0,
|
"qty": 50.0,
|
||||||
"unit": "B"}}
|
"unit": "MB"}}
|
||||||
|
|
||||||
NETWORK_BW_RESOURCE = {
|
NETWORK_BW_RESOURCE = {
|
||||||
'instance_id': 'eef9673d-5d24-43fd-89f5-2929acc7e193',
|
'instance_id': 'eef9673d-5d24-43fd-89f5-2929acc7e193',
|
||||||
@ -411,88 +411,88 @@ class VolumeGenerator(BaseGenerator):
|
|||||||
class NetBWVolMapper(VolumeVariationMapper):
|
class NetBWVolMapper(VolumeVariationMapper):
|
||||||
var_map = {
|
var_map = {
|
||||||
'mon': {
|
'mon': {
|
||||||
'default': 1073741824,
|
'default': 1024,
|
||||||
12: 2147483648,
|
12: 2048,
|
||||||
13: 3221225472,
|
13: 3072,
|
||||||
14: 2147483648,
|
14: 2048,
|
||||||
18: 2147483648,
|
18: 2048,
|
||||||
19: 3221225472,
|
19: 3072,
|
||||||
20: 4294967296,
|
20: 4096,
|
||||||
21: 4294967296,
|
21: 4096,
|
||||||
22: 3221225472,
|
22: 3072,
|
||||||
23: 2147483648,
|
23: 2048,
|
||||||
},
|
},
|
||||||
'tue': {
|
'tue': {
|
||||||
'default': 1073741824,
|
'default': 1024,
|
||||||
12: 2147483648,
|
12: 2048,
|
||||||
13: 3221225472,
|
13: 3072,
|
||||||
14: 2147483648,
|
14: 2048,
|
||||||
18: 2147483648,
|
18: 2048,
|
||||||
19: 3221225472,
|
19: 3072,
|
||||||
20: 4294967296,
|
20: 4096,
|
||||||
21: 4294967296,
|
21: 4096,
|
||||||
22: 3221225472,
|
22: 3072,
|
||||||
23: 2147483648,
|
23: 2048,
|
||||||
},
|
},
|
||||||
'wed': {
|
'wed': {
|
||||||
'default': 1073741824,
|
'default': 1024,
|
||||||
12: 2147483648,
|
12: 2048,
|
||||||
13: 3221225472,
|
13: 3072,
|
||||||
14: 2147483648,
|
14: 2048,
|
||||||
18: 2147483648,
|
18: 2048,
|
||||||
19: 3221225472,
|
19: 3072,
|
||||||
20: 4294967296,
|
20: 4096,
|
||||||
21: 4294967296,
|
21: 4096,
|
||||||
22: 3221225472,
|
22: 3072,
|
||||||
23: 2147483648,
|
23: 2048,
|
||||||
},
|
},
|
||||||
'thu': {
|
'thu': {
|
||||||
'default': 1073741824,
|
'default': 1024,
|
||||||
12: 2147483648,
|
12: 2048,
|
||||||
13: 3221225472,
|
13: 3072,
|
||||||
14: 2147483648,
|
14: 2048,
|
||||||
18: 2147483648,
|
18: 2048,
|
||||||
19: 3221225472,
|
19: 3072,
|
||||||
20: 4294967296,
|
20: 4096,
|
||||||
21: 4294967296,
|
21: 4096,
|
||||||
22: 3221225472,
|
22: 3072,
|
||||||
23: 2147483648,
|
23: 2048,
|
||||||
},
|
},
|
||||||
'fri': {
|
'fri': {
|
||||||
'default': 1073741824,
|
'default': 1024,
|
||||||
12: 2147483648,
|
12: 2048,
|
||||||
13: 3221225472,
|
13: 3072,
|
||||||
14: 2147483648,
|
14: 2048,
|
||||||
18: 2147483648,
|
18: 2048,
|
||||||
19: 3221225472,
|
19: 3072,
|
||||||
20: 4294967296,
|
20: 4096,
|
||||||
21: 4294967296,
|
21: 4096,
|
||||||
22: 3221225472,
|
22: 3072,
|
||||||
23: 2147483648,
|
23: 2048,
|
||||||
},
|
},
|
||||||
'sat': {
|
'sat': {
|
||||||
'default': 2147483648,
|
'default': 2048,
|
||||||
12: 3221225472,
|
12: 3072,
|
||||||
13: 4294967296,
|
13: 4096,
|
||||||
14: 3221225472,
|
14: 3072,
|
||||||
18: 3221225472,
|
18: 3072,
|
||||||
19: 4294967296,
|
19: 4096,
|
||||||
20: 4294967296,
|
20: 4096,
|
||||||
21: 4294967296,
|
21: 4096,
|
||||||
22: 4294967296,
|
22: 4096,
|
||||||
23: 3221225472,
|
23: 3072,
|
||||||
},
|
},
|
||||||
'sun': {
|
'sun': {
|
||||||
'default': 2147483648,
|
'default': 2048,
|
||||||
12: 3221225472,
|
12: 3072,
|
||||||
13: 4294967296,
|
13: 4096,
|
||||||
14: 3221225472,
|
14: 3072,
|
||||||
18: 3221225472,
|
18: 3072,
|
||||||
19: 4294967296,
|
19: 4096,
|
||||||
20: 4294967296,
|
20: 4096,
|
||||||
21: 4294967296,
|
21: 4096,
|
||||||
22: 4294967296,
|
22: 4096,
|
||||||
23: 3221225472,
|
23: 3072,
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user