multicloud-cli 0.3.0__tar.gz → 0.3.1__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.
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/PKG-INFO +8 -8
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/README.md +7 -7
- multicloud_cli-0.3.1/multicloud_cli/__init__.py +1 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/account.py +1 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/auth.py +2 -2
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/catalog.py +1 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/cloud_account.py +1 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/extend.py +1 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/main.py +1 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/node.py +1 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/orgopt.py +1 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/pool.py +1 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/ssh.py +1 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_sso_session.py +1 -1
- multicloud_cli-0.3.0/multicloud_cli/__init__.py +0 -1
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/.gitignore +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/LICENSE +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/api.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/config.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/duration.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/exitcodes.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/net.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/output.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/multicloud_cli/sso.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/pyproject.toml +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/__init__.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/conftest.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/helpers.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_account_extend.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_apply.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_auth.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_catalog.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_cloud_account.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_conventions.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_net.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_pool.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_ssh.py +0 -0
- {multicloud_cli-0.3.0 → multicloud_cli-0.3.1}/tests/test_sso.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: multicloud-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
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>
|
|
@@ -47,7 +47,7 @@ Upgrade with `uv tool upgrade multicloud-cli` (or `pipx upgrade multicloud-cli`)
|
|
|
47
47
|
|
|
48
48
|
## Connect an AWS account
|
|
49
49
|
|
|
50
|
-
You need to be an owner of your
|
|
50
|
+
You need to be an owner of your organization on multicloud.io, an AWS login that can create IAM roles, and
|
|
51
51
|
OpenTofu or Terraform 1.5 or later.
|
|
52
52
|
|
|
53
53
|
```bash
|
|
@@ -78,7 +78,7 @@ mctl cloud-account verify 7 --wait
|
|
|
78
78
|
| `mctl cloud-account apply <id>` | `init`, `plan`, a question (`--yes` skips it, `--plan-only` stops after the plan), then `apply` with a fresh connect code and a wait for the check. |
|
|
79
79
|
| `mctl cloud-account token <id>` | A new one-time connect code, for a manual `terraform apply`. |
|
|
80
80
|
| `mctl cloud-account verify <id> [--wait]` | Check the role again: `Ready` (exit 0), the missing permissions (exit 1) or pending (exit 5). |
|
|
81
|
-
| `mctl cloud-account list` / `show <id> [--json]` | The connections of your
|
|
81
|
+
| `mctl cloud-account list` / `show <id> [--json]` | The connections of your organization. |
|
|
82
82
|
| `mctl overview` / `billing` | Setup checklist, alerts and pool counts; payment gate status. Read access or a member sign-in. |
|
|
83
83
|
| `mctl extend create NAME` | Make an Extend pool. Owner sign-in only. |
|
|
84
84
|
| `mctl peering create\|list\|show\|revoke POOL ...` | Manage the peerings of an Extend pool. Owner sign-in only. |
|
|
@@ -109,10 +109,10 @@ code, and you sign in on any device. Both give a short-lived access token (15 mi
|
|
|
109
109
|
access token by itself. A session ends after at most 10 hours; then run `mctl auth login` again.
|
|
110
110
|
|
|
111
111
|
- **Organization.** The sign-in holds the organizations you belong to. With one, no `--org` is needed. With
|
|
112
|
-
several, name one: `--org <
|
|
112
|
+
several, name one: `--org <org-id>` or `MULTICLOUD_ORG`.
|
|
113
113
|
- **Order of credentials.** `MULTICLOUD_API_KEY` (for CI), then the SSO sign-in, then a stored API key.
|
|
114
114
|
- **Roles.** Pool reads need membership. Everything that changes a pool, and every `cloud-account` command, needs the
|
|
115
|
-
owner role of the
|
|
115
|
+
owner role of the organization (an API key with the matching scope works too).
|
|
116
116
|
- **Logout.** `mctl auth logout` ends the session at Keycloak and deletes the local copy. Because `mctl` shares
|
|
117
117
|
your Keycloak browser session, it signs you out of Keycloak in your browser too.
|
|
118
118
|
- **Settings.** `MULTICLOUD_ISSUER_URL` (or `issuer` in `~/.config/multicloud/cli.json`) overrides the Keycloak
|
|
@@ -121,14 +121,14 @@ access token by itself. A session ends after at most 10 hours; then run `mctl au
|
|
|
121
121
|
another environment, set `MULTICLOUD_ISSUER_URL` (for example `https://auth.example.com/realms/multicloud`) and
|
|
122
122
|
`MULTICLOUD_API_URL` (for example `https://api.example.com`) to that environment's hosts before `mctl auth login`. Set both: the sign-in server (issuer) and the API must belong
|
|
123
123
|
to the same environment, or the API rejects the token.
|
|
124
|
-
- **API key (CI, scripts).** `mctl auth login --api-key --org <
|
|
124
|
+
- **API key (CI, scripts).** `mctl auth login --api-key --org <org-id>`, or `MULTICLOUD_API_KEY` in the environment.
|
|
125
125
|
|
|
126
126
|
## Manage CI pools
|
|
127
127
|
|
|
128
128
|
A pool is a group of build machines that Multicloud starts for you and stops when they are idle.
|
|
129
129
|
With an API key, reading needs **Read** access, create and update need **Write**, and delete, hibernate and wake need **Admin**.
|
|
130
|
-
With an SSO sign-in, reading needs
|
|
131
|
-
Every command takes `--org <
|
|
130
|
+
With an SSO sign-in, reading needs organization membership and the rest needs the owner role.
|
|
131
|
+
Every command takes `--org <org-id>` (also before the command: `mctl --org acme pool list`) and, where it makes
|
|
132
132
|
sense, `--json` for the raw answer. `pool list` and `cloud-account list` take `-q` (only the IDs) and
|
|
133
133
|
`--no-headers`. Data goes to stdout; progress and questions go to stderr.
|
|
134
134
|
`<pool>` is the number from `mctl pool list` or the exact pool name.
|
|
@@ -16,7 +16,7 @@ Upgrade with `uv tool upgrade multicloud-cli` (or `pipx upgrade multicloud-cli`)
|
|
|
16
16
|
|
|
17
17
|
## Connect an AWS account
|
|
18
18
|
|
|
19
|
-
You need to be an owner of your
|
|
19
|
+
You need to be an owner of your organization on multicloud.io, an AWS login that can create IAM roles, and
|
|
20
20
|
OpenTofu or Terraform 1.5 or later.
|
|
21
21
|
|
|
22
22
|
```bash
|
|
@@ -47,7 +47,7 @@ mctl cloud-account verify 7 --wait
|
|
|
47
47
|
| `mctl cloud-account apply <id>` | `init`, `plan`, a question (`--yes` skips it, `--plan-only` stops after the plan), then `apply` with a fresh connect code and a wait for the check. |
|
|
48
48
|
| `mctl cloud-account token <id>` | A new one-time connect code, for a manual `terraform apply`. |
|
|
49
49
|
| `mctl cloud-account verify <id> [--wait]` | Check the role again: `Ready` (exit 0), the missing permissions (exit 1) or pending (exit 5). |
|
|
50
|
-
| `mctl cloud-account list` / `show <id> [--json]` | The connections of your
|
|
50
|
+
| `mctl cloud-account list` / `show <id> [--json]` | The connections of your organization. |
|
|
51
51
|
| `mctl overview` / `billing` | Setup checklist, alerts and pool counts; payment gate status. Read access or a member sign-in. |
|
|
52
52
|
| `mctl extend create NAME` | Make an Extend pool. Owner sign-in only. |
|
|
53
53
|
| `mctl peering create\|list\|show\|revoke POOL ...` | Manage the peerings of an Extend pool. Owner sign-in only. |
|
|
@@ -78,10 +78,10 @@ code, and you sign in on any device. Both give a short-lived access token (15 mi
|
|
|
78
78
|
access token by itself. A session ends after at most 10 hours; then run `mctl auth login` again.
|
|
79
79
|
|
|
80
80
|
- **Organization.** The sign-in holds the organizations you belong to. With one, no `--org` is needed. With
|
|
81
|
-
several, name one: `--org <
|
|
81
|
+
several, name one: `--org <org-id>` or `MULTICLOUD_ORG`.
|
|
82
82
|
- **Order of credentials.** `MULTICLOUD_API_KEY` (for CI), then the SSO sign-in, then a stored API key.
|
|
83
83
|
- **Roles.** Pool reads need membership. Everything that changes a pool, and every `cloud-account` command, needs the
|
|
84
|
-
owner role of the
|
|
84
|
+
owner role of the organization (an API key with the matching scope works too).
|
|
85
85
|
- **Logout.** `mctl auth logout` ends the session at Keycloak and deletes the local copy. Because `mctl` shares
|
|
86
86
|
your Keycloak browser session, it signs you out of Keycloak in your browser too.
|
|
87
87
|
- **Settings.** `MULTICLOUD_ISSUER_URL` (or `issuer` in `~/.config/multicloud/cli.json`) overrides the Keycloak
|
|
@@ -90,14 +90,14 @@ access token by itself. A session ends after at most 10 hours; then run `mctl au
|
|
|
90
90
|
another environment, set `MULTICLOUD_ISSUER_URL` (for example `https://auth.example.com/realms/multicloud`) and
|
|
91
91
|
`MULTICLOUD_API_URL` (for example `https://api.example.com`) to that environment's hosts before `mctl auth login`. Set both: the sign-in server (issuer) and the API must belong
|
|
92
92
|
to the same environment, or the API rejects the token.
|
|
93
|
-
- **API key (CI, scripts).** `mctl auth login --api-key --org <
|
|
93
|
+
- **API key (CI, scripts).** `mctl auth login --api-key --org <org-id>`, or `MULTICLOUD_API_KEY` in the environment.
|
|
94
94
|
|
|
95
95
|
## Manage CI pools
|
|
96
96
|
|
|
97
97
|
A pool is a group of build machines that Multicloud starts for you and stops when they are idle.
|
|
98
98
|
With an API key, reading needs **Read** access, create and update need **Write**, and delete, hibernate and wake need **Admin**.
|
|
99
|
-
With an SSO sign-in, reading needs
|
|
100
|
-
Every command takes `--org <
|
|
99
|
+
With an SSO sign-in, reading needs organization membership and the rest needs the owner role.
|
|
100
|
+
Every command takes `--org <org-id>` (also before the command: `mctl --org acme pool list`) and, where it makes
|
|
101
101
|
sense, `--json` for the raw answer. `pool list` and `cloud-account list` take `-q` (only the IDs) and
|
|
102
102
|
`--no-headers`. Data goes to stdout; progress and questions go to stderr.
|
|
103
103
|
`<pool>` is the number from `mctl pool list` or the exact pool name.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.1"
|
|
@@ -26,7 +26,7 @@ def _get(org, path: str) -> Dict[str, Any]:
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def _org_option(f):
|
|
29
|
-
return click.option("--org", default=None, help="Organization
|
|
29
|
+
return click.option("--org", default=None, help="Organization ID, the short name such as acme (default: MULTICLOUD_ORG)")(f)
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def _checklist_line(item: Dict[str, Any]) -> str:
|
|
@@ -311,7 +311,7 @@ def auth():
|
|
|
311
311
|
|
|
312
312
|
|
|
313
313
|
@auth.command()
|
|
314
|
-
@click.option("--org", default=None, help="Organization
|
|
314
|
+
@click.option("--org", default=None, help="Organization ID, the short name such as acme (default: MULTICLOUD_ORG, saved, or the one in your sign-in)")
|
|
315
315
|
@click.option("--api-url", default=None, help="API URL (default: MULTICLOUD_API_URL or saved)")
|
|
316
316
|
@click.option("--issuer-url", default=None, help="Keycloak realm URL (default: MULTICLOUD_ISSUER_URL, saved, or auth.multicloud.io)")
|
|
317
317
|
@click.option("--no-browser", is_flag=True, help="Sign in with a code on another device (for SSH and containers)")
|
|
@@ -476,7 +476,7 @@ def status(org, as_json):
|
|
|
476
476
|
explicit = config.org_is_explicit(org)
|
|
477
477
|
if len(orgs) > 1 and not explicit and slug not in orgs:
|
|
478
478
|
say("You are signed in, but no organization is chosen. To check an API call, name one: "
|
|
479
|
-
"mctl auth status --org <
|
|
479
|
+
"mctl auth status --org <org-id> (save one with: mctl auth login --org <org-id>)")
|
|
480
480
|
info["org"] = None
|
|
481
481
|
emit()
|
|
482
482
|
return
|
|
@@ -67,7 +67,7 @@ def _call(org, path: str, params: Optional[Dict[str, Any]] = None) -> Dict[str,
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
@click.group(cls=org_group("catalog_org"))
|
|
70
|
-
@click.option("--org", default=None, help="Organization
|
|
70
|
+
@click.option("--org", default=None, help="Organization ID, the short name such as acme (default: MULTICLOUD_ORG)")
|
|
71
71
|
@click.pass_context
|
|
72
72
|
def catalog(ctx, org):
|
|
73
73
|
"""Find servers and prices (sign in first: mctl auth login)."""
|
|
@@ -122,7 +122,7 @@ def _tf_file_exists():
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
@click.group(name="cloud-account", cls=org_group("cloud_account_org"))
|
|
125
|
-
@click.option("--org", default=None, help="Organization
|
|
125
|
+
@click.option("--org", default=None, help="Organization ID, the short name such as acme (default: MULTICLOUD_ORG)")
|
|
126
126
|
@click.pass_context
|
|
127
127
|
def cloud_account(ctx, org):
|
|
128
128
|
"""Connect a customer AWS account (sign in first: mctl auth login)."""
|
|
@@ -52,7 +52,7 @@ def _pool_path(pool: str, rest: str = "") -> str:
|
|
|
52
52
|
|
|
53
53
|
def _group(name: str, help_text: str):
|
|
54
54
|
@click.group(name=name, cls=org_group(GROUPS[name]), help=help_text)
|
|
55
|
-
@click.option("--org", default=None, help="Organization
|
|
55
|
+
@click.option("--org", default=None, help="Organization ID, the short name such as acme (default: MULTICLOUD_ORG)")
|
|
56
56
|
@click.pass_context
|
|
57
57
|
def g(ctx, org):
|
|
58
58
|
ctx.ensure_object(dict)
|
|
@@ -36,7 +36,7 @@ class Root(click.Group):
|
|
|
36
36
|
|
|
37
37
|
@click.group(cls=Root, context_settings={"help_option_names": ["-h", "--help"]})
|
|
38
38
|
@click.version_option(__version__, prog_name="mctl")
|
|
39
|
-
@click.option("--org", default=None, help="Organization
|
|
39
|
+
@click.option("--org", default=None, help="Organization ID, the short name such as acme (env: MULTICLOUD_ORG)")
|
|
40
40
|
@click.option("--api-url", default=None, help="API URL (env: MULTICLOUD_API_URL)")
|
|
41
41
|
@click.pass_context
|
|
42
42
|
def mctl(ctx, org, api_url):
|
|
@@ -35,7 +35,7 @@ def format_nodes(nodes: List[Dict[str, Any]], headers: bool = True) -> str:
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
@click.group(cls=org_group("node_org"))
|
|
38
|
-
@click.option("--org", default=None, help="Organization
|
|
38
|
+
@click.option("--org", default=None, help="Organization ID, the short name such as acme (default: MULTICLOUD_ORG)")
|
|
39
39
|
@click.pass_context
|
|
40
40
|
def node(ctx, org):
|
|
41
41
|
"""List the nodes of the platform clusters (operators only; sign in first: mctl auth login)."""
|
|
@@ -23,6 +23,6 @@ def org_group(key):
|
|
|
23
23
|
if not any("--org" in getattr(p, "opts", ()) for p in cmd.params):
|
|
24
24
|
cmd.params.append(click.Option(
|
|
25
25
|
["--org"], default=None, expose_value=False, callback=_store(key),
|
|
26
|
-
help="Organization
|
|
26
|
+
help="Organization ID, the short name such as acme (default: MULTICLOUD_ORG)"))
|
|
27
27
|
super().add_command(cmd, name)
|
|
28
28
|
return OrgGroup
|
|
@@ -111,7 +111,7 @@ def format_pools(pools, headers: bool = True) -> str:
|
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
@click.group(cls=org_group("pool_org"))
|
|
114
|
-
@click.option("--org", default=None, help="Organization
|
|
114
|
+
@click.option("--org", default=None, help="Organization ID, the short name such as acme (default: MULTICLOUD_ORG)")
|
|
115
115
|
@click.pass_context
|
|
116
116
|
def pool(ctx, org):
|
|
117
117
|
"""Manage CI pools (sign in first: mctl auth login)."""
|
|
@@ -124,7 +124,7 @@ class SshGroup(org_group("ssh_org")):
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
@click.group(cls=SshGroup)
|
|
127
|
-
@click.option("--org", default=None, help="Organization
|
|
127
|
+
@click.option("--org", default=None, help="Organization ID, the short name such as acme (default: MULTICLOUD_ORG)")
|
|
128
128
|
@click.pass_context
|
|
129
129
|
def ssh(ctx, org):
|
|
130
130
|
"""Open SSH access to platform nodes and connect (operators only; sign in first: mctl auth login).
|
|
@@ -575,7 +575,7 @@ def test_status_several_orgs_is_not_an_error(net):
|
|
|
575
575
|
store(orgs=("acme", "beta"))
|
|
576
576
|
r = runner().invoke(mctl, ["auth", "status"])
|
|
577
577
|
assert r.exit_code == 0, r.output + r.stderr
|
|
578
|
-
assert "You are signed in" in r.output and "--org <
|
|
578
|
+
assert "You are signed in" in r.output and "--org <org-id>" in r.output
|
|
579
579
|
assert "does not work" not in r.output + r.stderr and calls == []
|
|
580
580
|
|
|
581
581
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.0"
|
|
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
|