osism 0.20250701.0__tar.gz → 0.20250709.0__tar.gz
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-0.20250709.0/ChangeLog +7 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/Containerfile +1 -1
- {osism-0.20250701.0 → osism-0.20250709.0}/Dockerfile +1 -1
- {osism-0.20250701.0/osism.egg-info → osism-0.20250709.0}/PKG-INFO +3 -3
- {osism-0.20250701.0 → osism-0.20250709.0}/Pipfile +1 -1
- {osism-0.20250701.0 → osism-0.20250709.0}/Pipfile.lock +102 -78
- {osism-0.20250701.0 → osism-0.20250709.0}/files/sonic/config_db.json +1 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/api.py +3 -3
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/manage.py +0 -251
- osism-0.20250709.0/osism/commands/sonic.py +973 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/__init__.py +2 -7
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/ansible.py +1 -3
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/ironic.py +1 -3
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/config_generator.py +38 -14
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/netbox.py +3 -7
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/reconciler.py +3 -7
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/utils/__init__.py +28 -0
- {osism-0.20250701.0 → osism-0.20250709.0/osism.egg-info}/PKG-INFO +3 -3
- {osism-0.20250701.0 → osism-0.20250709.0}/osism.egg-info/SOURCES.txt +1 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism.egg-info/entry_points.txt +9 -1
- osism-0.20250709.0/osism.egg-info/pbr.json +1 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism.egg-info/requires.txt +2 -2
- {osism-0.20250701.0 → osism-0.20250709.0}/requirements.txt +2 -2
- {osism-0.20250701.0 → osism-0.20250709.0}/setup.cfg +9 -1
- osism-0.20250701.0/ChangeLog +0 -7
- osism-0.20250701.0/osism.egg-info/pbr.json +0 -1
- {osism-0.20250701.0 → osism-0.20250709.0}/.flake8 +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/.github/renovate.json +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/.github/workflows/publish.yml +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/.hadolint.yaml +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/.zuul.yaml +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/AUTHORS +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/LICENSE +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/README.md +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/change.sh +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/cleanup-ansible-collections.sh +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/clustershell/clush.conf +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/clustershell/groups.conf +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/data/SCS-Spec.MandatoryFlavors.verbose.yaml +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/netbox-manager/settings.toml +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/redfishMockupCreate.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/run-ansible-console.sh +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/sonic/port_config/Accton-AS4625-54T.ini +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/sonic/port_config/Accton-AS5835-54T.ini +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/sonic/port_config/Accton-AS5835-54X.ini +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/sonic/port_config/Accton-AS7326-56X.ini +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/sonic/port_config/Accton-AS7726-32X.ini +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/files/sonic/port_config/Accton-AS9716-32D.ini +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/__init__.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/__main__.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/__init__.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/apply.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/baremetal.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/compose.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/compute.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/configuration.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/console.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/container.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/get.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/log.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/netbox.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/noset.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/reconciler.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/redfish.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/server.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/service.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/set.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/status.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/sync.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/task.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/validate.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/vault.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/volume.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/wait.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/commands/worker.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/data/__init__.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/data/enums.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/data/playbooks.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/main.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/services/__init__.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/services/listener.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/settings.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/ceph.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/__init__.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/config.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/netbox.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/redfish.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/__init__.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/bgp.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/cache.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/connections.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/constants.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/device.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/exporter.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/interface.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/sonic/sync.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor/utils.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/conductor.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/kolla.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/kubernetes.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism/tasks/openstack.py +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism.egg-info/dependency_links.txt +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism.egg-info/not-zip-safe +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/osism.egg-info/top_level.txt +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/playbooks/build.yml +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/playbooks/pre.yml +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/playbooks/test-setup.yml +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/requirements.ansible.txt +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/requirements.netbox-manager.txt +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/requirements.openstack-flavor-manager.txt +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/requirements.openstack-image-manager.txt +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/requirements.yml +0 -0
- {osism-0.20250701.0 → osism-0.20250709.0}/setup.py +0 -0
@@ -7,7 +7,7 @@ FROM ${IMAGE}:${PYTHON_VERSION}-alpine${ALPINE_VERSION}
|
|
7
7
|
ENV PYTHONWARNINGS="ignore::UserWarning"
|
8
8
|
|
9
9
|
COPY . /src
|
10
|
-
COPY --from=ghcr.io/astral-sh/uv:0.7.
|
10
|
+
COPY --from=ghcr.io/astral-sh/uv:0.7.19 /uv /usr/local/bin/uv
|
11
11
|
|
12
12
|
COPY files/data /data
|
13
13
|
COPY files/change.sh /change.sh
|
@@ -7,7 +7,7 @@ FROM ${IMAGE}:${PYTHON_VERSION}-alpine${ALPINE_VERSION}
|
|
7
7
|
ENV PYTHONWARNINGS="ignore::UserWarning"
|
8
8
|
|
9
9
|
COPY . /src
|
10
|
-
COPY --from=ghcr.io/astral-sh/uv:0.7.
|
10
|
+
COPY --from=ghcr.io/astral-sh/uv:0.7.19 /uv /usr/local/bin/uv
|
11
11
|
|
12
12
|
COPY files/data /data
|
13
13
|
COPY files/change.sh /change.sh
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: osism
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.20250709.0
|
4
4
|
Summary: OSISM manager interface
|
5
5
|
Home-page: https://github.com/osism/python-osism
|
6
6
|
Author: OSISM GmbH
|
@@ -31,7 +31,7 @@ Requires-Dist: cliff==4.10.0
|
|
31
31
|
Requires-Dist: deepdiff==8.5.0
|
32
32
|
Requires-Dist: docker==7.1.0
|
33
33
|
Requires-Dist: dtrack-auditor==1.5.0
|
34
|
-
Requires-Dist: fastapi==0.
|
34
|
+
Requires-Dist: fastapi==0.116.0
|
35
35
|
Requires-Dist: flower==2.0.1
|
36
36
|
Requires-Dist: hiredis==3.2.1
|
37
37
|
Requires-Dist: jc==1.25.5
|
@@ -51,7 +51,7 @@ Requires-Dist: setuptools==80.9.0
|
|
51
51
|
Requires-Dist: sqlmodel==0.0.24
|
52
52
|
Requires-Dist: sushy==5.6.0
|
53
53
|
Requires-Dist: tabulate==0.9.0
|
54
|
-
Requires-Dist: transitions==0.9.
|
54
|
+
Requires-Dist: transitions==0.9.3
|
55
55
|
Requires-Dist: uvicorn[standard]==0.35.0
|
56
56
|
Requires-Dist: validators==0.35.0
|
57
57
|
Requires-Dist: watchdog==6.0.0
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"_meta": {
|
3
3
|
"hash": {
|
4
|
-
"sha256": "
|
4
|
+
"sha256": "0734ea0b094ceaebe6736f81feb34d4c2eeca718c6dd9eeabb51bfa09c8465dc"
|
5
5
|
},
|
6
6
|
"pipfile-spec": 6,
|
7
7
|
"requires": {},
|
@@ -376,46 +376,46 @@
|
|
376
376
|
},
|
377
377
|
"cryptography": {
|
378
378
|
"hashes": [
|
379
|
-
"sha256:
|
380
|
-
"sha256:
|
381
|
-
"sha256:
|
382
|
-
"sha256:
|
383
|
-
"sha256:
|
384
|
-
"sha256:
|
385
|
-
"sha256:
|
386
|
-
"sha256:
|
387
|
-
"sha256:
|
388
|
-
"sha256:
|
389
|
-
"sha256:
|
390
|
-
"sha256:
|
391
|
-
"sha256:
|
392
|
-
"sha256:
|
393
|
-
"sha256:
|
394
|
-
"sha256:
|
395
|
-
"sha256:
|
396
|
-
"sha256:
|
397
|
-
"sha256:
|
398
|
-
"sha256:
|
399
|
-
"sha256:
|
400
|
-
"sha256:
|
401
|
-
"sha256:
|
402
|
-
"sha256:
|
403
|
-
"sha256:
|
404
|
-
"sha256:
|
405
|
-
"sha256:
|
406
|
-
"sha256:
|
407
|
-
"sha256:
|
408
|
-
"sha256:
|
409
|
-
"sha256:
|
410
|
-
"sha256:
|
411
|
-
"sha256:
|
412
|
-
"sha256:
|
413
|
-
"sha256:
|
414
|
-
"sha256:
|
415
|
-
"sha256:
|
379
|
+
"sha256:0027d566d65a38497bc37e0dd7c2f8ceda73597d2ac9ba93810204f56f52ebc7",
|
380
|
+
"sha256:101ee65078f6dd3e5a028d4f19c07ffa4dd22cce6a20eaa160f8b5219911e7d8",
|
381
|
+
"sha256:12e55281d993a793b0e883066f590c1ae1e802e3acb67f8b442e721e475e6463",
|
382
|
+
"sha256:14d96584701a887763384f3c47f0ca7c1cce322aa1c31172680eb596b890ec30",
|
383
|
+
"sha256:1e1da5accc0c750056c556a93c3e9cb828970206c68867712ca5805e46dc806f",
|
384
|
+
"sha256:206210d03c1193f4e1ff681d22885181d47efa1ab3018766a7b32a7b3d6e6afd",
|
385
|
+
"sha256:2089cc8f70a6e454601525e5bf2779e665d7865af002a5dec8d14e561002e135",
|
386
|
+
"sha256:3a264aae5f7fbb089dbc01e0242d3b67dffe3e6292e1f5182122bdf58e65215d",
|
387
|
+
"sha256:3af26738f2db354aafe492fb3869e955b12b2ef2e16908c8b9cb928128d42c57",
|
388
|
+
"sha256:3fcfbefc4a7f332dece7272a88e410f611e79458fab97b5efe14e54fe476f4fd",
|
389
|
+
"sha256:460f8c39ba66af7db0545a8c6f2eabcbc5a5528fc1cf6c3fa9a1e44cec33385e",
|
390
|
+
"sha256:57c816dfbd1659a367831baca4b775b2a5b43c003daf52e9d57e1d30bc2e1b0e",
|
391
|
+
"sha256:5aa1e32983d4443e310f726ee4b071ab7569f58eedfdd65e9675484a4eb67bd1",
|
392
|
+
"sha256:6ff8728d8d890b3dda5765276d1bc6fb099252915a2cd3aff960c4c195745dd0",
|
393
|
+
"sha256:7259038202a47fdecee7e62e0fd0b0738b6daa335354396c6ddebdbe1206af2a",
|
394
|
+
"sha256:72e76caa004ab63accdf26023fccd1d087f6d90ec6048ff33ad0445abf7f605a",
|
395
|
+
"sha256:7760c1c2e1a7084153a0f68fab76e754083b126a47d0117c9ed15e69e2103492",
|
396
|
+
"sha256:8c4a6ff8a30e9e3d38ac0539e9a9e02540ab3f827a3394f8852432f6b0ea152e",
|
397
|
+
"sha256:9024beb59aca9d31d36fcdc1604dd9bbeed0a55bface9f1908df19178e2f116e",
|
398
|
+
"sha256:90cb0a7bb35959f37e23303b7eed0a32280510030daba3f7fdfbb65defde6a97",
|
399
|
+
"sha256:91098f02ca81579c85f66df8a588c78f331ca19089763d733e34ad359f474174",
|
400
|
+
"sha256:926c3ea71a6043921050eaa639137e13dbe7b4ab25800932a8498364fc1abec9",
|
401
|
+
"sha256:982518cd64c54fcada9d7e5cf28eabd3ee76bd03ab18e08a48cad7e8b6f31b18",
|
402
|
+
"sha256:9b4cf6318915dccfe218e69bbec417fdd7c7185aa7aab139a2c0beb7468c89f0",
|
403
|
+
"sha256:ad0caded895a00261a5b4aa9af828baede54638754b51955a0ac75576b831b27",
|
404
|
+
"sha256:b85980d1e345fe769cfc57c57db2b59cff5464ee0c045d52c0df087e926fbe63",
|
405
|
+
"sha256:b8fa8b0a35a9982a3c60ec79905ba5bb090fc0b9addcfd3dc2dd04267e45f25e",
|
406
|
+
"sha256:b9e38e0a83cd51e07f5a48ff9691cae95a79bea28fe4ded168a8e5c6c77e819d",
|
407
|
+
"sha256:bd4c45986472694e5121084c6ebbd112aa919a25e783b87eb95953c9573906d6",
|
408
|
+
"sha256:be97d3a19c16a9be00edf79dca949c8fa7eff621763666a145f9f9535a5d7f42",
|
409
|
+
"sha256:c648025b6840fe62e57107e0a25f604db740e728bd67da4f6f060f03017d5097",
|
410
|
+
"sha256:d05a38884db2ba215218745f0781775806bde4f32e07b135348355fe8e4991d9",
|
411
|
+
"sha256:dd420e577921c8c2d31289536c386aaa30140b473835e97f83bc71ea9d2baf2d",
|
412
|
+
"sha256:e357286c1b76403dd384d938f93c46b2b058ed4dfcdce64a770f0537ed3feb6f",
|
413
|
+
"sha256:e6c00130ed423201c5bc5544c23359141660b07999ad82e34e7bb8f882bb78e0",
|
414
|
+
"sha256:e74d30ec9c7cb2f404af331d5b4099a9b322a8a6b25c4632755c8757345baac5",
|
415
|
+
"sha256:f3562c2f23c612f2e4a6964a61d942f891d29ee320edb62ff48ffb99f3de9ae8"
|
416
416
|
],
|
417
417
|
"markers": "python_version >= '3.7' and python_full_version not in '3.9.0, 3.9.1'",
|
418
|
-
"version": "==45.0.
|
418
|
+
"version": "==45.0.5"
|
419
419
|
},
|
420
420
|
"decorator": {
|
421
421
|
"hashes": [
|
@@ -493,42 +493,6 @@
|
|
493
493
|
"markers": "python_version >= '3.7'",
|
494
494
|
"version": "==3.1.44"
|
495
495
|
},
|
496
|
-
"gnureadline": {
|
497
|
-
"hashes": [
|
498
|
-
"sha256:07231f8191adb7f204010a86a91df9df9a80944981a16576a471f59304ad6a16",
|
499
|
-
"sha256:0ca03501ce0939d7ecf9d075860d6f6ceb2f49f30331b4e96e4678ce03687bab",
|
500
|
-
"sha256:0cc77fc9c8a8fcf10e0a554e49ee763219683386b8f906b7e6ef07c9e40e8420",
|
501
|
-
"sha256:10fcaf561bc4ed6ab7075ab3ead188a18faaf4e6e92d916f81a09c0a670ce906",
|
502
|
-
"sha256:23b43c8e9e2e6566cb3094749826181a86dba1d94b1e023b5f9923dc26e37876",
|
503
|
-
"sha256:265bcf6ef7082e130160fb34b9664284affb216a22c5bffcd518b35d02bcc4e9",
|
504
|
-
"sha256:2d3e33d2e0dd694d623a2ca1fae6990b52f1d25955504b7293a9350fb9912940",
|
505
|
-
"sha256:30cc1b6cb11d94554815cb91eb1dfa6a11887185aae50f253adaa393e91c6a86",
|
506
|
-
"sha256:3f1050ecf789f34d0ab0aacdb605f177725009a864e0038e70380614af92dc0d",
|
507
|
-
"sha256:4f57a3aa97c3379b2513c8bfbac0de2dfb41f695623c0b2ad337babb646b51a7",
|
508
|
-
"sha256:4f5fc90af56a1ae6f88c9c7122fc76141c395b6c342a63800abed8c813f48b85",
|
509
|
-
"sha256:50c40bfffffa82d4fcb0fde4940d4ff128ba2f876c1da09bae9d6d9ff770095e",
|
510
|
-
"sha256:561a60b12f74ea7234036cc4fe558f3b46023be0dac5ed73541ece58cba2f88a",
|
511
|
-
"sha256:576dac060887adc6067ee9d23fb2f0031fb2b3e560e07a6c9e666e05f0473af7",
|
512
|
-
"sha256:59c5505026646da6d5ced6a5316d6d191d011e8be422cba4abce71730ef37dc6",
|
513
|
-
"sha256:6472e3a780087eecd67c03e5455aecb209de51bcae74583222976f6b816f6192",
|
514
|
-
"sha256:6c550d08c4d2882a83293a724b14a262ee5078fd4fa7acdc78aa59cab26ae343",
|
515
|
-
"sha256:811d85a70ac97cddeb1755282915e8a93c279dcf89513426f28617b8feff5aec",
|
516
|
-
"sha256:85e362d2d0e85e45f0affae7bbfaf998b00167c55a78d31ee0f214de9ff429d2",
|
517
|
-
"sha256:94b143ea5d22b0c1ca4a591265afe135272c69b7757e968e34fbb47a7858d1ce",
|
518
|
-
"sha256:9c152a82613fa012ab4331bb9a0ffddb415e37561d376b910bf9e7d535607faf",
|
519
|
-
"sha256:a7d6e3f5d9fd0cf8a84fb382d4e3ad2914331be4d929f17d50da01f1571c4b03",
|
520
|
-
"sha256:b69e6608cc94e110018b721a11718d480a6330e0b62cbab65a22880e84011205",
|
521
|
-
"sha256:c28e33bfc56d4204693f213abeab927f65c505ce91f668a039720bc7c46b0353",
|
522
|
-
"sha256:c7b8d3f2a2c9b7e6feaf1f20bdb6ebb8210e207b8c5360ffe407a47efeeb3fb8",
|
523
|
-
"sha256:c9b9e1e7ba99a80bb50c12027d6ce692574f77a65bf57bc97041cf81c0f49bd1",
|
524
|
-
"sha256:d708e8f655d3b556a138f13e9fcb2d8a10a6901e3125c04cad5ef7c883191fe8",
|
525
|
-
"sha256:daa405028b9fe92bfbb93624e13e0674a242a1c5434b70ef61a04294502fdb65",
|
526
|
-
"sha256:dcfa601d95c00aa670ec5e4bf791caf6ba0bcf266de940fb54d44c278bd302fe",
|
527
|
-
"sha256:f59275168cae1b02ca1ec7586a9804bb04ce427df92f8582a80d16e96c846b78"
|
528
|
-
],
|
529
|
-
"markers": "platform_system == 'Darwin'",
|
530
|
-
"version": "==8.2.13"
|
531
|
-
},
|
532
496
|
"google-auth": {
|
533
497
|
"hashes": [
|
534
498
|
"sha256:1370d4593e86213563547f97a92752fc658456fe4514c809544f330fed45a7ca",
|
@@ -537,6 +501,66 @@
|
|
537
501
|
"markers": "python_version >= '3.7'",
|
538
502
|
"version": "==2.40.3"
|
539
503
|
},
|
504
|
+
"greenlet": {
|
505
|
+
"hashes": [
|
506
|
+
"sha256:003c930e0e074db83559edc8705f3a2d066d4aa8c2f198aff1e454946efd0f26",
|
507
|
+
"sha256:024571bbce5f2c1cfff08bf3fbaa43bbc7444f580ae13b0099e95d0e6e67ed36",
|
508
|
+
"sha256:02b0df6f63cd15012bed5401b47829cfd2e97052dc89da3cfaf2c779124eb892",
|
509
|
+
"sha256:0921ac4ea42a5315d3446120ad48f90c3a6b9bb93dd9b3cf4e4d84a66e42de83",
|
510
|
+
"sha256:0cc73378150b8b78b0c9fe2ce56e166695e67478550769536a6742dca3651688",
|
511
|
+
"sha256:1afd685acd5597349ee6d7a88a8bec83ce13c106ac78c196ee9dde7c04fe87be",
|
512
|
+
"sha256:22eb5ba839c4b2156f18f76768233fe44b23a31decd9cc0d4cc8141c211fd1b4",
|
513
|
+
"sha256:25ad29caed5783d4bd7a85c9251c651696164622494c00802a139c00d639242d",
|
514
|
+
"sha256:29e184536ba333003540790ba29829ac14bb645514fbd7e32af331e8202a62a5",
|
515
|
+
"sha256:2c724620a101f8170065d7dded3f962a2aea7a7dae133a009cada42847e04a7b",
|
516
|
+
"sha256:2d8aa5423cd4a396792f6d4580f88bdc6efcb9205891c9d40d20f6e670992efb",
|
517
|
+
"sha256:3d04332dddb10b4a211b68111dabaee2e1a073663d117dc10247b5b1642bac86",
|
518
|
+
"sha256:419e60f80709510c343c57b4bb5a339d8767bf9aef9b8ce43f4f143240f88b7c",
|
519
|
+
"sha256:42efc522c0bd75ffa11a71e09cd8a399d83fafe36db250a87cf1dacfaa15dc64",
|
520
|
+
"sha256:4532f0d25df67f896d137431b13f4cdce89f7e3d4a96387a41290910df4d3a57",
|
521
|
+
"sha256:49c8cfb18fb419b3d08e011228ef8a25882397f3a859b9fe1436946140b6756b",
|
522
|
+
"sha256:500b8689aa9dd1ab26872a34084503aeddefcb438e2e7317b89b11eaea1901ad",
|
523
|
+
"sha256:5035d77a27b7c62db6cf41cf786cfe2242644a7a337a0e155c80960598baab95",
|
524
|
+
"sha256:5195fb1e75e592dd04ce79881c8a22becdfa3e6f500e7feb059b1e6fdd54d3e3",
|
525
|
+
"sha256:592c12fb1165be74592f5de0d70f82bc5ba552ac44800d632214b76089945147",
|
526
|
+
"sha256:68671180e3849b963649254a882cd544a3c75bfcd2c527346ad8bb53494444db",
|
527
|
+
"sha256:706d016a03e78df129f68c4c9b4c4f963f7d73534e48a24f5f5a7101ed13dbbb",
|
528
|
+
"sha256:72e77ed69312bab0434d7292316d5afd6896192ac4327d44f3d613ecb85b037c",
|
529
|
+
"sha256:731e154aba8e757aedd0781d4b240f1225b075b4409f1bb83b05ff410582cf00",
|
530
|
+
"sha256:7454d37c740bb27bdeddfc3f358f26956a07d5220818ceb467a483197d84f849",
|
531
|
+
"sha256:751261fc5ad7b6705f5f76726567375bb2104a059454e0226e1eef6c756748ba",
|
532
|
+
"sha256:761917cac215c61e9dc7324b2606107b3b292a8349bdebb31503ab4de3f559ac",
|
533
|
+
"sha256:784ae58bba89fa1fa5733d170d42486580cab9decda3484779f4759345b29822",
|
534
|
+
"sha256:7e70ea4384b81ef9e84192e8a77fb87573138aa5d4feee541d8014e452b434da",
|
535
|
+
"sha256:8186162dffde068a465deab08fc72c767196895c39db26ab1c17c0b77a6d8b97",
|
536
|
+
"sha256:8324319cbd7b35b97990090808fdc99c27fe5338f87db50514959f8059999805",
|
537
|
+
"sha256:83a8761c75312361aa2b5b903b79da97f13f556164a7dd2d5448655425bd4c34",
|
538
|
+
"sha256:86c2d68e87107c1792e2e8d5399acec2487a4e993ab76c792408e59394d52141",
|
539
|
+
"sha256:8704b3768d2f51150626962f4b9a9e4a17d2e37c8a8d9867bbd9fa4eb938d3b3",
|
540
|
+
"sha256:873abe55f134c48e1f2a6f53f7d1419192a3d1a4e873bace00499a4e45ea6af0",
|
541
|
+
"sha256:88cd97bf37fe24a6710ec6a3a7799f3f81d9cd33317dcf565ff9950c83f55e0b",
|
542
|
+
"sha256:8b0dd8ae4c0d6f5e54ee55ba935eeb3d735a9b58a8a1e5b5cbab64e01a39f365",
|
543
|
+
"sha256:8c37ef5b3787567d322331d5250e44e42b58c8c713859b8a04c6065f27efbf72",
|
544
|
+
"sha256:8c47aae8fbbfcf82cc13327ae802ba13c9c36753b67e760023fd116bc124a62a",
|
545
|
+
"sha256:93c0bb79844a367782ec4f429d07589417052e621aa39a5ac1fb99c5aa308edc",
|
546
|
+
"sha256:93d48533fade144203816783373f27a97e4193177ebaaf0fc396db19e5d61163",
|
547
|
+
"sha256:96c20252c2f792defe9a115d3287e14811036d51e78b3aaddbee23b69b216302",
|
548
|
+
"sha256:a07d3472c2a93117af3b0136f246b2833fdc0b542d4a9799ae5f41c28323faef",
|
549
|
+
"sha256:a433dbc54e4a37e4fff90ef34f25a8c00aed99b06856f0119dcf09fbafa16392",
|
550
|
+
"sha256:aaa7aae1e7f75eaa3ae400ad98f8644bb81e1dc6ba47ce8a93d3f17274e08322",
|
551
|
+
"sha256:baeedccca94880d2f5666b4fa16fc20ef50ba1ee353ee2d7092b383a243b0b0d",
|
552
|
+
"sha256:be52af4b6292baecfa0f397f3edb3c6092ce071b499dd6fe292c9ac9f2c8f264",
|
553
|
+
"sha256:c667c0bf9d406b77a15c924ef3285e1e05250948001220368e039b6aa5b5034b",
|
554
|
+
"sha256:ce539fb52fb774d0802175d37fcff5c723e2c7d249c65916257f0a940cee8904",
|
555
|
+
"sha256:d2971d93bb99e05f8c2c0c2f4aa9484a18d98c4c3bd3c62b65b7e6ae33dfcfaf",
|
556
|
+
"sha256:d760f9bdfe79bff803bad32b4d8ffb2c1d2ce906313fc10a83976ffb73d64ca7",
|
557
|
+
"sha256:ed6cfa9200484d234d8394c70f5492f144b20d4533f69262d530a1a082f6ee9a",
|
558
|
+
"sha256:efc6dc8a792243c31f2f5674b670b3a95d46fa1c6a912b8e310d6f542e7b0712",
|
559
|
+
"sha256:f4bfbaa6096b1b7a200024784217defedf46a07c2eee1a498e94a1b5f8ec5728"
|
560
|
+
],
|
561
|
+
"markers": "python_version >= '3.9'",
|
562
|
+
"version": "==3.2.3"
|
563
|
+
},
|
540
564
|
"hiredis": {
|
541
565
|
"hashes": [
|
542
566
|
"sha256:0079ef1e03930b364556b78548e67236ab3def4e07e674f6adfc52944aa972dd",
|
@@ -1627,11 +1651,11 @@
|
|
1627
1651
|
},
|
1628
1652
|
"transitions": {
|
1629
1653
|
"hashes": [
|
1630
|
-
"sha256:
|
1631
|
-
"sha256:
|
1654
|
+
"sha256:02463248f2b668d86f66636b1e3c9e8de84d93e22915247f4e1aa9ee1cae28aa",
|
1655
|
+
"sha256:881fb75bb1654ed55d86060bb067f2c716f8e155f57bb73fd444e53713aafec8"
|
1632
1656
|
],
|
1633
1657
|
"index": "pypi",
|
1634
|
-
"version": "==0.9.
|
1658
|
+
"version": "==0.9.3"
|
1635
1659
|
},
|
1636
1660
|
"typing-extensions": {
|
1637
1661
|
"hashes": [
|
@@ -208,11 +208,11 @@ async def notifications_baremetal(notification: NotificationBaremetal) -> None:
|
|
208
208
|
|
209
209
|
|
210
210
|
@app.post(
|
211
|
-
"/v1/
|
211
|
+
"/v1/sonic/{identifier}/ztp/complete",
|
212
212
|
response_model=DeviceSearchResult,
|
213
|
-
tags=["
|
213
|
+
tags=["sonic"],
|
214
214
|
)
|
215
|
-
async def
|
215
|
+
async def sonic_ztp_complete(identifier: str) -> DeviceSearchResult:
|
216
216
|
"""Mark a switch as ZTP complete by setting provision_state to active."""
|
217
217
|
if not utils.nb:
|
218
218
|
raise HTTPException(
|
@@ -1,8 +1,5 @@
|
|
1
1
|
# SPDX-License-Identifier: Apache-2.0
|
2
2
|
|
3
|
-
import json
|
4
|
-
import os
|
5
|
-
from datetime import datetime
|
6
3
|
from re import findall
|
7
4
|
from urllib.parse import urljoin
|
8
5
|
|
@@ -10,12 +7,10 @@ from cliff.command import Command
|
|
10
7
|
import docker
|
11
8
|
from jinja2 import Template
|
12
9
|
from loguru import logger
|
13
|
-
import paramiko
|
14
10
|
import requests
|
15
11
|
|
16
12
|
from osism.data import TEMPLATE_IMAGE_CLUSTERAPI, TEMPLATE_IMAGE_OCTAVIA
|
17
13
|
from osism.tasks import openstack, ansible, handle_task
|
18
|
-
from osism import utils
|
19
14
|
|
20
15
|
SUPPORTED_CLUSTERAPI_K8S_IMAGES = ["1.31", "1.32", "1.33"]
|
21
16
|
|
@@ -389,249 +384,3 @@ class Dnsmasq(Command):
|
|
389
384
|
)
|
390
385
|
|
391
386
|
return handle_task(task, wait, format="log", timeout=300)
|
392
|
-
|
393
|
-
|
394
|
-
class Sonic(Command):
|
395
|
-
def get_parser(self, prog_name):
|
396
|
-
parser = super(Sonic, self).get_parser(prog_name)
|
397
|
-
parser.add_argument(
|
398
|
-
"hostname", type=str, help="Hostname of the SONiC switch to manage"
|
399
|
-
)
|
400
|
-
parser.add_argument(
|
401
|
-
"--reload",
|
402
|
-
action="store_true",
|
403
|
-
help="Execute config reload after config load to restart services",
|
404
|
-
)
|
405
|
-
return parser
|
406
|
-
|
407
|
-
def take_action(self, parsed_args):
|
408
|
-
hostname = parsed_args.hostname
|
409
|
-
reload_config = parsed_args.reload
|
410
|
-
today = datetime.now().strftime("%Y%m%d")
|
411
|
-
|
412
|
-
try:
|
413
|
-
# Get device from NetBox - try by name first, then by inventory_hostname
|
414
|
-
device = utils.nb.dcim.devices.get(name=hostname)
|
415
|
-
if not device:
|
416
|
-
# Try to find by inventory_hostname custom field
|
417
|
-
devices = utils.nb.dcim.devices.filter(cf_inventory_hostname=hostname)
|
418
|
-
if devices:
|
419
|
-
device = devices[0] # Take the first match
|
420
|
-
logger.info(f"Device found by inventory_hostname: {device.name}")
|
421
|
-
else:
|
422
|
-
logger.error(
|
423
|
-
f"Device {hostname} not found in NetBox (searched by name and inventory_hostname)"
|
424
|
-
)
|
425
|
-
return 1
|
426
|
-
|
427
|
-
# Get device configuration from local_context_data
|
428
|
-
if (
|
429
|
-
not hasattr(device, "local_context_data")
|
430
|
-
or not device.local_context_data
|
431
|
-
):
|
432
|
-
logger.error(f"Device {hostname} has no local_context_data in NetBox")
|
433
|
-
return 1
|
434
|
-
|
435
|
-
config_context = device.local_context_data
|
436
|
-
|
437
|
-
# Save config context to local /tmp directory
|
438
|
-
config_context_file = f"/tmp/config_db_{hostname}_{today}.json"
|
439
|
-
try:
|
440
|
-
with open(config_context_file, "w") as f:
|
441
|
-
json.dump(config_context, f, indent=2)
|
442
|
-
logger.info(f"Config context saved to {config_context_file}")
|
443
|
-
except Exception as e:
|
444
|
-
logger.error(f"Failed to save config context: {e}")
|
445
|
-
return 1
|
446
|
-
|
447
|
-
# Extract SSH connection details
|
448
|
-
ssh_host = None
|
449
|
-
ssh_username = None
|
450
|
-
|
451
|
-
# Try to get SSH details from config context
|
452
|
-
if "management" in config_context:
|
453
|
-
mgmt = config_context["management"]
|
454
|
-
if "ip" in mgmt:
|
455
|
-
ssh_host = mgmt["ip"]
|
456
|
-
if "username" in mgmt:
|
457
|
-
ssh_username = mgmt["username"]
|
458
|
-
|
459
|
-
# Fallback: try to get OOB IP from NetBox
|
460
|
-
if not ssh_host:
|
461
|
-
from osism.tasks.conductor.netbox import get_device_oob_ip
|
462
|
-
|
463
|
-
oob_result = get_device_oob_ip(device)
|
464
|
-
if oob_result:
|
465
|
-
ssh_host = oob_result[0]
|
466
|
-
|
467
|
-
if not ssh_host:
|
468
|
-
logger.error(f"No SSH host found for device {hostname}")
|
469
|
-
return 1
|
470
|
-
|
471
|
-
if not ssh_username:
|
472
|
-
ssh_username = "admin" # Default SONiC username
|
473
|
-
|
474
|
-
# SSH private key path
|
475
|
-
ssh_key_path = "/ansible/secrets/id_rsa.operator"
|
476
|
-
|
477
|
-
if not os.path.exists(ssh_key_path):
|
478
|
-
logger.error(f"SSH private key not found at {ssh_key_path}")
|
479
|
-
return 1
|
480
|
-
|
481
|
-
logger.info(
|
482
|
-
f"Connecting to {hostname} ({ssh_host}) to backup SONiC configuration"
|
483
|
-
)
|
484
|
-
|
485
|
-
# Create SSH connection
|
486
|
-
ssh = paramiko.SSHClient()
|
487
|
-
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
488
|
-
|
489
|
-
try:
|
490
|
-
# Connect with private key
|
491
|
-
ssh.connect(
|
492
|
-
hostname=ssh_host,
|
493
|
-
username=ssh_username,
|
494
|
-
key_filename=ssh_key_path,
|
495
|
-
timeout=30,
|
496
|
-
)
|
497
|
-
|
498
|
-
# Generate backup filename with date and increment on switch
|
499
|
-
base_backup_path = f"/home/admin/config_db_{hostname}_{today}"
|
500
|
-
backup_filename = f"{base_backup_path}_1.json"
|
501
|
-
|
502
|
-
# Find next available filename on switch
|
503
|
-
x = 1
|
504
|
-
while True:
|
505
|
-
check_cmd = f"ls {base_backup_path}_{x}.json 2>/dev/null"
|
506
|
-
stdin, stdout, stderr = ssh.exec_command(check_cmd)
|
507
|
-
if stdout.read().decode().strip() == "":
|
508
|
-
backup_filename = f"{base_backup_path}_{x}.json"
|
509
|
-
break
|
510
|
-
x += 1
|
511
|
-
|
512
|
-
logger.info(
|
513
|
-
f"Backing up current configuration on switch to {backup_filename}"
|
514
|
-
)
|
515
|
-
|
516
|
-
# Backup current configuration on switch
|
517
|
-
backup_cmd = f"sudo cp /etc/sonic/config_db.json {backup_filename}"
|
518
|
-
stdin, stdout, stderr = ssh.exec_command(backup_cmd)
|
519
|
-
exit_status = stdout.channel.recv_exit_status()
|
520
|
-
|
521
|
-
if exit_status != 0:
|
522
|
-
error_msg = stderr.read().decode()
|
523
|
-
logger.error(
|
524
|
-
f"Failed to backup configuration on switch: {error_msg}"
|
525
|
-
)
|
526
|
-
return 1
|
527
|
-
|
528
|
-
logger.info("Configuration backed up successfully on switch")
|
529
|
-
|
530
|
-
# Upload local config context to switch /tmp directory
|
531
|
-
switch_config_file = f"/tmp/config_db_{hostname}_current.json"
|
532
|
-
logger.info(
|
533
|
-
f"Uploading config context to {switch_config_file} on switch"
|
534
|
-
)
|
535
|
-
|
536
|
-
# Use SFTP to upload the config context file
|
537
|
-
sftp = ssh.open_sftp()
|
538
|
-
try:
|
539
|
-
sftp.put(config_context_file, switch_config_file)
|
540
|
-
logger.info(
|
541
|
-
f"Config context successfully uploaded to {switch_config_file} on switch"
|
542
|
-
)
|
543
|
-
except Exception as e:
|
544
|
-
logger.error(f"Failed to upload config context to switch: {e}")
|
545
|
-
return 1
|
546
|
-
finally:
|
547
|
-
sftp.close()
|
548
|
-
|
549
|
-
# Load and apply the new configuration
|
550
|
-
logger.info("Loading and applying new configuration on switch")
|
551
|
-
|
552
|
-
load_cmd = f"sudo config load -y {switch_config_file}"
|
553
|
-
stdin, stdout, stderr = ssh.exec_command(load_cmd)
|
554
|
-
exit_status = stdout.channel.recv_exit_status()
|
555
|
-
|
556
|
-
if exit_status != 0:
|
557
|
-
error_msg = stderr.read().decode()
|
558
|
-
logger.error(f"Failed to load configuration: {error_msg}")
|
559
|
-
return 1
|
560
|
-
|
561
|
-
logger.info("Configuration loaded and applied successfully")
|
562
|
-
|
563
|
-
# Optionally reload configuration to restart services
|
564
|
-
config_operations_successful = True
|
565
|
-
if reload_config:
|
566
|
-
logger.info("Reloading configuration to restart services")
|
567
|
-
|
568
|
-
reload_cmd = "sudo config reload -y"
|
569
|
-
stdin, stdout, stderr = ssh.exec_command(reload_cmd)
|
570
|
-
exit_status = stdout.channel.recv_exit_status()
|
571
|
-
|
572
|
-
if exit_status != 0:
|
573
|
-
error_msg = stderr.read().decode()
|
574
|
-
logger.error(f"Failed to reload configuration: {error_msg}")
|
575
|
-
config_operations_successful = False
|
576
|
-
else:
|
577
|
-
logger.info("Configuration reloaded successfully")
|
578
|
-
|
579
|
-
# Save configuration only if load (and optionally reload) were successful
|
580
|
-
if config_operations_successful:
|
581
|
-
logger.info("Saving configuration to persist changes")
|
582
|
-
|
583
|
-
save_cmd = "sudo config save -y"
|
584
|
-
stdin, stdout, stderr = ssh.exec_command(save_cmd)
|
585
|
-
exit_status = stdout.channel.recv_exit_status()
|
586
|
-
|
587
|
-
if exit_status != 0:
|
588
|
-
error_msg = stderr.read().decode()
|
589
|
-
logger.error(f"Failed to save configuration: {error_msg}")
|
590
|
-
return 1
|
591
|
-
|
592
|
-
logger.info("Configuration saved successfully")
|
593
|
-
else:
|
594
|
-
logger.warning("Skipping config save due to reload failure")
|
595
|
-
|
596
|
-
# Delete the temporary configuration file
|
597
|
-
logger.info(f"Cleaning up temporary file {switch_config_file}")
|
598
|
-
|
599
|
-
delete_cmd = f"rm {switch_config_file}"
|
600
|
-
stdin, stdout, stderr = ssh.exec_command(delete_cmd)
|
601
|
-
exit_status = stdout.channel.recv_exit_status()
|
602
|
-
|
603
|
-
if exit_status != 0:
|
604
|
-
error_msg = stderr.read().decode()
|
605
|
-
logger.warning(f"Failed to delete temporary file: {error_msg}")
|
606
|
-
else:
|
607
|
-
logger.info("Temporary file deleted successfully")
|
608
|
-
|
609
|
-
logger.info("SONiC configuration management completed successfully")
|
610
|
-
logger.info(f"- Config context saved locally to: {config_context_file}")
|
611
|
-
if reload_config and config_operations_successful:
|
612
|
-
logger.info("- Configuration loaded, reloaded, and saved on switch")
|
613
|
-
elif config_operations_successful:
|
614
|
-
logger.info("- Configuration loaded and saved on switch")
|
615
|
-
else:
|
616
|
-
logger.info(
|
617
|
-
"- Configuration loaded on switch (save skipped due to reload failure)"
|
618
|
-
)
|
619
|
-
logger.info(f"- Backup created on switch: {backup_filename}")
|
620
|
-
|
621
|
-
return 0
|
622
|
-
|
623
|
-
except paramiko.AuthenticationException:
|
624
|
-
logger.error(f"Authentication failed for {ssh_host}")
|
625
|
-
return 1
|
626
|
-
except paramiko.SSHException as e:
|
627
|
-
logger.error(f"SSH connection failed: {e}")
|
628
|
-
return 1
|
629
|
-
except Exception as e:
|
630
|
-
logger.error(f"Unexpected error during SSH operations: {e}")
|
631
|
-
return 1
|
632
|
-
finally:
|
633
|
-
ssh.close()
|
634
|
-
|
635
|
-
except Exception as e:
|
636
|
-
logger.error(f"Error managing SONiC device {hostname}: {e}")
|
637
|
-
return 1
|