multicloud-cli 0.10.0__tar.gz → 0.11.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.
Files changed (42) hide show
  1. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/PKG-INFO +3 -3
  2. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/README.md +2 -2
  3. multicloud_cli-0.11.0/multicloud_cli/__init__.py +1 -0
  4. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/cloud_account.py +4 -4
  5. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/extend.py +5 -2
  6. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/pool.py +2 -1
  7. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_account_extend.py +9 -0
  8. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_pool.py +5 -1
  9. multicloud_cli-0.10.0/multicloud_cli/__init__.py +0 -1
  10. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/.gitignore +0 -0
  11. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/LICENSE +0 -0
  12. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/account.py +0 -0
  13. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/api.py +0 -0
  14. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/auth.py +0 -0
  15. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/catalog.py +0 -0
  16. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/config.py +0 -0
  17. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/duration.py +0 -0
  18. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/exitcodes.py +0 -0
  19. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/main.py +0 -0
  20. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/net.py +0 -0
  21. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/node.py +0 -0
  22. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/orgopt.py +0 -0
  23. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/output.py +0 -0
  24. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/ssh.py +0 -0
  25. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/ssh_cert.py +0 -0
  26. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/sso.py +0 -0
  27. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/multicloud_cli/version_check.py +0 -0
  28. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/pyproject.toml +0 -0
  29. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/__init__.py +0 -0
  30. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/conftest.py +0 -0
  31. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/helpers.py +0 -0
  32. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_apply.py +0 -0
  33. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_auth.py +0 -0
  34. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_catalog.py +0 -0
  35. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_cloud_account.py +0 -0
  36. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_conventions.py +0 -0
  37. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_net.py +0 -0
  38. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_ssh.py +0 -0
  39. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_ssh_cert.py +0 -0
  40. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_sso.py +0 -0
  41. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_sso_session.py +0 -0
  42. {multicloud_cli-0.10.0 → multicloud_cli-0.11.0}/tests/test_version_check.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: multicloud-cli
3
- Version: 0.10.0
3
+ Version: 0.11.0
4
4
  Summary: mctl: the Multicloud command line: sign in, connect your cloud account, run pools
5
5
  Project-URL: Homepage, https://multicloud.io
6
6
  Author-email: Multicloud Team <info@multicloud.io>
@@ -50,7 +50,7 @@ upgrades itself. Turn the check off with `MCTL_NO_UPDATE_CHECK=1`.
50
50
  ## Connect an AWS account
51
51
 
52
52
  You need to be an owner of your organization on multicloud.io, an AWS login that can create IAM roles, and
53
- OpenTofu or Terraform 1.5 or later.
53
+ OpenTofu or Terraform 1.10 or later.
54
54
 
55
55
  ```bash
56
56
  mctl auth login # opens your browser; sign in as you do on multicloud.io
@@ -155,7 +155,7 @@ mctl pool wake ci --wait --timeout 15m # exit 0 ready, 5 timeout, 6
155
155
  | Command | What it does |
156
156
  |---|---|
157
157
  | `mctl pool create <name>` | Make a pool. Use `--from-file pool.json` for the full request, or the flags `--github-org`, `--clouds`, `--classes`, `--max-cost-per-hour`, `--spot-policy`, `--cpu-units-requests`, `--image-by-class`, `--egress-by-class`, `--class-headroom`. A repeated run with the same `--idempotency-key` makes one pool. Put cloud keys in the file, not on the command line. |
158
- | `mctl pool update <pool>` | Change `--max-cost-per-hour`, `--max-servers`, `--classes`, `--spot-policy`, `--cpu-units-requests`, `--clouds` or settings: `--set NAME=VALUE` (repeat; VALUE is JSON, else text; the name lists `instance_types`, `excluded_instance_types`, `accelerator_names` and `excluded_accelerator_names` also take comma-separated names; `grant.cpu` for grant fields), `--reset NAME`, `--settings JSON\|@file`. Only the options you give change. `mctl pool show` prints the settings, or `default: X` where a setting is unset. |
158
+ | `mctl pool update <pool>` | Change `--max-cost-per-hour`, `--max-servers`, `--classes`, `--spot-policy`, `--cpu-units-requests`, `--clouds` or settings: `--set NAME=VALUE` (repeat; VALUE is JSON, else text; the name lists `instance_types`, `excluded_instance_types`, `accelerator_names`, `excluded_accelerator_names`, `accelerator_vendors` and `excluded_accelerator_vendors` also take comma-separated names; `grant.cpu` for grant fields), `--reset NAME`, `--settings JSON\|@file`. Only the options you give change. `mctl pool show` prints the settings, or `default: X` where a setting is unset. On an Extend pool with a `PENDING` or `READY` peering, a change of `accelerator_names` or `excluded_accelerator_names` fails with 409 `POOL_HAS_PEERINGS`: revoke the peering first, or create a second pool. |
159
159
  | `mctl pool show <pool>` / `cluster <pool>` | The pool, or its machines and their cost. |
160
160
  | `mctl pool hibernate <pool>` / `wake <pool>` | Pause or resume a pool. |
161
161
  | `mctl pool delete <pool> [-y]` | Delete a pool for good. It asks first; without a terminal, `-y` is required. To pause a pool, use `hibernate`. |
@@ -19,7 +19,7 @@ upgrades itself. Turn the check off with `MCTL_NO_UPDATE_CHECK=1`.
19
19
  ## Connect an AWS account
20
20
 
21
21
  You need to be an owner of your organization on multicloud.io, an AWS login that can create IAM roles, and
22
- OpenTofu or Terraform 1.5 or later.
22
+ OpenTofu or Terraform 1.10 or later.
23
23
 
24
24
  ```bash
