cleanup(inventory): Use dicts where possible

Use dicts instead of ResourceFields where possible to allow
easier serialization/deserialization of objects fetched from the K8S
API.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
Felix Matouschek
2024-07-04 16:26:53 +02:00
parent 033f373c94
commit c4570b2089
10 changed files with 221 additions and 167 deletions

View File

@@ -22,7 +22,9 @@ BASE_VMI = {
"metadata": {
"name": "testvmi",
"namespace": "default",
"uid": "e86c603c-fb13-4933-bf67-de100bdba0c3",
},
"spec": {},
"status": {
"interfaces": [{"ipAddress": "10.10.10.10"}],
},

View File

@@ -21,7 +21,9 @@ VMI = {
"metadata": {
"name": "testvmi",
"namespace": "default",
"uid": "6ffdef43-6c39-4441-a088-82d319ea5c13",
},
"spec": {},
"status": {
"interfaces": [{"ipAddress": "10.10.10.10"}],
"migrationMethod": "BlockMigration",

View File

@@ -24,6 +24,7 @@ VM1 = {
"uid": "940003aa-0160-4b7e-9e55-8ec3df72047f",
},
"spec": {"running": True},
"status": {},
}
VM2 = {
@@ -33,6 +34,7 @@ VM2 = {
"uid": "c2c68de5-b9d7-4c25-872f-462e7245b3e6",
},
"spec": {"running": False},
"status": {},
}
VMI1 = {
@@ -41,6 +43,7 @@ VMI1 = {
"namespace": "default",
"uid": "a84319a9-db31-4a36-9b66-3e387578f871",
},
"spec": {},
"status": {
"interfaces": [{"ipAddress": "10.10.10.10"}],
},