summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsed-i <82407168+sed-i@users.noreply.github.com>2021-11-15 16:31:19 -0500
committerMarc Cornellà <hello@mcornella.com>2022-02-10 11:42:23 +0100
commitcdd2d6efc612b75577db49604eeb7dc35ba5f9b5 (patch)
treef3298d0981973338849e5817e6f02a72de51df95
parentf045810697d423d108617ccd48bd7a414cb58734 (diff)
downloadzsh-cdd2d6efc612b75577db49604eeb7dc35ba5f9b5.tar.gz
zsh-cdd2d6efc612b75577db49604eeb7dc35ba5f9b5.tar.bz2
zsh-cdd2d6efc612b75577db49604eeb7dc35ba5f9b5.zip
feat(juju): introduce additional juju aliases (#10426)
-rw-r--r--plugins/juju/README.md34
-rw-r--r--plugins/juju/juju.plugin.zsh12
2 files changed, 33 insertions, 13 deletions
diff --git a/plugins/juju/README.md b/plugins/juju/README.md
index 2417c4669..918c08de5 100644
--- a/plugins/juju/README.md
+++ b/plugins/juju/README.md
@@ -18,26 +18,36 @@ Naming convention:
### General
-| Alias | Command | Description |
-|--------|---------------------------------------------|--------------------------------------------------------|
-| `jdl` | `juju debug-log --ms` | Display log, with millisecond resolution |
-| `jdlr` | `juju debug-log --ms --replay` | Replay entire log |
-| `jh` | `juju help` | Show help on a command or other topic |
-| `jssl` | `juju juju show-status-log` | Output past statuses for the specified entity |
-| `jstj` | `juju status --format=json` | Show status in json format (more detailed) |
-| `jst` | `juju status --relations --storage --color` | Show status, including relations and storage, in color |
+| Alias | Command | Description |
+|---------|---------------------------------------------|--------------------------------------------------------|
+| `j` | `juju` | The juju command |
+| `jcld` | `juju clouds` | Lists all clouds with registered credentials |
+| `jclda` | `juju clouds --all` | Lists all clouds available to Juju |
+| `jdl` | `juju debug-log --ms` | Display log, with millisecond resolution |
+| `jdlr` | `juju debug-log --ms --replay` | Replay entire log |
+| `jh` | `juju help` | Show help on a command or other topic |
+| `jssl` | `juju show-status-log` | Output past statuses for the specified entity |
+| `jstj` | `juju status --format=json` | Show status in json format (more detailed) |
+| `jst` | `juju status --relations --color` | Show status, including relations, in color |
+| `jsts` | `juju status --relations --storage --color` | Show status, including relations and storage, in color |
### Bootstrap
-| Alias | Command | Description |
-|-------|---------------------------|-------------------------------------------|
-| `jb` | `juju bootstrap` | Initializing a Juju cloud environment |
-| `jbm` | `juju bootstrap microk8s` | Initializing a MicroK8s cloud environment |
+| Alias | Command | Description |
+|---------|-------------------------------------|-------------------------------------------------------|
+| `jb` | `juju bootstrap` | Initializing a Juju cloud environment |
+| `jbng` | `juju bootstrap --no-gui` | Initializing a Juju cloud environment without GUI |
+| `jbl` | `juju bootstrap localhost` | Initializing an lxd cloud environment |
+| `jblng` | `juju bootstrap --no-gui localhost` | Initializing an lxd cloud environment without GUI |
+| `jbm` | `juju bootstrap microk8s` | Initializing a MicroK8s cloud environment |
+| `jbmng` | `juju bootstrap --no-gui microk8s` | Initializing a MicroK8s cloud environment without GUI |
### Controller
| Alias | Command | Description |
|----------|---------------------------------------------------------------------------------------|-------------------------------------------------------------------|
+| `jctl` | `juju controllers` | List all controllers |
+| `jctlr` | `juju controllers --refresh` | List all controllers (download latest details) |
| `jdc` | `juju destroy-controller --destroy-all-models` | Destroy a controller |
| `jdc!` | `juju destroy-controller --destroy-all-models --force --no-wait -y` | Destroy a controller |
| `jdcds` | `juju destroy-controller --destroy-all-models --destroy-storage` | Destroy a controller and associated storage |
diff --git a/plugins/juju/juju.plugin.zsh b/plugins/juju/juju.plugin.zsh
index cf89418c6..81fcd6376 100644
--- a/plugins/juju/juju.plugin.zsh
+++ b/plugins/juju/juju.plugin.zsh
@@ -17,11 +17,20 @@ unset completion_file
# - `!` means --force --no-wait -y #
# - `ds` suffix means --destroy-storage #
# ---------------------------------------------------------- #
+alias j="juju"
alias jam="juju add-model --config logging-config=\"<root>=WARNING; unit=DEBUG\"\
--config update-status-hook-interval=\"60m\""
alias jb='juju bootstrap'
+alias jbng='juju bootstrap --no-gui'
+alias jbl='juju bootstrap localhost'
+alias jblng='juju bootstrap --no-gui localhost'
alias jbm='juju bootstrap microk8s'
+alias jbmng='juju bootstrap --no-gui microk8s'
alias jc='juju config'
+alias jcld='juju clouds'
+alias jclda='juju clouds --all'
+alias jctl='juju controllers'
+alias jctlr='juju controllers --refresh'
alias jdc='juju destroy-controller --destroy-all-models'
alias 'jdc!'='juju destroy-controller --destroy-all-models --force --no-wait -y'
alias jdcds='juju destroy-controller --destroy-all-models --destroy-storage'
@@ -61,7 +70,8 @@ alias jshc='juju ssh --container'
alias jshm='juju show-model'
alias jssl='juju show-status-log'
alias jstj='juju status --format=json'
-alias jst='juju status --relations --storage --color'
+alias jst='juju status --relations --color'
+alias jsts='juju status --relations --storage --color'
alias jsu='juju show-unit'
alias jsw='juju switch'