25
25
  mctl auth login # opens your browser; sign in as you do on multicloud.io
@@ -124,7 +124,7 @@ mctl pool wake ci --wait --timeout 15m # exit 0 ready, 5 timeout, 6
124
124
  | Command | What it does |
125
125
  |---|---|
126
126
  | `mctl pool create <name>` | Make a pool. Use `--from-file pool.json` for the full request, or the flags `--github-org`, `--clouds`, `--classes`, `--max-cost-per-hour`, `--spot-policy`, `--cpu-units-requests`, `--image-by-class`, `--egress-by-class`, `--class-headroom`. A repeated run with the same `--idempotency-key` makes one pool. Put cloud keys in the file, not on the command line. |
127
- | `mctl pool update <pool>` | Change `--max-cost-per-hour`, `--max-servers`, `--classes`, `--spot-policy`, `--cpu-units-requests`, `--clouds` or settings: `--set NAME=VALUE` (repeat; VALUE is JSON, else text; the name lists `instance_types`, `excluded_instance_types`, `accelerator_names` and `excluded_accelerator_names` also take comma-separated names; `grant.cpu` for grant fields), `--reset NAME`, `--settings JSON\|@file`. Only the options you give change. `mctl pool show` prints the settings, or `default: X` where a setting is unset. |
127
+ | `mctl pool update <pool>` | Change `--max-cost-per-hour`, `--max-servers`, `--classes`, `--spot-policy`, `--cpu-units-requests`, `--clouds` or settings: `--set NAME=VALUE` (repeat; VALUE is JSON, else text; the name lists `instance_types`, `excluded_instance_types`, `accelerator_names`, `excluded_accelerator_names`, `accelerator_vendors` and `excluded_accelerator_vendors` also take comma-separated names; `grant.cpu` for grant fields), `--reset NAME`, `--settings JSON\|@file`. Only the options you give change. `mctl pool show` prints the settings, or `default: X` where a setting is unset. On an Extend pool with a `PENDING` or `READY` peering, a change of `accelerator_names` or `excluded_accelerator_names` fails with 409 `POOL_HAS_PEERINGS`: revoke the peering first, or create a second pool. |
128
128
  | `mctl pool show <pool>` / `cluster <pool>` | The pool, or its machines and their cost. |
129
129
  | `mctl pool hibernate <pool>` / `wake <pool>` | Pause or resume a pool. |
130
130
  | `mctl pool delete <pool> [-y]` | Delete a pool for good. It asks first; without a terminal, `-y` is required. To pause a pool, use `hibernate`. |
@@ -0,0 +1 @@
1
+ __version__ = "0.11.0"
@@ -749,13 +749,13 @@ def accept_shared_account(ctx, account_id):
749
749
  def allow_quota_requests(ctx, account_id):
750
750
  """Allow Multicloud to request higher quotas in this account (organization owners only).
751
751
 
752
- Multicloud then files quota increase requests (AWS Service Quotas, Azure Microsoft.Quota) when the spot
753
- quota is too low for your pools, at most a few per day. Needs a sign-in (mctl auth login), not an API key.
752
+ Multicloud then files the quota increase requests that you ask for through the quota dialogue or
753
+ 'quota-request' (AWS Service Quotas). 'verify' files none. Needs a sign-in (mctl auth login), not an API key.
754
754
  Undo with revoke-quota-requests."""
755
755
  answer = _run(ctx, lambda org: call("PUT", org, f"/{account_id}/quota-consent", prefer_sso=True))
