@@ -41,7 +41,10 @@ def test_bandwidth_report(self):
4141 }, {
4242 'id' : 2 ,
4343 'name' : 'pool2' ,
44- 'metricTrackingObjectId' : 2 ,
44+ }, {
45+ 'id' : 3 ,
46+ 'name' : 'pool3' ,
47+ 'metricTrackingObjectId' : 3 ,
4548 }]
4649 hardware = self .set_mock ('SoftLayer_Account' , 'getHardware' )
4750 hardware .return_value = [{
@@ -50,8 +53,12 @@ def test_bandwidth_report(self):
5053 'hostname' : 'host1' ,
5154 }, {
5255 'id' : 102 ,
53- 'metricTrackingObject' : {'id' : 102 },
54- 'hostname' : 'host1' ,
56+ 'hostname' : 'host2' ,
57+ 'virtualRack' : {'id' : 1 , 'bandwidthAllotmentTypeId' : 2 },
58+ }, {
59+ 'id' : 103 ,
60+ 'metricTrackingObject' : {'id' : 103 },
61+ 'hostname' : 'host3' ,
5562 'virtualRack' : {'id' : 1 , 'bandwidthAllotmentTypeId' : 2 },
5663 }]
5764 guests = self .set_mock ('SoftLayer_Account' , 'getVirtualGuests' )
@@ -61,8 +68,12 @@ def test_bandwidth_report(self):
6168 'hostname' : 'host1' ,
6269 }, {
6370 'id' : 202 ,
64- 'metricTrackingObjectId' : 202 ,
65- 'hostname' : 'host1' ,
71+ 'hostname' : 'host2' ,
72+ 'virtualRack' : {'id' : 2 , 'bandwidthAllotmentTypeId' : 2 },
73+ }, {
74+ 'id' : 203 ,
75+ 'metricTrackingObjectId' : 203 ,
76+ 'hostname' : 'host3' ,
6677 'virtualRack' : {'id' : 2 , 'bandwidthAllotmentTypeId' : 2 },
6778 }]
6879 summary_data = self .set_mock ('SoftLayer_Metric_Tracking_Object' ,
@@ -93,7 +104,7 @@ def test_bandwidth_report(self):
93104 'public_out' : 20 ,
94105 'type' : 'pool' ,
95106 }, {
96- 'name' : 'pool2 ' ,
107+ 'name' : 'pool3 ' ,
97108 'pool' : None ,
98109 'private_in' : 30 ,
99110 'private_out' : 40 ,
@@ -109,7 +120,7 @@ def test_bandwidth_report(self):
109120 'public_out' : 20 ,
110121 'type' : 'virtual' ,
111122 }, {
112- 'name' : 'host1 ' ,
123+ 'name' : 'host3 ' ,
113124 'pool' : 2 ,
114125 'private_in' : 30 ,
115126 'private_out' : 40 ,
@@ -125,7 +136,7 @@ def test_bandwidth_report(self):
125136 'public_out' : 20 ,
126137 'type' : 'hardware' ,
127138 }, {
128- 'name' : 'host1 ' ,
139+ 'name' : 'host3 ' ,
129140 'pool' : None ,
130141 'private_in' : 30 ,
131142 'private_out' : 40 ,
@@ -145,19 +156,19 @@ def test_bandwidth_report(self):
145156 identifier = 1 )
146157 self .assert_called_with ('SoftLayer_Metric_Tracking_Object' ,
147158 'getSummaryData' ,
148- identifier = 2 )
159+ identifier = 3 )
149160 self .assert_called_with ('SoftLayer_Metric_Tracking_Object' ,
150161 'getSummaryData' ,
151162 identifier = 101 )
152163 self .assert_called_with ('SoftLayer_Metric_Tracking_Object' ,
153164 'getSummaryData' ,
154- identifier = 102 )
165+ identifier = 103 )
155166 self .assert_called_with ('SoftLayer_Metric_Tracking_Object' ,
156167 'getSummaryData' ,
157168 identifier = 201 )
158169 self .assert_called_with ('SoftLayer_Metric_Tracking_Object' ,
159170 'getSummaryData' ,
160- identifier = 202 )
171+ identifier = 203 )
161172 call = self .calls ('SoftLayer_Metric_Tracking_Object' , 'getSummaryData' ,
162173 identifier = 1 )[0 ]
163174 expected_args = (
0 commit comments