Compare commits
	
		
			2 Commits
		
	
	
		
			02a2f6a27a
			...
			68954a79ec
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 68954a79ec | |||
| a2fa6ed450 | 
@@ -1442,11 +1442,17 @@ def create_vm(
 | 
				
			|||||||
                )
 | 
					                )
 | 
				
			||||||
            if not volume["pool"] in pools:
 | 
					            if not volume["pool"] in pools:
 | 
				
			||||||
                pools[volume["pool"]] = int(
 | 
					                pools[volume["pool"]] = int(
 | 
				
			||||||
                    volume_data["stats"]["size"].replace("G", "")
 | 
					                    pvc_ceph.format_bytes_fromhuman(volume_data["stats"]["size"])
 | 
				
			||||||
 | 
					                    / 1024
 | 
				
			||||||
 | 
					                    / 1024
 | 
				
			||||||
 | 
					                    / 1024
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                pools[volume["pool"]] += int(
 | 
					                pools[volume["pool"]] += int(
 | 
				
			||||||
                    volume_data["stats"]["size"].replace("G", "")
 | 
					                    pvc_ceph.format_bytes_fromhuman(volume_data["stats"]["size"])
 | 
				
			||||||
 | 
					                    / 1024
 | 
				
			||||||
 | 
					                    / 1024
 | 
				
			||||||
 | 
					                    / 1024
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            if not volume["pool"] in pools:
 | 
					            if not volume["pool"] in pools:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import math
 | 
					import math
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from json import dumps
 | 
					from json import dumps, loads
 | 
				
			||||||
from requests_toolbelt.multipart.encoder import (
 | 
					from requests_toolbelt.multipart.encoder import (
 | 
				
			||||||
    MultipartEncoder,
 | 
					    MultipartEncoder,
 | 
				
			||||||
    MultipartEncoderMonitor,
 | 
					    MultipartEncoderMonitor,
 | 
				
			||||||
@@ -1648,6 +1648,8 @@ def ceph_benchmark_list(config, job):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_benchmark_list_results_legacy(benchmark_data):
 | 
					def get_benchmark_list_results_legacy(benchmark_data):
 | 
				
			||||||
 | 
					    if isinstance(benchmark_data, str):
 | 
				
			||||||
 | 
					        benchmark_data = loads(benchmark_data)
 | 
				
			||||||
    benchmark_bandwidth = dict()
 | 
					    benchmark_bandwidth = dict()
 | 
				
			||||||
    benchmark_iops = dict()
 | 
					    benchmark_iops = dict()
 | 
				
			||||||
    for test in ["seq_read", "seq_write", "rand_read_4K", "rand_write_4K"]:
 | 
					    for test in ["seq_read", "seq_write", "rand_read_4K", "rand_write_4K"]:
 | 
				
			||||||
@@ -1732,7 +1734,7 @@ def format_list_benchmark(config, benchmark_information):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    for benchmark in benchmark_information:
 | 
					    for benchmark in benchmark_information:
 | 
				
			||||||
        benchmark_job = benchmark["job"]
 | 
					        benchmark_job = benchmark["job"]
 | 
				
			||||||
        benchmark_format = benchmark["test_format"]  # noqa: F841
 | 
					        benchmark_format = benchmark.get("test_format", 0)  # noqa: F841
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        _benchmark_job_length = len(benchmark_job)
 | 
					        _benchmark_job_length = len(benchmark_job)
 | 
				
			||||||
        if _benchmark_job_length > benchmark_job_length:
 | 
					        if _benchmark_job_length > benchmark_job_length:
 | 
				
			||||||
@@ -1837,7 +1839,7 @@ def format_list_benchmark(config, benchmark_information):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    for benchmark in benchmark_information:
 | 
					    for benchmark in benchmark_information:
 | 
				
			||||||
        benchmark_job = benchmark["job"]
 | 
					        benchmark_job = benchmark["job"]
 | 
				
			||||||
        benchmark_format = benchmark["test_format"]  # noqa: F841
 | 
					        benchmark_format = benchmark.get("test_format", 0)  # noqa: F841
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if benchmark["benchmark_result"] == "Running":
 | 
					        if benchmark["benchmark_result"] == "Running":
 | 
				
			||||||
            seq_benchmark_bandwidth = "Running"
 | 
					            seq_benchmark_bandwidth = "Running"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user