756
756
  click.echo(f"Multicloud may now request higher quotas in cloud account {account_id} "
757
- f"({quota_consent_label(answer)}). The next verify files what is needed: "
758
- f"mctl cloud-account verify {account_id}")
757
+ f"({quota_consent_label(answer)}). verify files nothing. File a request with: "
758
+ f"mctl cloud-account quota-request {account_id} --region R --code C --desired N")
759
759
 
760
760
 
761
761
  @cloud_account.command(name="revoke-quota-requests")
@@ -140,14 +140,17 @@ def _peering_readable(p: Dict[str, Any]) -> str:
140
140
  @peering.command(name="create")
141
141
  @click.argument("pool", metavar="POOL")
142
142
  @_grant_options
143
+ @click.option("--consumer-cluster-id", "consumer_cluster_id", default=None, metavar="ID",
144
+ help="Reuse the consumer id (c-xxxxxxxx) of an existing peering: adds this pool to the same "
145
+ "consumer cluster. The result carries a helm upgrade command.")
143
146
  @click.option("--from-file", "from_file", type=click.Path(dir_okay=False, allow_dash=True), default=None,
144
147
  help="JSON file with the request body (- for standard input); flags override its fields")
145
148
  @json_option
146
149
  @click.pass_context
147
- def create_peering(ctx, pool, from_file, as_json, **grant):
150
+ def create_peering(ctx, pool, from_file, as_json, consumer_cluster_id, **grant):
148
151
  """Create a peering for an Extend pool (name). Optional options ask for a resource grant."""
149
152
  body = load_body(from_file)
150
- body.update(_collect(**grant))
153
+ body.update(_collect(consumer_cluster_id=consumer_cluster_id, **grant))
151
154
 
152
155
  def go(org):
153
156
  try:
@@ -315,7 +315,8 @@ def _put(settings: Dict[str, Any], name: str, value: Any) -> None:
315
315
 
316
316
 
317
317
  _LIST_SETTINGS = ("instance_types", "excluded_instance_types", "accelerator_names",
318
- "excluded_accelerator_names", "regions")
318
+ "excluded_accelerator_names", "accelerator_vendors", "excluded_accelerator_vendors",
319
+ "regions")
319
320
 
320
321
 
321
322
  def _settings_body(sets, resets, settings_json) -> Dict[str, Any]:
@@ -253,6 +253,15 @@ def test_peering_create_with_gpu(monkeypatch):
253
253
  assert calls[0][2]["json"] == {"gpu": 1}
254
254
 
255
255
 
256
+ def test_peering_create_consumer_cluster_id_goes_verbatim_and_absent_is_omitted(monkeypatch):
257
+ r, calls = run(["peering", "create", "edge", "--consumer-cluster-id", "c-0a1b2c3d"],
258
+ [reply(202, PEERING)], monkeypatch)
259
+ assert r.exit_code == 0, r.output
260
+ assert calls[0][2]["json"] == {"consumer_cluster_id": "c-0a1b2c3d"}
261
+ r, calls = run(["peering", "create", "edge", "--pods", "5"], [reply(202, PEERING)], monkeypatch)
262
+ assert "consumer_cluster_id" not in calls[0][2]["json"]
263
+
264
+
256
265
  def test_peering_create_no_grant_sends_empty_body_and_file(monkeypatch, tmp_path):
257
266
  r, calls = run(["peering", "create", "edge"], [reply(202, PEERING)], monkeypatch)
258
267
  assert calls[0][2]["json"] == {}
@@ -473,11 +473,15 @@ def test_org_at_both_positions_prefers_the_subcommand(monkeypatch):
473
473
  def test_set_name_lists_split_on_commas(monkeypatch):
474
474
  r, calls, _ = run(["update", "7", "--set", "instance_types=m5.large, c5.large,,",
475
475
  "--set", 'excluded_instance_types=["x.large"]', "--set", "accelerator_names=A100",
476
+ "--set", "accelerator_vendors=NVIDIA", "--set", "excluded_accelerator_vendors=AMD,AWS",
476
477
  "--set", "affinity=a,b"], [reply(200, pool_view())], monkeypatch)
477
478
  assert r.exit_code == 0, r.output
478
479
  assert calls[0][2]["json"] == {"settings": {"instance_types": ["m5.large", "c5.large"],
479
480
  "excluded_instance_types": ["x.large"],
480
- "accelerator_names": ["A100"], "affinity": "a,b"}}
481
+ "accelerator_names": ["A100"],
482
+ "accelerator_vendors": ["NVIDIA"],
483
+ "excluded_accelerator_vendors": ["AMD", "AWS"],
484
+ "affinity": "a,b"}}
481
485
 
482
486
 
483
487
  def test_max_servers_outside_1_to_100_is_a_usage_error(monkeypatch):
@@ -1 +0,0 @@
1
- __version__ = "0.10.0"
File without changes