osism 0.20250312.0__tar.gz → 0.20250314.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.20250314.0/ChangeLog +7 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/Containerfile +5 -32
- {osism-0.20250312.0 → osism-0.20250314.0}/Dockerfile +5 -32
- {osism-0.20250312.0/osism.egg-info → osism-0.20250314.0}/PKG-INFO +4 -4
- {osism-0.20250312.0 → osism-0.20250314.0}/Pipfile +2 -2
- {osism-0.20250312.0 → osism-0.20250314.0}/Pipfile.lock +65 -65
- osism-0.20250314.0/files/netbox-manager/settings.toml +3 -0
- osism-0.20250314.0/osism/actions/manage_device.py +120 -0
- osism-0.20250314.0/osism/commands/netbox.py +164 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/services/listener.py +0 -40
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/settings.py +0 -3
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/tasks/__init__.py +44 -14
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/tasks/netbox.py +22 -98
- {osism-0.20250312.0 → osism-0.20250314.0/osism.egg-info}/PKG-INFO +4 -4
- {osism-0.20250312.0 → osism-0.20250314.0}/osism.egg-info/SOURCES.txt +2 -5
- {osism-0.20250312.0 → osism-0.20250314.0}/osism.egg-info/entry_points.txt +1 -9
- osism-0.20250314.0/osism.egg-info/pbr.json +1 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism.egg-info/requires.txt +3 -3
- {osism-0.20250312.0 → osism-0.20250314.0}/playbooks/build.yml +0 -16
- osism-0.20250314.0/requirements.netbox-manager.txt +1 -0
- osism-0.20250314.0/requirements.openstack-flavor-manager.txt +1 -0
- osism-0.20250314.0/requirements.openstack-image-manager.txt +1 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/requirements.txt +2 -2
- {osism-0.20250312.0 → osism-0.20250314.0}/setup.cfg +1 -9
- osism-0.20250312.0/ChangeLog +0 -7
- osism-0.20250312.0/files/import/main.py +0 -473
- osism-0.20250312.0/osism/actions/check_configuration.py +0 -49
- osism-0.20250312.0/osism/actions/deploy_configuration.py +0 -92
- osism-0.20250312.0/osism/actions/diff_configuration.py +0 -59
- osism-0.20250312.0/osism/actions/generate_configuration.py +0 -137
- osism-0.20250312.0/osism/actions/manage_device.py +0 -979
- osism-0.20250312.0/osism/commands/netbox.py +0 -453
- osism-0.20250312.0/osism.egg-info/pbr.json +0 -1
- osism-0.20250312.0/requirements.openstack-flavor-manager.txt +0 -1
- osism-0.20250312.0/requirements.openstack-image-manager.txt +0 -1
- {osism-0.20250312.0 → osism-0.20250314.0}/.flake8 +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/.github/renovate.json +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/.github/workflows/publish.yml +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/.hadolint.yaml +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/.zuul.yaml +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/AUTHORS +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/LICENSE +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/README.md +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/files/change.sh +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/files/cleanup-ansible-collections.sh +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/files/clustershell/clush.conf +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/files/clustershell/groups.conf +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/files/data/SCS-Spec.MandatoryFlavors.verbose.yaml +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/files/run-ansible-console.sh +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/__init__.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/__main__.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/actions/__init__.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/actions/manage_interface.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/api.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/__init__.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/apply.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/compose.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/compute.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/configuration.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/console.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/container.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/get.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/log.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/manage.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/noset.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/reconciler.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/server.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/service.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/set.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/status.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/sync.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/task.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/validate.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/vault.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/volume.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/wait.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/commands/worker.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/core/__init__.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/core/enums.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/core/playbooks.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/data/__init__.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/main.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/plugins/__init__.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/services/__init__.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/tasks/ansible.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/tasks/ceph.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/tasks/conductor.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/tasks/kolla.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/tasks/kubernetes.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/tasks/openstack.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/tasks/reconciler.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism/utils/__init__.py +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism.egg-info/dependency_links.txt +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism.egg-info/not-zip-safe +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/osism.egg-info/top_level.txt +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/playbooks/pre.yml +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/playbooks/test-setup.yml +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/requirements.ansible.txt +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/requirements.yml +0 -0
- {osism-0.20250312.0 → osism-0.20250314.0}/setup.py +0 -0
@@ -25,6 +25,7 @@ python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.txt
|
|
25
25
|
python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.ansible.txt
|
26
26
|
python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.openstack-image-manager.txt
|
27
27
|
python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.openstack-flavor-manager.txt
|
28
|
+
python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.netbox-manager.txt
|
28
29
|
|
29
30
|
# install openstack-project-manager
|
30
31
|
git clone --depth 1 https://github.com/osism/openstack-project-manager.git /openstack-project-manager
|
@@ -54,6 +55,8 @@ ENV CLUSTERSHELL_CFGDIR=/etc/clustershell/
|
|
54
55
|
COPY files/clustershell/clush.conf /etc/clustershell/clush.conf
|
55
56
|
COPY files/clustershell/groups.conf /etc/clustershell/groups.conf
|
56
57
|
|
58
|
+
COPY files/netbox-manager/settings.toml /usr/local/config/settings.toml
|
59
|
+
|
57
60
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
58
61
|
|
59
62
|
RUN <<EOF
|
@@ -75,6 +78,7 @@ python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/re
|
|
75
78
|
python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/requirements.ansible.txt
|
76
79
|
python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/requirements.openstack-image-manager.txt
|
77
80
|
python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/requirements.openstack-flavor-manager.txt
|
81
|
+
python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/requirements.netbox-manager.txt
|
78
82
|
|
79
83
|
# install python-osism
|
80
84
|
python3 -m pip --no-cache-dir install --no-index /src
|
@@ -82,6 +86,7 @@ python3 -m pip --no-cache-dir install --no-index /src
|
|
82
86
|
# install ansible collections
|
83
87
|
mkdir -p /ansible/logs
|
84
88
|
ansible-galaxy collection install -v -f -r /ansible/requirements.yml -p /usr/share/ansible/collections
|
89
|
+
ansible-galaxy collection install -v -f -r /usr/local/lib/python*/site-packages/netbox_manager/requirements.yml -p /usr/share/ansible/collections
|
85
90
|
ln -s /usr/share/ansible/collections /ansible/collections
|
86
91
|
|
87
92
|
# copy image definitions for the openstack-image-manager
|
@@ -128,35 +133,3 @@ pip3 uninstall -y pyclean
|
|
128
133
|
EOF
|
129
134
|
|
130
135
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
131
|
-
|
132
|
-
FROM osism AS osism-netbox
|
133
|
-
|
134
|
-
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
135
|
-
|
136
|
-
RUN <<EOF
|
137
|
-
set -e
|
138
|
-
set -x
|
139
|
-
|
140
|
-
apt-get update
|
141
|
-
apt-get install -y --no-install-recommends \
|
142
|
-
git \
|
143
|
-
tini
|
144
|
-
|
145
|
-
mkdir -p /import
|
146
|
-
git clone --depth 1 https://github.com/netbox-community/devicetype-library /devicetype-library
|
147
|
-
rm -rf /devicetype-library/.git
|
148
|
-
rm -rf /devicetype-library/elevation-images
|
149
|
-
|
150
|
-
apt-get clean
|
151
|
-
rm -rf \
|
152
|
-
/tmp/* \
|
153
|
-
/var/cache/apt \
|
154
|
-
/var/lib/apt/lists/* \
|
155
|
-
/var/tmp/*
|
156
|
-
|
157
|
-
pip3 install --no-cache-dir pyclean==3.0.0
|
158
|
-
pyclean /usr
|
159
|
-
pip3 uninstall -y pyclean
|
160
|
-
EOF
|
161
|
-
|
162
|
-
COPY files/import/* /import
|
@@ -25,6 +25,7 @@ python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.txt
|
|
25
25
|
python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.ansible.txt
|
26
26
|
python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.openstack-image-manager.txt
|
27
27
|
python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.openstack-flavor-manager.txt
|
28
|
+
python3 -m pip wheel --no-cache-dir --wheel-dir=/wheels -r /src/requirements.netbox-manager.txt
|
28
29
|
|
29
30
|
# install openstack-project-manager
|
30
31
|
git clone --depth 1 https://github.com/osism/openstack-project-manager.git /openstack-project-manager
|
@@ -54,6 +55,8 @@ ENV CLUSTERSHELL_CFGDIR=/etc/clustershell/
|
|
54
55
|
COPY files/clustershell/clush.conf /etc/clustershell/clush.conf
|
55
56
|
COPY files/clustershell/groups.conf /etc/clustershell/groups.conf
|
56
57
|
|
58
|
+
COPY files/netbox-manager/settings.toml /usr/local/config/settings.toml
|
59
|
+
|
57
60
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
58
61
|
|
59
62
|
RUN <<EOF
|
@@ -75,6 +78,7 @@ python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/re
|
|
75
78
|
python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/requirements.ansible.txt
|
76
79
|
python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/requirements.openstack-image-manager.txt
|
77
80
|
python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/requirements.openstack-flavor-manager.txt
|
81
|
+
python3 -m pip --no-cache-dir install --no-index --find-links=/wheels -r /src/requirements.netbox-manager.txt
|
78
82
|
|
79
83
|
# install python-osism
|
80
84
|
python3 -m pip --no-cache-dir install --no-index /src
|
@@ -82,6 +86,7 @@ python3 -m pip --no-cache-dir install --no-index /src
|
|
82
86
|
# install ansible collections
|
83
87
|
mkdir -p /ansible/logs
|
84
88
|
ansible-galaxy collection install -v -f -r /ansible/requirements.yml -p /usr/share/ansible/collections
|
89
|
+
ansible-galaxy collection install -v -f -r /usr/local/lib/python*/site-packages/netbox_manager/requirements.yml -p /usr/share/ansible/collections
|
85
90
|
ln -s /usr/share/ansible/collections /ansible/collections
|
86
91
|
|
87
92
|
# copy image definitions for the openstack-image-manager
|
@@ -128,35 +133,3 @@ pip3 uninstall -y pyclean
|
|
128
133
|
EOF
|
129
134
|
|
130
135
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
131
|
-
|
132
|
-
FROM osism AS osism-netbox
|
133
|
-
|
134
|
-
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
135
|
-
|
136
|
-
RUN <<EOF
|
137
|
-
set -e
|
138
|
-
set -x
|
139
|
-
|
140
|
-
apt-get update
|
141
|
-
apt-get install -y --no-install-recommends \
|
142
|
-
git \
|
143
|
-
tini
|
144
|
-
|
145
|
-
mkdir -p /import
|
146
|
-
git clone --depth 1 https://github.com/netbox-community/devicetype-library /devicetype-library
|
147
|
-
rm -rf /devicetype-library/.git
|
148
|
-
rm -rf /devicetype-library/elevation-images
|
149
|
-
|
150
|
-
apt-get clean
|
151
|
-
rm -rf \
|
152
|
-
/tmp/* \
|
153
|
-
/var/cache/apt \
|
154
|
-
/var/lib/apt/lists/* \
|
155
|
-
/var/tmp/*
|
156
|
-
|
157
|
-
pip3 install --no-cache-dir pyclean==3.0.0
|
158
|
-
pyclean /usr
|
159
|
-
pip3 uninstall -y pyclean
|
160
|
-
EOF
|
161
|
-
|
162
|
-
COPY files/import/* /import
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: osism
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.20250314.0
|
4
4
|
Summary: OSISM manager interface
|
5
5
|
Home-page: https://github.com/osism/python-osism
|
6
6
|
Author: OSISM GmbH
|
@@ -36,13 +36,13 @@ Requires-Dist: flower==2.0.1
|
|
36
36
|
Requires-Dist: hiredis==3.1.0
|
37
37
|
Requires-Dist: jc==1.25.4
|
38
38
|
Requires-Dist: keystoneauth1==5.10.0
|
39
|
-
Requires-Dist: kombu==5.
|
39
|
+
Requires-Dist: kombu==5.5.0
|
40
40
|
Requires-Dist: kubernetes==32.0.1
|
41
41
|
Requires-Dist: loguru==0.7.3
|
42
42
|
Requires-Dist: netmiko==4.5.0
|
43
43
|
Requires-Dist: nornir-ansible==2023.12.28
|
44
44
|
Requires-Dist: nornir==3.5.0
|
45
|
-
Requires-Dist: openstacksdk==4.
|
45
|
+
Requires-Dist: openstacksdk==4.4.0
|
46
46
|
Requires-Dist: pottery==3.0.0
|
47
47
|
Requires-Dist: prompt-toolkit==3.0.50
|
48
48
|
Requires-Dist: pydantic==1.10.21
|
@@ -60,7 +60,7 @@ Provides-Extra: ansible
|
|
60
60
|
Requires-Dist: ansible-runner==2.4.0; extra == "ansible"
|
61
61
|
Requires-Dist: ansible-core==2.18.3; extra == "ansible"
|
62
62
|
Provides-Extra: openstack-image-manager
|
63
|
-
Requires-Dist: openstack-image-manager==0.
|
63
|
+
Requires-Dist: openstack-image-manager==0.20250314.0; extra == "openstack-image-manager"
|
64
64
|
Dynamic: author
|
65
65
|
Dynamic: author-email
|
66
66
|
Dynamic: classifier
|
@@ -20,13 +20,13 @@ hiredis = "==3.1.0"
|
|
20
20
|
huey = "==2.5.2"
|
21
21
|
jc = "==1.25.4"
|
22
22
|
keystoneauth1 = "==5.10.0"
|
23
|
-
kombu = "==5.
|
23
|
+
kombu = "==5.5.0"
|
24
24
|
kubernetes = "==32.0.1"
|
25
25
|
loguru = "==0.7.3"
|
26
26
|
netmiko = "==4.5.0"
|
27
27
|
nornir = "==3.5.0"
|
28
28
|
nornir-ansible = "==2023.12.28"
|
29
|
-
openstacksdk = "==4.
|
29
|
+
openstacksdk = "==4.4.0"
|
30
30
|
pottery = "==3.0.0"
|
31
31
|
prompt-toolkit = "==3.0.50"
|
32
32
|
pydantic = "==1.10.21"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"_meta": {
|
3
3
|
"hash": {
|
4
|
-
"sha256": "
|
4
|
+
"sha256": "6bdb174bf4d6e43d11f5e5cef146584d0ec52704cd7bdf992904434cf48dd68b"
|
5
5
|
},
|
6
6
|
"pipfile-spec": 6,
|
7
7
|
"requires": {},
|
@@ -786,12 +786,12 @@
|
|
786
786
|
},
|
787
787
|
"kombu": {
|
788
788
|
"hashes": [
|
789
|
-
"sha256:
|
790
|
-
"sha256:
|
789
|
+
"sha256:526c6cf038c986b998639109a1eb762502f831e8da148cc928f1f95cd91eb874",
|
790
|
+
"sha256:72e65c062e903ee1b4e8b68d348f63c02afc172eda409e3aca85867752e79c0b"
|
791
791
|
],
|
792
792
|
"index": "pypi",
|
793
793
|
"markers": "python_version >= '3.8'",
|
794
|
-
"version": "==5.
|
794
|
+
"version": "==5.5.0"
|
795
795
|
},
|
796
796
|
"kubernetes": {
|
797
797
|
"hashes": [
|
@@ -1033,12 +1033,12 @@
|
|
1033
1033
|
},
|
1034
1034
|
"openstacksdk": {
|
1035
1035
|
"hashes": [
|
1036
|
-
"sha256:
|
1037
|
-
"sha256:
|
1036
|
+
"sha256:157437563d64f3f6feec1796fbd8552d56277332461778c4dbe76d1828fd31e0",
|
1037
|
+
"sha256:a0c8a0c2a1cd4589ce4a9bd812df4d48f538b4bb4b7c4b19ff7b0ef9423a28b0"
|
1038
1038
|
],
|
1039
1039
|
"index": "pypi",
|
1040
1040
|
"markers": "python_version >= '3.9'",
|
1041
|
-
"version": "==4.
|
1041
|
+
"version": "==4.4.0"
|
1042
1042
|
},
|
1043
1043
|
"orderly-set": {
|
1044
1044
|
"hashes": [
|
@@ -1481,66 +1481,66 @@
|
|
1481
1481
|
},
|
1482
1482
|
"sqlalchemy": {
|
1483
1483
|
"hashes": [
|
1484
|
-
"sha256:
|
1485
|
-
"sha256:
|
1486
|
-
"sha256:
|
1487
|
-
"sha256:
|
1488
|
-
"sha256:
|
1489
|
-
"sha256:
|
1490
|
-
"sha256:
|
1491
|
-
"sha256:
|
1492
|
-
"sha256:
|
1493
|
-
"sha256:
|
1494
|
-
"sha256:
|
1495
|
-
"sha256:
|
1496
|
-
"sha256:
|
1497
|
-
"sha256:
|
1498
|
-
"sha256:
|
1499
|
-
"sha256:
|
1500
|
-
"sha256:
|
1501
|
-
"sha256:
|
1502
|
-
"sha256:
|
1503
|
-
"sha256:
|
1504
|
-
"sha256:
|
1505
|
-
"sha256:
|
1506
|
-
"sha256:
|
1507
|
-
"sha256:
|
1508
|
-
"sha256:
|
1509
|
-
"sha256:
|
1510
|
-
"sha256:
|
1511
|
-
"sha256:
|
1512
|
-
"sha256:
|
1513
|
-
"sha256:
|
1514
|
-
"sha256:
|
1515
|
-
"sha256:
|
1516
|
-
"sha256:
|
1517
|
-
"sha256:
|
1518
|
-
"sha256:
|
1519
|
-
"sha256:
|
1520
|
-
"sha256:
|
1521
|
-
"sha256:
|
1522
|
-
"sha256:
|
1523
|
-
"sha256:
|
1524
|
-
"sha256:
|
1525
|
-
"sha256:
|
1526
|
-
"sha256:
|
1527
|
-
"sha256:
|
1528
|
-
"sha256:
|
1529
|
-
"sha256:
|
1530
|
-
"sha256:
|
1531
|
-
"sha256:
|
1532
|
-
"sha256:
|
1533
|
-
"sha256:
|
1534
|
-
"sha256:
|
1535
|
-
"sha256:
|
1536
|
-
"sha256:
|
1537
|
-
"sha256:
|
1538
|
-
"sha256:
|
1539
|
-
"sha256:
|
1540
|
-
"sha256:
|
1484
|
+
"sha256:018ee97c558b499b58935c5a152aeabf6d36b3d55d91656abeb6d93d663c0c4c",
|
1485
|
+
"sha256:01da15490c9df352fbc29859d3c7ba9cd1377791faeeb47c100832004c99472c",
|
1486
|
+
"sha256:04545042969833cb92e13b0a3019549d284fd2423f318b6ba10e7aa687690a3c",
|
1487
|
+
"sha256:06205eb98cb3dd52133ca6818bf5542397f1dd1b69f7ea28aa84413897380b06",
|
1488
|
+
"sha256:08cf721bbd4391a0e765fe0fe8816e81d9f43cece54fdb5ac465c56efafecb3d",
|
1489
|
+
"sha256:0d7e3866eb52d914aea50c9be74184a0feb86f9af8aaaa4daefe52b69378db0b",
|
1490
|
+
"sha256:125a7763b263218a80759ad9ae2f3610aaf2c2fbbd78fff088d584edf81f3782",
|
1491
|
+
"sha256:23c5aa33c01bd898f879db158537d7e7568b503b15aad60ea0c8da8109adf3e7",
|
1492
|
+
"sha256:2600a50d590c22d99c424c394236899ba72f849a02b10e65b4c70149606408b5",
|
1493
|
+
"sha256:2d7332868ce891eda48896131991f7f2be572d65b41a4050957242f8e935d5d7",
|
1494
|
+
"sha256:2ed107331d188a286611cea9022de0afc437dd2d3c168e368169f27aa0f61338",
|
1495
|
+
"sha256:3395e7ed89c6d264d38bea3bfb22ffe868f906a7985d03546ec7dc30221ea980",
|
1496
|
+
"sha256:344cd1ec2b3c6bdd5dfde7ba7e3b879e0f8dd44181f16b895940be9b842fd2b6",
|
1497
|
+
"sha256:34d5c49f18778a3665d707e6286545a30339ad545950773d43977e504815fa70",
|
1498
|
+
"sha256:35e72518615aa5384ef4fae828e3af1b43102458b74a8c481f69af8abf7e802a",
|
1499
|
+
"sha256:3eb14ba1a9d07c88669b7faf8f589be67871d6409305e73e036321d89f1d904e",
|
1500
|
+
"sha256:412c6c126369ddae171c13987b38df5122cb92015cba6f9ee1193b867f3f1530",
|
1501
|
+
"sha256:4600c7a659d381146e1160235918826c50c80994e07c5b26946a3e7ec6c99249",
|
1502
|
+
"sha256:463ecfb907b256e94bfe7bcb31a6d8c7bc96eca7cbe39803e448a58bb9fcad02",
|
1503
|
+
"sha256:4a06e6c8e31c98ddc770734c63903e39f1947c9e3e5e4bef515c5491b7737dde",
|
1504
|
+
"sha256:4b2de1523d46e7016afc7e42db239bd41f2163316935de7c84d0e19af7e69538",
|
1505
|
+
"sha256:4dabd775fd66cf17f31f8625fc0e4cfc5765f7982f94dc09b9e5868182cb71c0",
|
1506
|
+
"sha256:4eff9c270afd23e2746e921e80182872058a7a592017b2713f33f96cc5f82e32",
|
1507
|
+
"sha256:52607d0ebea43cf214e2ee84a6a76bc774176f97c5a774ce33277514875a718e",
|
1508
|
+
"sha256:533e0f66c32093a987a30df3ad6ed21170db9d581d0b38e71396c49718fbb1ca",
|
1509
|
+
"sha256:5493a8120d6fc185f60e7254fc056a6742f1db68c0f849cfc9ab46163c21df47",
|
1510
|
+
"sha256:5d2d1fe548def3267b4c70a8568f108d1fed7cbbeccb9cc166e05af2abc25c22",
|
1511
|
+
"sha256:5dfbc543578058c340360f851ddcecd7a1e26b0d9b5b69259b526da9edfa8875",
|
1512
|
+
"sha256:66a40003bc244e4ad86b72abb9965d304726d05a939e8c09ce844d27af9e6d37",
|
1513
|
+
"sha256:67de057fbcb04a066171bd9ee6bcb58738d89378ee3cabff0bffbf343ae1c787",
|
1514
|
+
"sha256:6827f8c1b2f13f1420545bd6d5b3f9e0b85fe750388425be53d23c760dcf176b",
|
1515
|
+
"sha256:6b35e07f1d57b79b86a7de8ecdcefb78485dab9851b9638c2c793c50203b2ae8",
|
1516
|
+
"sha256:7399d45b62d755e9ebba94eb89437f80512c08edde8c63716552a3aade61eb42",
|
1517
|
+
"sha256:788b6ff6728072b313802be13e88113c33696a9a1f2f6d634a97c20f7ef5ccce",
|
1518
|
+
"sha256:78f1b79132a69fe8bd6b5d91ef433c8eb40688ba782b26f8c9f3d2d9ca23626f",
|
1519
|
+
"sha256:79f4f502125a41b1b3b34449e747a6abfd52a709d539ea7769101696bdca6716",
|
1520
|
+
"sha256:7a8517b6d4005facdbd7eb4e8cf54797dbca100a7df459fdaff4c5123265c1cd",
|
1521
|
+
"sha256:7bd5c5ee1448b6408734eaa29c0d820d061ae18cb17232ce37848376dcfa3e92",
|
1522
|
+
"sha256:7f5243357e6da9a90c56282f64b50d29cba2ee1f745381174caacc50d501b109",
|
1523
|
+
"sha256:805cb481474e111ee3687c9047c5f3286e62496f09c0e82e8853338aaaa348f8",
|
1524
|
+
"sha256:871f55e478b5a648c08dd24af44345406d0e636ffe021d64c9b57a4a11518304",
|
1525
|
+
"sha256:87a1ce1f5e5dc4b6f4e0aac34e7bb535cb23bd4f5d9c799ed1633b65c2bcad8c",
|
1526
|
+
"sha256:8a10ca7f8a1ea0fd5630f02feb055b0f5cdfcd07bb3715fc1b6f8cb72bf114e4",
|
1527
|
+
"sha256:995c2bacdddcb640c2ca558e6760383dcdd68830160af92b5c6e6928ffd259b4",
|
1528
|
+
"sha256:9f03143f8f851dd8de6b0c10784363712058f38209e926723c80654c1b40327a",
|
1529
|
+
"sha256:a1c6b0a5e3e326a466d809b651c63f278b1256146a377a528b6938a279da334f",
|
1530
|
+
"sha256:a28f9c238f1e143ff42ab3ba27990dfb964e5d413c0eb001b88794c5c4a528a9",
|
1531
|
+
"sha256:b2cf5b5ddb69142511d5559c427ff00ec8c0919a1e6c09486e9c32636ea2b9dd",
|
1532
|
+
"sha256:b761a6847f96fdc2d002e29e9e9ac2439c13b919adfd64e8ef49e75f6355c548",
|
1533
|
+
"sha256:bf555f3e25ac3a70c67807b2949bfe15f377a40df84b71ab2c58d8593a1e036e",
|
1534
|
+
"sha256:c08a972cbac2a14810463aec3a47ff218bb00c1a607e6689b531a7c589c50723",
|
1535
|
+
"sha256:c457a38351fb6234781d054260c60e531047e4d07beca1889b558ff73dc2014b",
|
1536
|
+
"sha256:c4c433f78c2908ae352848f56589c02b982d0e741b7905228fad628999799de4",
|
1537
|
+
"sha256:d9f119e7736967c0ea03aff91ac7d04555ee038caf89bb855d93bbd04ae85b41",
|
1538
|
+
"sha256:e6b0a1c7ed54a5361aaebb910c1fa864bae34273662bb4ff788a527eafd6e14d",
|
1539
|
+
"sha256:f2bcb085faffcacf9319b1b1445a7e1cfdc6fb46c03f2dce7bc2d9a4b3c1cdc5",
|
1540
|
+
"sha256:fe193d3ae297c423e0e567e240b4324d6b6c280a048e64c77a3ea6886cc2aa87"
|
1541
1541
|
],
|
1542
1542
|
"markers": "python_version >= '3.7'",
|
1543
|
-
"version": "==2.0.
|
1543
|
+
"version": "==2.0.39"
|
1544
1544
|
},
|
1545
1545
|
"sqlmodel": {
|
1546
1546
|
"hashes": [
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# SPDX-License-Identifier: CC-BY-NC-4.0
|
2
|
+
# Copyright OSISM GmbH, 2022-2023
|
3
|
+
|
4
|
+
from loguru import logger
|
5
|
+
from pottery import Redlock
|
6
|
+
|
7
|
+
from osism import utils
|
8
|
+
|
9
|
+
|
10
|
+
def get_state(device):
|
11
|
+
"""Gets the state (device_state) stored in the Netbox for a device."""
|
12
|
+
|
13
|
+
result = None
|
14
|
+
device_a = utils.nb.dcim.devices.get(name=device)
|
15
|
+
result = device_a.custom_fields["device_state"]
|
16
|
+
|
17
|
+
return result
|
18
|
+
|
19
|
+
|
20
|
+
def get_states(devices):
|
21
|
+
"""Gets the state (device_state) stored in the Netbox for a list of devices."""
|
22
|
+
|
23
|
+
result = {}
|
24
|
+
for device in devices:
|
25
|
+
device_a = utils.nb.dcim.devices.get(name=device)
|
26
|
+
result[device] = device_a.custom_fields["device_state"]
|
27
|
+
|
28
|
+
return result
|
29
|
+
|
30
|
+
|
31
|
+
def set_maintenance(device, state):
|
32
|
+
"""Set the maintenance state for a device in the Netbox."""
|
33
|
+
|
34
|
+
logger.info(f"Set maintenance state of device {device} = {state}")
|
35
|
+
|
36
|
+
device_a = utils.nb.dcim.devices.get(name=device)
|
37
|
+
device_a.custom_fields = {"maintenance": state}
|
38
|
+
device_a.save()
|
39
|
+
|
40
|
+
|
41
|
+
def set_ironic_state(device, state):
|
42
|
+
"""Set the ironic state (ironic_state) for a device in the Netbox."""
|
43
|
+
|
44
|
+
logger.info(f"Set ironic state of device {device} = {state}")
|
45
|
+
|
46
|
+
device_a = utils.nb.dcim.devices.get(name=device)
|
47
|
+
device_a.custom_fields = {"ironic_state": state}
|
48
|
+
device_a.save()
|
49
|
+
|
50
|
+
|
51
|
+
def set_introspection_state(device, state):
|
52
|
+
"""Set the introspection state (introspection_state) for a device in the Netbox."""
|
53
|
+
|
54
|
+
logger.info(f"Set introspection state of device {device} = {state}")
|
55
|
+
|
56
|
+
device_a = utils.nb.dcim.devices.get(name=device)
|
57
|
+
device_a.custom_fields = {"introspection_state": state}
|
58
|
+
device_a.save()
|
59
|
+
|
60
|
+
|
61
|
+
def set_deployment_state(device, state):
|
62
|
+
"""Set the deployment state (deployment_state) for a device in the Netbox."""
|
63
|
+
|
64
|
+
logger.info(f"Set deployment state of device {device} = {state}")
|
65
|
+
|
66
|
+
device_a = utils.nb.dcim.devices.get(name=device)
|
67
|
+
device_a.custom_fields = {"deployment_state": state}
|
68
|
+
device_a.save()
|
69
|
+
|
70
|
+
|
71
|
+
def set_device_state(device, state):
|
72
|
+
"""Set the state (device_state) for a device in the Netbox."""
|
73
|
+
|
74
|
+
logger.info(f"Set state of device {device} = {state}")
|
75
|
+
|
76
|
+
device_a = utils.nb.dcim.devices.get(name=device)
|
77
|
+
device_a.custom_fields = {"device_state": state}
|
78
|
+
device_a.save()
|
79
|
+
|
80
|
+
|
81
|
+
def set_state(device, state, state_type):
|
82
|
+
"""Set the state for a device in the Netbox."""
|
83
|
+
|
84
|
+
lock = Redlock(key=f"lock_state_{device}", masters={utils.redis})
|
85
|
+
lock.acquire()
|
86
|
+
|
87
|
+
if state_type == "power":
|
88
|
+
set_power_state(device, state)
|
89
|
+
elif state_type == "provision":
|
90
|
+
set_provision_state(device, state)
|
91
|
+
elif state_type == "introspection":
|
92
|
+
set_introspection_state(device, state)
|
93
|
+
elif state_type == "ironic":
|
94
|
+
set_ironic_state(device, state)
|
95
|
+
elif state_type == "deployment":
|
96
|
+
set_deployment_state(device, state)
|
97
|
+
else:
|
98
|
+
set_device_state(device, state)
|
99
|
+
|
100
|
+
lock.release()
|
101
|
+
|
102
|
+
|
103
|
+
def set_provision_state(device, state):
|
104
|
+
"""Set the provision state (provision_state) for a device in the Netbox."""
|
105
|
+
|
106
|
+
logger.info(f"Set provision state of device {device} = {state}")
|
107
|
+
|
108
|
+
device_a = utils.nb.dcim.devices.get(name=device)
|
109
|
+
device_a.custom_fields = {"provision_state": state}
|
110
|
+
device_a.save()
|
111
|
+
|
112
|
+
|
113
|
+
def set_power_state(device, state):
|
114
|
+
"""Set the power state (power_state) for a device in the Netbox."""
|
115
|
+
|
116
|
+
logger.info(f"Set power state of device {device} = {state}")
|
117
|
+
|
118
|
+
device_a = utils.nb.dcim.devices.get(name=device)
|
119
|
+
device_a.custom_fields = {"power_state": state}
|
120
|
+
device_a.save()
|
@@ -0,0 +1,164 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
|
3
|
+
import argparse
|
4
|
+
|
5
|
+
from cliff.command import Command
|
6
|
+
from loguru import logger
|
7
|
+
from redis import Redis
|
8
|
+
|
9
|
+
from osism import settings
|
10
|
+
from osism.tasks import conductor, netbox, reconciler, openstack, handle_task
|
11
|
+
|
12
|
+
|
13
|
+
redis = Redis(host=settings.REDIS_HOST, port=settings.REDIS_PORT, db=settings.REDIS_DB)
|
14
|
+
redis.ping()
|
15
|
+
|
16
|
+
|
17
|
+
class Run(Command):
|
18
|
+
def get_parser(self, prog_name):
|
19
|
+
parser = super(Run, self).get_parser(prog_name)
|
20
|
+
parser.add_argument(
|
21
|
+
"arguments", nargs=argparse.REMAINDER, help="Other arguments for Ansible"
|
22
|
+
)
|
23
|
+
parser.add_argument(
|
24
|
+
"--no-wait",
|
25
|
+
default=False,
|
26
|
+
help="Do not wait until the role has been applied",
|
27
|
+
action="store_true",
|
28
|
+
)
|
29
|
+
return parser
|
30
|
+
|
31
|
+
def take_action(self, parsed_args):
|
32
|
+
pass
|
33
|
+
|
34
|
+
|
35
|
+
class Ironic(Command):
|
36
|
+
def get_parser(self, prog_name):
|
37
|
+
parser = super(Ironic, self).get_parser(prog_name)
|
38
|
+
return parser
|
39
|
+
|
40
|
+
def take_action(self, parsed_args):
|
41
|
+
# Get Ironic parameters from the conductor
|
42
|
+
task = conductor.get_ironic_parameters.delay()
|
43
|
+
task.wait(timeout=None, interval=0.5)
|
44
|
+
ironic_parameters = task.get()
|
45
|
+
|
46
|
+
# Add all unregistered systems from the Netbox in Ironic
|
47
|
+
netbox.get_devices_not_yet_registered_in_ironic.apply_async(
|
48
|
+
(), link=openstack.baremetal_create_nodes.s(ironic_parameters)
|
49
|
+
)
|
50
|
+
|
51
|
+
# Synchronize the current status in Ironic with the Netbox
|
52
|
+
# openstack.baremetal_node_list.apply_async((), link=netbox.synchronize_device_state.s())
|
53
|
+
|
54
|
+
# Remove systems from Ironic that are no longer present in the Netbox
|
55
|
+
|
56
|
+
|
57
|
+
class Sync(Command):
|
58
|
+
def get_parser(self, prog_name):
|
59
|
+
parser = super(Sync, self).get_parser(prog_name)
|
60
|
+
parser.add_argument(
|
61
|
+
"--no-wait",
|
62
|
+
default=False,
|
63
|
+
help="Do not wait until the sync has been completed",
|
64
|
+
action="store_true",
|
65
|
+
)
|
66
|
+
return parser
|
67
|
+
|
68
|
+
def take_action(self, parsed_args):
|
69
|
+
wait = not parsed_args.no_wait
|
70
|
+
|
71
|
+
task = reconciler.sync_inventory_with_netbox.delay()
|
72
|
+
if wait:
|
73
|
+
logger.info(f"Task {task.task_id} is running. Wait. No more output.")
|
74
|
+
task.wait(timeout=None, interval=0.5)
|
75
|
+
|
76
|
+
|
77
|
+
class Manage(Command):
|
78
|
+
def get_parser(self, prog_name):
|
79
|
+
parser = super(Manage, self).get_parser(prog_name)
|
80
|
+
parser.add_argument(
|
81
|
+
"--no-wait",
|
82
|
+
default=False,
|
83
|
+
help="Do not wait until the management of the netbox has been completed",
|
84
|
+
action="store_true",
|
85
|
+
)
|
86
|
+
parser.add_argument(
|
87
|
+
"--no-netbox-wait",
|
88
|
+
default=False,
|
89
|
+
help="Do not wait for the netbox API to be ready",
|
90
|
+
action="store_true",
|
91
|
+
)
|
92
|
+
parser.add_argument(
|
93
|
+
"--limit",
|
94
|
+
type=str,
|
95
|
+
default=None,
|
96
|
+
help="Limit files by prefix",
|
97
|
+
)
|
98
|
+
parser.add_argument(
|
99
|
+
"--skipdtl",
|
100
|
+
default=False,
|
101
|
+
help="Skip devicetype library",
|
102
|
+
action="store_true",
|
103
|
+
)
|
104
|
+
parser.add_argument(
|
105
|
+
"--skipmtl",
|
106
|
+
default=False,
|
107
|
+
help="Skip moduletype library",
|
108
|
+
action="store_true",
|
109
|
+
)
|
110
|
+
parser.add_argument(
|
111
|
+
"--skipres",
|
112
|
+
default=False,
|
113
|
+
help="Skip resources",
|
114
|
+
action="store_true",
|
115
|
+
)
|
116
|
+
return parser
|
117
|
+
|
118
|
+
def take_action(self, parsed_args):
|
119
|
+
wait = not parsed_args.no_wait
|
120
|
+
arguments = []
|
121
|
+
|
122
|
+
if parsed_args.no_netbox_wait:
|
123
|
+
arguments.append("--no-wait")
|
124
|
+
else:
|
125
|
+
arguments.append("--wait")
|
126
|
+
|
127
|
+
if parsed_args.limit:
|
128
|
+
arguments.append("--limit {parsed_args.limit}")
|
129
|
+
|
130
|
+
if parsed_args.skipdtl:
|
131
|
+
arguments.append("--skipdtl")
|
132
|
+
else:
|
133
|
+
arguments.append("--no-skipdtl")
|
134
|
+
|
135
|
+
if parsed_args.skipmtl:
|
136
|
+
arguments.append("--skipmtl")
|
137
|
+
else:
|
138
|
+
arguments.append("--no-skipmtl")
|
139
|
+
|
140
|
+
if parsed_args.skipres:
|
141
|
+
arguments.append("--skipres")
|
142
|
+
else:
|
143
|
+
arguments.append("--no-skipres")
|
144
|
+
|
145
|
+
task_signature = netbox.manage.si(*arguments)
|
146
|
+
task = task_signature.apply_async()
|
147
|
+
if wait:
|
148
|
+
logger.info(
|
149
|
+
f"It takes a moment until task {task.task_id} (netbox-manager) has been started and output is visible here."
|
150
|
+
)
|
151
|
+
|
152
|
+
return handle_task(task, wait, format="script", timeout=3600)
|
153
|
+
|
154
|
+
|
155
|
+
class Ping(Command):
|
156
|
+
def get_parser(self, prog_name):
|
157
|
+
parser = super(Ping, self).get_parser(prog_name)
|
158
|
+
return parser
|
159
|
+
|
160
|
+
def take_action(self, parsed_args):
|
161
|
+
task = netbox.ping.delay()
|
162
|
+
task.wait(timeout=None, interval=0.5)
|
163
|
+
result = task.get()
|
164
|
+
print(result)
|