osi-dump 0.1.3.1.2__py3-none-any.whl → 0.1.3.1.4__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.
@@ -107,8 +107,14 @@ class OpenStackHypervisorImporter(HypervisorImporter):
107
107
  def _get_aggregate(self, hypervisor: OSHypervisor) -> OSAggregate:
108
108
  aggregates = list(self.connection.list_aggregates())
109
109
 
110
+ aggregate_hypervisors: list[OSAggregate] = []
111
+
110
112
  for aggregate in aggregates:
111
113
  if hypervisor.name in aggregate.hosts:
112
- return aggregate
114
+ aggregate_hypervisors.append(aggregate)
115
+
116
+ for aggregate_hypervisor in aggregate_hypervisors:
117
+ if aggregate_hypervisor.availability_zone != None:
118
+ return aggregate_hypervisor
113
119
 
114
- return None
120
+ return aggregate_hypervisors[0]
@@ -20,6 +20,6 @@ class Hypervisor(BaseModel):
20
20
 
21
21
  availability_zone: Optional[str]
22
22
  aggregate_name: Optional[str]
23
- aggregate_id: Optional[str]
23
+ aggregate_id: Optional[int]
24
24
 
25
25
  vm_count: int
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: osi-dump
3
- Version: 0.1.3.1.2
3
+ Version: 0.1.3.1.4
4
4
  Summary: OpenStack information dump tool
5
5
  Author: TVKain
6
6
  License: Apache-2.0
@@ -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=SZr1m2P--FYPmTBQ9dXzLgxTfJgpmURWevV9aokjGyI,3785
65
+ osi_dump/importer/hypervisor/openstack_hypervisor_importer.py,sha256=_v9WPEDVxJ6t0OKCCYpz06p5bDR4YB2ySLmijFe7Bg0,4050
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=NNvOl-msUhPSEJ3kpV4h7XNsdBybaHOqvJEMy17FNWg,468
92
+ osi_dump/model/hypervisor.py,sha256=asqY5EcjcFRgggUdiPMiEbffT7q7z8_5BwuZk7GBha0,468
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.2.dist-info/METADATA,sha256=pLbq5ExaJuIo9Y0dQm6MKjvedPTSFz43N5bOoKrIZD0,677
112
- osi_dump-0.1.3.1.2.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
113
- osi_dump-0.1.3.1.2.dist-info/entry_points.txt,sha256=ozm5sIBtXzLv6_FiUe26v1BgA3_xUReGLPhKQKZ56wQ,46
114
- osi_dump-0.1.3.1.2.dist-info/top_level.txt,sha256=OtAAwmJfcoPvlw_Cemo_H1aXIGV_7w0O2941KQt6faQ,9
115
- osi_dump-0.1.3.1.2.dist-info/RECORD,,
111
+ osi_dump-0.1.3.1.4.dist-info/METADATA,sha256=oYkhxCIozqxh_-XHsg9ZxL5fZEGaYKw2aeYz-XkKpt4,677
112
+ osi_dump-0.1.3.1.4.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
113
+ osi_dump-0.1.3.1.4.dist-info/entry_points.txt,sha256=ozm5sIBtXzLv6_FiUe26v1BgA3_xUReGLPhKQKZ56wQ,46
114
+ osi_dump-0.1.3.1.4.dist-info/top_level.txt,sha256=OtAAwmJfcoPvlw_Cemo_H1aXIGV_7w0O2941KQt6faQ,9
115
+ osi_dump-0.1.3.1.4.dist-info/RECORD,,