python-chi 1.0.0__tar.gz → 1.0.2__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.
- python_chi-1.0.2/ChangeLog +7 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/PKG-INFO +1 -1
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/hardware.py +4 -4
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/lease.py +4 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/server.py +5 -3
- {python_chi-1.0.0 → python_chi-1.0.2}/python_chi.egg-info/PKG-INFO +1 -1
- python_chi-1.0.2/python_chi.egg-info/pbr.json +1 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/setup.py +1 -1
- python_chi-1.0.0/ChangeLog +0 -7
- python_chi-1.0.0/python_chi.egg-info/pbr.json +0 -1
- {python_chi-1.0.0 → python_chi-1.0.2}/.github/CODEOWNERS +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/.github/workflows/pypi-publish.yml +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/.github/workflows/test.yml +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/.mailmap +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/.readthedocs.yml +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/AUTHORS +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/DEVELOPMENT.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/LICENSE +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/Makefile +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/README.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/__init__.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/clients.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/container.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/context.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/exception.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/image.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/jupyterhub.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/keypair.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/magic.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/network.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/share.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/ssh.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/storage.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/chi/util.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/__init__.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/conf.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/generate_notebook.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/index.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/clients.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/container.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/context.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/exception.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/hardware.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/image.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/lease.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/magic.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/network.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/server.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/share.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/ssh.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/modules/storage.rst +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/docs/requirements.txt +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/python_chi.egg-info/SOURCES.txt +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/python_chi.egg-info/dependency_links.txt +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/python_chi.egg-info/not-zip-safe +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/python_chi.egg-info/requires.txt +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/python_chi.egg-info/top_level.txt +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/requirements.txt +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/setup.cfg +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/test-requirements.txt +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/tests/__init__.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/tests/test_container.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/tests/test_context.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/tests/test_lease.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/tests/test_network.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/tests/test_server.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/tests/test_share.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/tests/test_ssh.py +0 -0
- {python_chi-1.0.0 → python_chi-1.0.2}/tox.ini +0 -0
|
@@ -180,14 +180,14 @@ def get_nodes(
|
|
|
180
180
|
|
|
181
181
|
if isinstance(node.gpu, list):
|
|
182
182
|
gpu_filter = gpu is None or (
|
|
183
|
-
node.gpu and gpu == bool(node.gpu[0]
|
|
183
|
+
node.gpu and gpu == bool(node.gpu[0].get("gpu"))
|
|
184
184
|
)
|
|
185
185
|
else:
|
|
186
|
-
gpu_filter = gpu is None or (node.gpu and gpu == bool(node.gpu
|
|
186
|
+
gpu_filter = gpu is None or (node.gpu and gpu == bool(node.gpu.get("gpu")))
|
|
187
187
|
|
|
188
188
|
cpu_filter = (
|
|
189
189
|
min_number_cpu is None
|
|
190
|
-
or node.architecture
|
|
190
|
+
or node.architecture.get("smt_size", 0) >= min_number_cpu
|
|
191
191
|
)
|
|
192
192
|
|
|
193
193
|
if (
|
|
@@ -198,7 +198,7 @@ def get_nodes(
|
|
|
198
198
|
):
|
|
199
199
|
nodes.append(node)
|
|
200
200
|
|
|
201
|
-
if node_type not in node_types:
|
|
201
|
+
if node_type is not None and node_type not in node_types:
|
|
202
202
|
if all_sites:
|
|
203
203
|
raise exception.CHIValueError(
|
|
204
204
|
f"Unknown node_type '{node_type}' at all sites."
|
|
@@ -308,6 +308,10 @@ class Lease:
|
|
|
308
308
|
reservation_list=self.node_reservations, node_name=node.name
|
|
309
309
|
)
|
|
310
310
|
else:
|
|
311
|
+
if not amount or not (node_type or node_name):
|
|
312
|
+
raise CHIValueError(
|
|
313
|
+
"You must specify amount and either node_type or node_name"
|
|
314
|
+
)
|
|
311
315
|
add_node_reservation(
|
|
312
316
|
reservation_list=self.node_reservations,
|
|
313
317
|
count=amount,
|
|
@@ -595,9 +595,11 @@ def list_flavors() -> List[Flavor]:
|
|
|
595
595
|
Returns:
|
|
596
596
|
A list of all flavors.
|
|
597
597
|
"""
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
598
|
+
if Version(context.version) >= Version("1.0"):
|
|
599
|
+
nova_client = nova()
|
|
600
|
+
flavors = nova_client.flavors.list()
|
|
601
|
+
return [Flavor(name=f.name, disk=f.disk, ram=f.ram, vcpus=f.vcpus) for f in flavors]
|
|
602
|
+
return nova().flavors.list()
|
|
601
603
|
|
|
602
604
|
|
|
603
605
|
def get_flavor(ref) -> NovaFlavor:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "b0c1918", "is_release": false}
|
python_chi-1.0.0/ChangeLog
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "16b6624", "is_release": false}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|