ibee-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 (36) hide show
  1. {ibee_cli-0.10.0/src/ibee_cli.egg-info → ibee_cli-0.11.0}/PKG-INFO +4 -3
  2. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/README.md +2 -1
  3. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/pyproject.toml +2 -2
  4. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/__init__.py +1 -1
  5. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/__init__.py +1 -1
  6. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/billing.py +1 -1
  7. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/block_storage.py +1 -1
  8. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/buckets.py +1 -1
  9. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/cdn.py +1 -1
  10. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/compute.py +1 -1
  11. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/firewalls.py +1 -1
  12. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/gpus.py +1 -1
  13. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/load_balancers.py +1 -1
  14. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/ops.py +1 -1
  15. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/registries.py +1 -1
  16. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/reserved_ips.py +1 -1
  17. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/secrets.py +2 -2
  18. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/vms.py +1 -1
  19. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/commands/vpcs.py +1 -1
  20. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/render.py +6 -1
  21. {ibee_cli-0.10.0 → ibee_cli-0.11.0/src/ibee_cli.egg-info}/PKG-INFO +4 -3
  22. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli.egg-info/requires.txt +1 -1
  23. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/tests/test_command_behaviour.py +9 -4
  24. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/tests/test_contract_014_commands.py +1 -0
  25. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/tests/test_contract_commands.py +1 -1
  26. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/LICENSE +0 -0
  27. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/setup.cfg +0 -0
  28. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/billing_selection.py +0 -0
  29. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/context.py +0 -0
  30. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/helpers.py +0 -0
  31. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli/main.py +0 -0
  32. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli.egg-info/SOURCES.txt +0 -0
  33. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli.egg-info/dependency_links.txt +0 -0
  34. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli.egg-info/entry_points.txt +0 -0
  35. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/src/ibee_cli.egg-info/top_level.txt +0 -0
  36. {ibee_cli-0.10.0 → ibee_cli-0.11.0}/tests/test_cli_core.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ibee-cli
3
- Version: 0.10.0
3
+ Version: 0.11.0
4
4
  Summary: Official command-line interface for the IBEE Solutions cloud platform
5
5
  Author-email: IBEE Solutions <support@ibee.ai>
6
6
  License-Expression: MIT
@@ -13,7 +13,7 @@ Classifier: Environment :: Console
13
13
  Requires-Python: >=3.10
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: ibee<0.11,>=0.10.0
16
+ Requires-Dist: ibee<0.12,>=0.11.0
17
17
  Requires-Dist: httpx>=0.27
18
18
  Requires-Dist: typer>=0.12
19
19
  Requires-Dist: click>=8.1
@@ -153,7 +153,8 @@ The endpoint is chosen in this order: `--base-url`, `IBEE_BASE_URL`, `IBEE_ENDPO
153
153
  The server's answer is printed as JSON by default. `-o yaml` prints it as YAML,
154
154
  `-o table` as a table (one row per item of a list, or one row per field of an
155
155
  object) and `-o id` one identifier per line (for a list, the value the API takes for
156
- each item, such as a bucket's name). An empty answer (HTTP 204) prints nothing.
156
+ each item, such as a bucket's name). Every delete prints its answer, including
157
+ `deletion`: whether the resource is gone (`deleted`) or still going (`deleting`).
157
158
  Destructive commands (every delete and revoke, `buckets credentials revoke`, `cdn purge`,
158
159
  VM restores and volume detach, `secrets versions destroy` and `secrets workspace enable`,
159
160
  which can't be undone) ask for confirmation; `--yes` (or the global `--yes`) skips it.
@@ -127,7 +127,8 @@ The endpoint is chosen in this order: `--base-url`, `IBEE_BASE_URL`, `IBEE_ENDPO
127
127
  The server's answer is printed as JSON by default. `-o yaml` prints it as YAML,
128
128
  `-o table` as a table (one row per item of a list, or one row per field of an
129
129
  object) and `-o id` one identifier per line (for a list, the value the API takes for
130
- each item, such as a bucket's name). An empty answer (HTTP 204) prints nothing.
130
+ each item, such as a bucket's name). Every delete prints its answer, including
131
+ `deletion`: whether the resource is gone (`deleted`) or still going (`deleting`).
131
132
  Destructive commands (every delete and revoke, `buckets credentials revoke`, `cdn purge`,
132
133
  VM restores and volume detach, `secrets versions destroy` and `secrets workspace enable`,
133
134
  which can't be undone) ask for confirmation; `--yes` (or the global `--yes`) skips it.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ibee-cli"
7
- version = "0.10.0"
7
+ version = "0.11.0"
8
8
  description = "Official command-line interface for the IBEE Solutions cloud platform"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -18,7 +18,7 @@ classifiers = [
18
18
  "Environment :: Console",
19
19
  ]
20
20
  dependencies = [
21
- "ibee>=0.10.0,<0.11",
21
+ "ibee>=0.11.0,<0.12",
22
22
  "httpx>=0.27",
23
23
  "typer>=0.12",
24
24
  "click>=8.1",
@@ -1,3 +1,3 @@
1
1
  """IBEE Solutions command-line interface."""
2
2
 
3
- __version__ = "0.10.0"
3
+ __version__ = "0.11.0"
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """The command groups, in `ibee --help` order."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee billing``: Organization wallet balance and top-ups (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee block-storage``: Block Storage volumes and plans (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee buckets``: Object Storage buckets, bucket settings and S3 credentials (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee cdn``: CDN distributions, website configuration and custom domains (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee compute``: Compute catalog: sites, plans, images and recovery storage plans (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee firewalls``: Firewall groups, rules and attachments (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee gpus``: GPU VMs (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee load-balancers``: Regional load balancers (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee ops``: Async compute operations of cloud and GPU VMs (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee registries``: Container Registry (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee reserved-ips``: Reserved IPs (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee secrets``: Secret Manager: secret names, metadata, versions and app credentials (no values) (one command per contract operation)."""
4
4
 
@@ -32,7 +32,7 @@ def get_secret_manager_workspace(
32
32
  emit(result)
33
33
 
34
34
 
35
- @workspace_app.command('enable', help='Enable Secret Manager.\n\nEnables Secret Manager for the workspace. Answers 202 with an operation to read with getSecretManagerOperation. Billing can refuse it (403 billing_denied). Requires scope: secret-manager.write.\n\nAPI: POST /secret-manager/workspace/enable (enableSecretManagerWorkspace).', short_help='Enable Secret Manager')
35
+ @workspace_app.command('enable', help='Enable Secret Manager.\n\nEnables Secret Manager for the workspace. Answers 202 with an operation to read with getSecretManagerOperation. Billing can refuse it (402 billing_denied, with billing_reason). Requires scope: secret-manager.write.\n\nAPI: POST /secret-manager/workspace/enable (enableSecretManagerWorkspace).', short_help='Enable Secret Manager')
36
36
  @handle_api_errors
37
37
  def enable_secret_manager_workspace(
38
38
  ctx: typer.Context,
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee vms``: Cloud VMs (one command per contract operation)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.14.3).
1
+ # Generated by scripts/generate_commands.py from contract/ibee-cloud.yaml (IBEE Solutions API 0.15.1).
2
2
  # Do not edit by hand: change the contract or the generator and run the script again.
3
3
  """``ibee vpcs``: VPCs, subnets, nodes, NAT gateways and port forwarding (one command per contract operation)."""
4
4
 
@@ -3,7 +3,8 @@
3
3
  Every command prints the server's answer as received. Output modes (global
4
4
  ``-o/--output``, env ``IBEE_OUTPUT``; ``--json`` is ``-o json``): ``json`` (the
5
5
  default), ``yaml``, ``table`` (the items of a list, or the fields of one object) and
6
- ``id`` (one identifier per line). An empty answer (HTTP 204) prints nothing.
6
+ ``id`` (one identifier per line). An empty answer prints nothing (since contract
7
+ 0.15.0 no operation answers 204: a delete prints its ``deletion`` state).
7
8
 
8
9
  Errors go to stderr: the HTTP status and the server's code, message and request id
9
10
  exactly as the server sent them (``{"error": {...}}`` with the raw body under ``-o
@@ -372,6 +373,10 @@ def _print_error(record: dict) -> None:
372
373
  if key in record:
373
374
  value = record[key]
374
375
  _err(f" {key}: {'-' if value in (None, '') else value}")
376
+ # Billing asked for a top-up: say how to add it from here (Billing set the amount; nothing is decided here).
377
+ if record.get("status") == 402 and record.get("required_topup_minor"):
378
+ _err(f" To add credit from the CLI: ibee billing topup --amount-minor {record['required_topup_minor']}"
379
+ " (prints a payment link; the token needs Billing → Edit)")
375
380
 
376
381
 
377
382
  def exit_code(exc: ApiError) -> int:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ibee-cli
3
- Version: 0.10.0
3
+ Version: 0.11.0
4
4
  Summary: Official command-line interface for the IBEE Solutions cloud platform
5
5
  Author-email: IBEE Solutions <support@ibee.ai>
6
6
  License-Expression: MIT
@@ -13,7 +13,7 @@ Classifier: Environment :: Console
13
13
  Requires-Python: >=3.10
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: ibee<0.11,>=0.10.0
16
+ Requires-Dist: ibee<0.12,>=0.11.0
17
17
  Requires-Dist: httpx>=0.27
18
18
  Requires-Dist: typer>=0.12
19
19
  Requires-Dist: click>=8.1
@@ -153,7 +153,8 @@ The endpoint is chosen in this order: `--base-url`, `IBEE_BASE_URL`, `IBEE_ENDPO
153
153
  The server's answer is printed as JSON by default. `-o yaml` prints it as YAML,
154
154
  `-o table` as a table (one row per item of a list, or one row per field of an
155
155
  object) and `-o id` one identifier per line (for a list, the value the API takes for
156
- each item, such as a bucket's name). An empty answer (HTTP 204) prints nothing.
156
+ each item, such as a bucket's name). Every delete prints its answer, including
157
+ `deletion`: whether the resource is gone (`deleted`) or still going (`deleting`).
157
158
  Destructive commands (every delete and revoke, `buckets credentials revoke`, `cdn purge`,
158
159
  VM restores and volume detach, `secrets versions destroy` and `secrets workspace enable`,
159
160
  which can't be undone) ask for confirmation; `--yes` (or the global `--yes`) skips it.
@@ -1,4 +1,4 @@
1
- ibee<0.11,>=0.10.0
1
+ ibee<0.12,>=0.11.0
2
2
  httpx>=0.27
3
3
  typer>=0.12
4
4
  click>=8.1
@@ -195,7 +195,8 @@ def test_bad_json_option_sends_nothing(gw, value) -> None:
195
195
 
196
196
 
197
197
  def test_global_yes_and_env_skip_confirmation(gw, monkeypatch) -> None:
198
- gw.on("DELETE", "networking/reserved-ips/rip-1", None)
198
+ gw.on("DELETE", "networking/reserved-ips/rip-1",
199
+ {"id": "rip-1", "status": "released", "deletion": {"resource_id": "rip-1", "state": "released"}})
199
200
  assert run(["--yes", "reserved-ips", "release", "rip-1"]).exit_code == 0
200
201
  monkeypatch.setenv("IBEE_ASSUME_YES", "1")
201
202
  assert run(["reserved-ips", "release", "rip-1"]).exit_code == 0
@@ -238,9 +239,13 @@ def test_ids_of_bare_lists_and_objects(gw) -> None:
238
239
  assert "operation_id" in table and "op-1" in table
239
240
 
240
241
 
241
- def test_empty_answer_prints_nothing(gw) -> None:
242
- gw.on("DELETE", "networking/vpcs/vpc-1", None)
242
+ def test_delete_prints_the_deletion_answer(gw) -> None:
243
+ """Contract 0.15.0: no delete answers 204; the CLI prints what the server says."""
244
+ gone = {"id": "vpc-1", "status": "deleted",
245
+ "deletion": {"resource_id": "vpc-1", "state": "deleted", "check": "GET /v1/networking/vpcs/vpc-1"}}
246
+ gw.on("DELETE", "networking/vpcs/vpc-1", gone)
243
247
  result = run(["vpcs", "delete", "vpc-1", "--yes"])
244
- assert result.exit_code == 0 and result.output == ""
248
+ assert result.exit_code == 0 and json.loads(result.output) == gone
249
+ assert run(["-o", "id", "vpcs", "delete", "vpc-1", "--yes"]).output.strip() == "vpc-1"
245
250
 
246
251
 
@@ -84,6 +84,7 @@ def test_initial_topup_refusal_shows_the_minimum(gw) -> None:
84
84
  text = plain(result)
85
85
  assert "reason: initial_topup_required" in text
86
86
  assert "required_topup_minor: 50000" in text and "billing_currency: INR" in text
87
+ assert "ibee billing topup --amount-minor 50000" in text
87
88
  result = run(["-o", "json", "reserved-ips", "reserve", "--site-id", "VGA"])
88
89
  error = json.loads(result.output)["error"]
89
90
  assert (error["required_topup_minor"], error["billing_currency"]) == (50000, "INR")
@@ -128,7 +128,7 @@ TREE = command_tree()
128
128
 
129
129
  def test_one_command_per_operation() -> None:
130
130
  assert len(OPS) == 222
131
- assert CONTRACT["info"]["version"] == "0.14.3"
131
+ assert CONTRACT["info"]["version"] == "0.15.1"
132
132
  assert set(TREE) == {op.id for op in OPS}
133
133
 
134
134
 
File without changes
File without changes