- Standardized string quotes across multiple files to use double quotes for consistency. - Improved formatting of JSON dumps in mock data for better readability. - Enhanced the structure of various functions and data definitions for clarity. - Updated test cases to reflect changes in data structure and ensure accuracy.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Mock context for dashboard when USE_MOCK_DATA is enabled (no OpenStack/Prometheus)."""
|
||||
|
||||
import json
|
||||
|
||||
|
||||
@@ -35,15 +36,17 @@ def get_mock_context():
|
||||
"scope": "Full Cluster",
|
||||
"cpu_weight": "1.0",
|
||||
"ram_weight": "1.0",
|
||||
"migrations": json.dumps([
|
||||
{
|
||||
"instanceName": "instance-1",
|
||||
"source": "compute-0",
|
||||
"destination": "compute-3",
|
||||
"flavor": "m1.small",
|
||||
"impact": "Low",
|
||||
}
|
||||
]),
|
||||
"migrations": json.dumps(
|
||||
[
|
||||
{
|
||||
"instanceName": "instance-1",
|
||||
"source": "compute-0",
|
||||
"destination": "compute-3",
|
||||
"flavor": "m1.small",
|
||||
"impact": "Low",
|
||||
}
|
||||
]
|
||||
),
|
||||
"host_labels": json.dumps(host_labels),
|
||||
"cpu_current": json.dumps(cpu_current),
|
||||
"cpu_projected": json.dumps(cpu_projected),
|
||||
|
||||
Reference in New Issue
Block a user