low = numpy.array([float(m[1]) for m in metrics])
high = numpy.array([float(m[2]) for m in metrics])
error = [y - low, high - y]
- x = list(range(1,runs + 1))
+ x = range(1,runs + 1)
# plot average RTT and confidence interval for each iteration
pyplot.errorbar(x, y, yerr = error, fmt='o')
slice_res = self.get_slice_resources(slicename)['resource']
if slice_res:
if len(slice_res[0]['services']) != 0:
- # 2to3 added list() and it is useful
- slice_res_hrn = list(self.get_resources_hrn(slice_res).values())
+ slice_res_hrn = self.get_resources_hrn(slice_res).values()
if self._compare_lists(slice_res_hrn, resources_hrn):
return True
else: return len(slice_res_hrn)
r_info = self.api.get_resource_info(fields=fields)
value = r_info[10]
- self.assertEqual(list(value.keys()), fields)
+ self.assertEqual(value.keys(), fields)
# query with 2 filters and 2 fields
r_info = self.api.get_resource_info(filters, fields)
def gen_auth_keys(pubkey, output, environ):
#opts = ['from="127.0.0.1/32"'] # fails in stupid yans setup
opts = []
- for k, v in list(environ.items()):
+ for k, v in environ.items():
opts.append('environment="%s=%s"' % (k, v))
with open(pubkey) as f: