osism 0.20250425.0__py3-none-any.whl → 0.20250505.0__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.
- osism/tasks/conductor.py +0 -60
- osism/tasks/openstack.py +0 -41
- {osism-0.20250425.0.dist-info → osism-0.20250505.0.dist-info}/METADATA +3 -3
- {osism-0.20250425.0.dist-info → osism-0.20250505.0.dist-info}/RECORD +10 -10
- {osism-0.20250425.0.dist-info → osism-0.20250505.0.dist-info}/WHEEL +1 -1
- osism-0.20250505.0.dist-info/pbr.json +1 -0
- osism-0.20250425.0.dist-info/pbr.json +0 -1
- {osism-0.20250425.0.dist-info → osism-0.20250505.0.dist-info}/entry_points.txt +0 -0
- {osism-0.20250425.0.dist-info → osism-0.20250505.0.dist-info}/licenses/AUTHORS +0 -0
- {osism-0.20250425.0.dist-info → osism-0.20250505.0.dist-info}/licenses/LICENSE +0 -0
- {osism-0.20250425.0.dist-info → osism-0.20250505.0.dist-info}/top_level.txt +0 -0
osism/tasks/conductor.py
CHANGED
@@ -198,11 +198,6 @@ def sync_netbox_with_ironic(self, force_update=False):
|
|
198
198
|
logger.info(
|
199
199
|
f"Cleaning up baremetal node not found in netbox: {node['Name']}"
|
200
200
|
)
|
201
|
-
flavor_name = "osism-" + node["Name"]
|
202
|
-
flavor = openstack.compute_flavor_get(flavor_name)
|
203
|
-
if flavor:
|
204
|
-
logger.info(f"Deleting flavor {flavor_name}")
|
205
|
-
openstack.compute_flavor_delete(flavor)
|
206
201
|
for port in openstack.baremetal_port_list(
|
207
202
|
details=False, attributes=dict(node_uuid=node["UUID"])
|
208
203
|
):
|
@@ -271,19 +266,6 @@ def sync_netbox_with_ironic(self, force_update=False):
|
|
271
266
|
for interface in node_interfaces
|
272
267
|
if interface.enabled and not interface.mgmt_only and interface.mac_address
|
273
268
|
]
|
274
|
-
flavor_attributes = {
|
275
|
-
"ram": 1,
|
276
|
-
"disk": 0,
|
277
|
-
"vcpus": 1,
|
278
|
-
"is_public": False,
|
279
|
-
"extra_specs": {
|
280
|
-
"resources:CUSTOM_"
|
281
|
-
+ device.name.upper().replace("-", "_").replace(".", "_"): "1",
|
282
|
-
"resources:VCPU": "0",
|
283
|
-
"resources:MEMORY_MB": "0",
|
284
|
-
"resources:DISK_GB": "0",
|
285
|
-
},
|
286
|
-
}
|
287
269
|
|
288
270
|
lock = Redlock(
|
289
271
|
key=f"lock_osism_tasks_conductor_sync_netbox_with_ironic-{device.name}",
|
@@ -413,48 +395,6 @@ def sync_netbox_with_ironic(self, force_update=False):
|
|
413
395
|
logger.info(
|
414
396
|
f"Validation of management interface failed for baremetal node for {device.name}\nReason: {node_validation['management'].reason}"
|
415
397
|
)
|
416
|
-
|
417
|
-
flavor_name = "osism-" + device.name
|
418
|
-
flavor = openstack.compute_flavor_get(flavor_name)
|
419
|
-
if not flavor:
|
420
|
-
logger.info(f"Creating flavor for {flavor_name}")
|
421
|
-
flavor = openstack.compute_flavor_create(
|
422
|
-
flavor_name, flavor_attributes
|
423
|
-
)
|
424
|
-
else:
|
425
|
-
flavor_updates = {}
|
426
|
-
deep_compare(flavor_attributes, flavor, flavor_updates)
|
427
|
-
flavor_updates_extra_specs = flavor_updates.pop("extra_specs", None)
|
428
|
-
if flavor_updates:
|
429
|
-
logger.info(
|
430
|
-
f"Updating flavor for {device.name} with {flavor_updates}"
|
431
|
-
)
|
432
|
-
openstack.compute_flavor_delete(flavor)
|
433
|
-
flavor = openstack.compute_flavor_create(
|
434
|
-
flavor_name, flavor_attributes
|
435
|
-
)
|
436
|
-
elif flavor_updates_extra_specs:
|
437
|
-
logger.info(
|
438
|
-
f"Updating flavor extra_specs for {device.name} with {flavor_updates_extra_specs}"
|
439
|
-
)
|
440
|
-
openstack.compute_flavor_update_extra_specs(
|
441
|
-
flavor, flavor_updates_extra_specs
|
442
|
-
)
|
443
|
-
flavor = openstack.compute_flavor_get(flavor_name)
|
444
|
-
for extra_specs_key in flavor["extra_specs"].keys():
|
445
|
-
if (
|
446
|
-
extra_specs_key
|
447
|
-
not in flavor_attributes["extra_specs"].keys()
|
448
|
-
):
|
449
|
-
logger.info(
|
450
|
-
f"Deleting flavor extra_specs property {extra_specs_key} for {device.name}"
|
451
|
-
)
|
452
|
-
flavor = (
|
453
|
-
openstack.compute_flavor_delete_extra_specs_property(
|
454
|
-
flavor, extra_specs_key
|
455
|
-
)
|
456
|
-
)
|
457
|
-
|
458
398
|
except Exception as exc:
|
459
399
|
logger.info(
|
460
400
|
f"Could not fully synchronize device {device.name} with ironic: {exc}"
|
osism/tasks/openstack.py
CHANGED
@@ -136,47 +136,6 @@ def baremetal_port_delete(self, port_or_id):
|
|
136
136
|
return result
|
137
137
|
|
138
138
|
|
139
|
-
@app.task(bind=True, name="osism.tasks.openstack.compute_flavor_get")
|
140
|
-
def compute_flavor_get(self, name_or_id):
|
141
|
-
conn = utils.get_openstack_connection()
|
142
|
-
result = conn.compute.find_flavor(
|
143
|
-
name_or_id, ignore_missing=True, get_extra_specs=True
|
144
|
-
)
|
145
|
-
return result
|
146
|
-
|
147
|
-
|
148
|
-
@app.task(bind=True, name="osism.tasks.openstack.compute_flavor_create")
|
149
|
-
def compute_flavor_create(self, name, attributes=None):
|
150
|
-
if attributes is None:
|
151
|
-
attributes = {}
|
152
|
-
attributes.update({"name": name})
|
153
|
-
extra_specs = attributes.pop("extra_specs", None)
|
154
|
-
conn = utils.get_openstack_connection()
|
155
|
-
flavor = conn.compute.create_flavor(**attributes)
|
156
|
-
if extra_specs:
|
157
|
-
flavor = conn.compute.create_flavor_extra_specs(flavor, extra_specs)
|
158
|
-
return flavor
|
159
|
-
|
160
|
-
|
161
|
-
@app.task(bind=True, name="osism.tasks.openstack.compute_flavor_delete")
|
162
|
-
def compute_flavor_delete(self, flavor):
|
163
|
-
conn = utils.get_openstack_connection()
|
164
|
-
conn.compute.delete_flavor(flavor, ignore_missing=True)
|
165
|
-
|
166
|
-
|
167
|
-
@app.task(bind=True, name="osism.tasks.openstack.compute_flavor_update_extra_specs")
|
168
|
-
def compute_flavor_update_extra_specs(self, flavor, extra_specs={}):
|
169
|
-
conn = utils.get_openstack_connection()
|
170
|
-
for key, value in extra_specs.items():
|
171
|
-
conn.compute.update_flavor_extra_specs_property(flavor, key, value)
|
172
|
-
|
173
|
-
|
174
|
-
@app.task(bind=True, name="osism.tasks.openstack.compute_flavor_delete_extra_specs")
|
175
|
-
def compute_flavor_delete_extra_specs_property(self, flavor, prop):
|
176
|
-
conn = utils.get_openstack_connection()
|
177
|
-
conn.compute.delete_flavor_extra_specs_property(flavor, prop)
|
178
|
-
|
179
|
-
|
180
139
|
@app.task(bind=True, name="osism.tasks.openstack.image_manager")
|
181
140
|
def image_manager(
|
182
141
|
self,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: osism
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.20250505.0
|
4
4
|
Summary: OSISM manager interface
|
5
5
|
Home-page: https://github.com/osism/python-osism
|
6
6
|
Author: OSISM GmbH
|
@@ -27,7 +27,7 @@ Requires-Dist: GitPython==3.1.44
|
|
27
27
|
Requires-Dist: Jinja2==3.1.6
|
28
28
|
Requires-Dist: PyYAML==6.0.2
|
29
29
|
Requires-Dist: ara==1.7.2
|
30
|
-
Requires-Dist: celery[redis]==5.5.
|
30
|
+
Requires-Dist: celery[redis]==5.5.2
|
31
31
|
Requires-Dist: cliff==4.9.1
|
32
32
|
Requires-Dist: deepdiff==8.4.2
|
33
33
|
Requires-Dist: docker==7.1.0
|
@@ -50,7 +50,7 @@ Requires-Dist: pydantic==1.10.22
|
|
50
50
|
Requires-Dist: pynetbox==7.4.1
|
51
51
|
Requires-Dist: pytest-testinfra==10.2.2
|
52
52
|
Requires-Dist: python-dateutil==2.9.0.post0
|
53
|
-
Requires-Dist: setuptools==
|
53
|
+
Requires-Dist: setuptools==80.3.1
|
54
54
|
Requires-Dist: sqlmodel==0.0.24
|
55
55
|
Requires-Dist: sushy==5.5.0
|
56
56
|
Requires-Dist: tabulate==0.9.0
|
@@ -38,18 +38,18 @@ osism/services/listener.py,sha256=eEamlQsJqCuU9K2QFmk3yM9LAJZEanVcTLtGMsNCKjs,97
|
|
38
38
|
osism/tasks/__init__.py,sha256=ZEu_KYsapTYp0etr-rLqie_NT_LndHDDpx53xITru5Y,8691
|
39
39
|
osism/tasks/ansible.py,sha256=RcLxLrjzL5_X6OjNHm3H0lZlmKKlYKIANB0M4_d4chE,1109
|
40
40
|
osism/tasks/ceph.py,sha256=eIQkah3Kj4INtOkF9kTjHbXJ3_J2lg48EWJKfHc-UYw,615
|
41
|
-
osism/tasks/conductor.py,sha256=
|
41
|
+
osism/tasks/conductor.py,sha256=jtvw5UfhPOPEbIBkIyBkiHbaPJsNKbEABbc3FtHYOo4,18210
|
42
42
|
osism/tasks/kolla.py,sha256=wJQpWn_01iWLkr7l7T7RNrQGfRgsgmYi4WQlTmNGvew,618
|
43
43
|
osism/tasks/kubernetes.py,sha256=VzXq_VrYU_CLm4cOruqnE3Kq2ydfO9glZ3p0bp3OYoc,625
|
44
44
|
osism/tasks/netbox.py,sha256=QVOLiTH2Su237YAS0QfXbQ86E-OA1JzrFDfyi9JBmvk,5658
|
45
|
-
osism/tasks/openstack.py,sha256=
|
45
|
+
osism/tasks/openstack.py,sha256=g15tCll5vP1pC6ysxRCTZxplsdGmXbxaCH3k1Qdv5Xg,6367
|
46
46
|
osism/tasks/reconciler.py,sha256=RGUcax2gDuyVLw1nGRQn5izXclnPBo9MRl0ndLDiiYQ,2707
|
47
47
|
osism/utils/__init__.py,sha256=_uhe9ghqAJ2me0p187X-vzJ2Nh_Hpmfw3D6HU4kKa10,3759
|
48
|
-
osism-0.
|
49
|
-
osism-0.
|
50
|
-
osism-0.
|
51
|
-
osism-0.
|
52
|
-
osism-0.
|
53
|
-
osism-0.
|
54
|
-
osism-0.
|
55
|
-
osism-0.
|
48
|
+
osism-0.20250505.0.dist-info/licenses/AUTHORS,sha256=DJIRsjyrFxKjFvmpUNDRDBS04nRiJ5B6FpKcDcfnoGM,36
|
49
|
+
osism-0.20250505.0.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
50
|
+
osism-0.20250505.0.dist-info/METADATA,sha256=9UPuB22oJMzuSpvDxVYVXTun60Wz4uBvtE7fMUKJKBY,2972
|
51
|
+
osism-0.20250505.0.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
52
|
+
osism-0.20250505.0.dist-info/entry_points.txt,sha256=DlfrvU14rI55WuTrwNRoce9FY3ric4HeZKZx_Z3NzCw,3015
|
53
|
+
osism-0.20250505.0.dist-info/pbr.json,sha256=xWRK5iE40MX99mSkANXdqP33gzUrHwuP4JmJG0hUNMA,47
|
54
|
+
osism-0.20250505.0.dist-info/top_level.txt,sha256=8L8dsI9hcaGHsdnR4k_LN9EM78EhwrXRFHyAryPXZtY,6
|
55
|
+
osism-0.20250505.0.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
{"git_version": "6139ca4", "is_release": false}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"git_version": "121615f", "is_release": false}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|