osi-dump 0.1.3.1.4__py3-none-any.whl → 0.1.3.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- osi_dump/api/octavia.py +2 -0
- osi_dump/exporter/hypervisor/excel_hypervisor_exporter.py +2 -0
- osi_dump/importer/hypervisor/openstack_hypervisor_importer.py +18 -23
- osi_dump/model/hypervisor.py +1 -3
- {osi_dump-0.1.3.1.4.dist-info → osi_dump-0.1.3.1.6.dist-info}/METADATA +1 -1
- {osi_dump-0.1.3.1.4.dist-info → osi_dump-0.1.3.1.6.dist-info}/RECORD +9 -9
- {osi_dump-0.1.3.1.4.dist-info → osi_dump-0.1.3.1.6.dist-info}/WHEEL +0 -0
- {osi_dump-0.1.3.1.4.dist-info → osi_dump-0.1.3.1.6.dist-info}/entry_points.txt +0 -0
- {osi_dump-0.1.3.1.4.dist-info → osi_dump-0.1.3.1.6.dist-info}/top_level.txt +0 -0
osi_dump/api/octavia.py
CHANGED
@@ -21,6 +21,8 @@ class ExcelHypervisorExporter(HypervisorExporter):
|
|
21
21
|
def export_hypervisors(self, hypervisors: list[Hypervisor]):
|
22
22
|
df = pd.DataFrame([hypervisor.model_dump() for hypervisor in hypervisors])
|
23
23
|
|
24
|
+
df = util.expand_list_column(df, "aggregates")
|
25
|
+
|
24
26
|
logger.info(f"Exporting hypervisors for {self.sheet_name}")
|
25
27
|
try:
|
26
28
|
util.export_data_excel(self.output_file, sheet_name=self.sheet_name, df=df)
|
@@ -59,16 +59,7 @@ class OpenStackHypervisorImporter(HypervisorImporter):
|
|
59
59
|
def _get_hypervisor_info(
|
60
60
|
self, hypervisor: OSHypervisor, aggregates: list[OSAggregate]
|
61
61
|
) -> Hypervisor:
|
62
|
-
|
63
|
-
|
64
|
-
aggregate_id = None
|
65
|
-
aggregate_name = None
|
66
|
-
availability_zone = None
|
67
|
-
|
68
|
-
if aggregate:
|
69
|
-
aggregate_id = aggregate.id
|
70
|
-
aggregate_name = aggregate.name
|
71
|
-
availability_zone = aggregate.availability_zone
|
62
|
+
aggregate_list = self._get_aggregates(hypervisor=hypervisor)
|
72
63
|
|
73
64
|
placement_proxy: PlacementProxy = self.connection.placement
|
74
65
|
|
@@ -97,24 +88,28 @@ class OpenStackHypervisorImporter(HypervisorImporter):
|
|
97
88
|
memory_usage=usage_data["MEMORY_MB"],
|
98
89
|
local_disk_usage=usage_data["DISK_GB"],
|
99
90
|
vm_count=len(hypervisor.servers),
|
100
|
-
|
101
|
-
aggregate_name=aggregate_name,
|
102
|
-
availability_zone=availability_zone,
|
91
|
+
aggregates=aggregate_list,
|
103
92
|
)
|
104
93
|
|
105
94
|
return ret_hypervisor
|
106
95
|
|
107
|
-
def
|
108
|
-
|
96
|
+
def _get_aggregates(self, hypervisor: OSHypervisor):
|
97
|
+
aggregates_ret = []
|
109
98
|
|
110
|
-
|
99
|
+
aggregates: OSAggregate = list(self.connection.list_aggregates())
|
111
100
|
|
112
101
|
for aggregate in aggregates:
|
113
102
|
if hypervisor.name in aggregate.hosts:
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
103
|
+
aggregates_ret.append(
|
104
|
+
{
|
105
|
+
"id": aggregate.id,
|
106
|
+
"name": aggregate.name,
|
107
|
+
"availability_zone": aggregate.availability_zone,
|
108
|
+
}
|
109
|
+
)
|
110
|
+
|
111
|
+
aggregates_ret = [
|
112
|
+
dict(sorted(aggregate.items())) for aggregate in aggregates_ret
|
113
|
+
]
|
114
|
+
|
115
|
+
return aggregates_ret
|
osi_dump/model/hypervisor.py
CHANGED
@@ -3,7 +3,7 @@ osi_dump/__main__.py,sha256=fCVTLFipB-P0872_4j7iOJNNosOMBj3YdHr8TH_fhRY,71
|
|
3
3
|
osi_dump/cli.py,sha256=vLijmcrWieCVK4cSLN2sK9ltWlercw9Zg6yBEvZtPkg,6379
|
4
4
|
osi_dump/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
osi_dump/api/neutron.py,sha256=xRhNkEBDzOoUQHSWmkoI_Tdbcs8kvdS0UpPNkzxQv3g,1170
|
6
|
-
osi_dump/api/octavia.py,sha256
|
6
|
+
osi_dump/api/octavia.py,sha256=F03c9WaQpKbWOjCvFndZYStClfbhaGyYnIxtgqs1bQ0,1137
|
7
7
|
osi_dump/api/placement.py,sha256=UvIGwAvowmCLobVARut8WnLVV-IdCDniyW9y16l2B_I,523
|
8
8
|
osi_dump/batch_handler/__init__.py,sha256=wsiE42GCjbKgXBzpiahWEDF_-IXCKzr6PyrLn0oEKSc,288
|
9
9
|
osi_dump/batch_handler/external_port_batch_handler.py,sha256=iGm0htGbLkpTX5RFPcrvXrVVn0eeTpavN3u4s58Z_pE,1783
|
@@ -28,7 +28,7 @@ osi_dump/exporter/floating_ip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
28
28
|
osi_dump/exporter/floating_ip/excel_floating_ip_exporter.py,sha256=Bn1yZTvZ8dP3EhVHW-Pr4O9TC2Cz2RbJaz_vRE66xTQ,975
|
29
29
|
osi_dump/exporter/floating_ip/floating_ip_exporter.py,sha256=5qh4xS6m1Gfu2N3WcfkEu6U38qtc6oLWAsnNhSwXTCo,169
|
30
30
|
osi_dump/exporter/hypervisor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
|
-
osi_dump/exporter/hypervisor/excel_hypervisor_exporter.py,sha256=
|
31
|
+
osi_dump/exporter/hypervisor/excel_hypervisor_exporter.py,sha256=N81LQR2G4m-w4U6MNNE7zuR-jMxSB1VA7OOuVceJQMA,1020
|
32
32
|
osi_dump/exporter/hypervisor/hypervisor_exporter.py,sha256=HS3U-M-iv-ixNLfkGoaGdjdgHXXTBAjgtWQ_OhVY2xQ,167
|
33
33
|
osi_dump/exporter/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
34
|
osi_dump/exporter/image/excel_image_exporter.py,sha256=S_9UScZKI4N8xe8oXjNfnV2Eh7_llg7tOPR7H0hGVnA,853
|
@@ -62,7 +62,7 @@ osi_dump/importer/floating_ip/floating_ip_importer.py,sha256=2_lCZYF-r2dgdL4Yzws
|
|
62
62
|
osi_dump/importer/floating_ip/openstack_floating_ip_importer.py,sha256=xuALHyiyb4LdRgFN0hZvOx0pImKpGsLUtPWW_1q52gc,2286
|
63
63
|
osi_dump/importer/hypervisor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
64
64
|
osi_dump/importer/hypervisor/hypervisor_importer.py,sha256=JuoJBltqFYhH-Ql9TLUPHX2YurS0JFV7Augrc6bDJ5Q,206
|
65
|
-
osi_dump/importer/hypervisor/openstack_hypervisor_importer.py,sha256=
|
65
|
+
osi_dump/importer/hypervisor/openstack_hypervisor_importer.py,sha256=Y2odXpQLjtvdfj9zMbQ-Yi-hqsqBg5sZ8SWjE3O7mdg,3826
|
66
66
|
osi_dump/importer/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
67
67
|
osi_dump/importer/image/image_importer.py,sha256=6zwAMnS58S2HGwARwebqf4VE9IBQBv5Ot6nmcn9H4fY,181
|
68
68
|
osi_dump/importer/image/openstack_image_importer.py,sha256=ffc13qnIGu07OXnIPaKiVxGdufep82RfQoKqLb1bwHc,2455
|
@@ -89,7 +89,7 @@ osi_dump/model/authentication_info.py,sha256=02kXxtILfjh8t45_-bPM8rtyRk2cQcJK6l2
|
|
89
89
|
osi_dump/model/external_port.py,sha256=4FlyG8ZmQO7nNdavmRBhK8ZMsNogmhMqEBa03okvqXM,477
|
90
90
|
osi_dump/model/flavor.py,sha256=bV1DAL0fMN-bZ0Is7Cd-LLuEdL1ihVPeGcLvbhOcB-I,301
|
91
91
|
osi_dump/model/floating_ip.py,sha256=CRJufC5ZaxxcbGvdot7Af-sO8uyKbyQK9zHljfBnyFA,427
|
92
|
-
osi_dump/model/hypervisor.py,sha256=
|
92
|
+
osi_dump/model/hypervisor.py,sha256=QfoXpvR2GqGZrEP63wYFyC2251dxOEM0fo-tJR1pPPA,418
|
93
93
|
osi_dump/model/image.py,sha256=JUr90XQgA6d3EyoZyV-Cyz4Y1GkEBIDhALsf-_eoR-Y,524
|
94
94
|
osi_dump/model/instance.py,sha256=ixJUGMsNAsWIRSXXHZ2fHA9Wr1wPYZONyEhS75wfQp8,577
|
95
95
|
osi_dump/model/load_balancer.py,sha256=T5RU6gm36ePYCh3KQ_OYO44FHMfxTcSNaiuKP5E_9CY,352
|
@@ -108,8 +108,8 @@ osi_dump/util/extract_hostname.py,sha256=IpdklGHevmtRu67xeSRE_5n2mvWGI1sDsnJwExo
|
|
108
108
|
osi_dump/util/openstack_util.py,sha256=mPWLoVdSg4mukqtX87fN0Q9aDcRicJIqIsIOIIu1PnY,591
|
109
109
|
osi_dump/util/panda_excel.py,sha256=GHHLguKLMm1sq4FHTPHABTjx7IqpOcGF_3OJT-cJORE,1011
|
110
110
|
osi_dump/util/validate_dir_path.py,sha256=pL_OrY8JnNwk3vj6Zp6bsZtgHXhszSGRoqIt-1G5S90,507
|
111
|
-
osi_dump-0.1.3.1.
|
112
|
-
osi_dump-0.1.3.1.
|
113
|
-
osi_dump-0.1.3.1.
|
114
|
-
osi_dump-0.1.3.1.
|
115
|
-
osi_dump-0.1.3.1.
|
111
|
+
osi_dump-0.1.3.1.6.dist-info/METADATA,sha256=uxdStaObiBhZVLiVJMkC03t8LF-0E182pMpwSY9_Oxc,677
|
112
|
+
osi_dump-0.1.3.1.6.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
113
|
+
osi_dump-0.1.3.1.6.dist-info/entry_points.txt,sha256=ozm5sIBtXzLv6_FiUe26v1BgA3_xUReGLPhKQKZ56wQ,46
|
114
|
+
osi_dump-0.1.3.1.6.dist-info/top_level.txt,sha256=OtAAwmJfcoPvlw_Cemo_H1aXIGV_7w0O2941KQt6faQ,9
|
115
|
+
osi_dump-0.1.3.1.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|