centralcli 2.3.2__tar.gz → 2.3.3__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.
- {centralcli-2.3.2 → centralcli-2.3.3}/PKG-INFO +1 -1
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/cli.py +73 -1
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/cliassign.py +1 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/constants.py +5 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/pyproject.toml +1 -1
- {centralcli-2.3.2 → centralcli-2.3.3}/LICENSE +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/README.md +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/__init__.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/boilerplate/README.md +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/boilerplate/allcalls.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/caas.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/cache.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/central.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/cleaner.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/cliadd.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clibatch.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clicaas.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/cliclone.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clicommon.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clidel.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clikick.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clirefresh.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clirename.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clishow.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clishowbranch.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clishowfirmware.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clishowospf.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clishowoverlay.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clishowtshoot.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clishowwids.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clitest.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/clitshoot.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/cliunassign.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/cliupdate.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/cliupgrade.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/config.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/exceptions.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/logger.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/models.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/objects.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/render.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/response.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/setup.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/static/favicon.ico +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/strings.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/utils.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/vscodeargs.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/wh2snow.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/wh_proxy.py +0 -0
- {centralcli-2.3.2 → centralcli-2.3.3}/centralcli/wh_proxy_service.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: centralcli
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.3
|
|
4
4
|
Summary: A CLI for interacting with Aruba Central (Cloud Management Platform). Facilitates bulk imports, exports, reporting. A handy tool if you have devices managed by Aruba Central.
|
|
5
5
|
Home-page: https://github.com/Pack3tL0ss/central-api-cli
|
|
6
6
|
License: MIT
|
|
@@ -42,7 +42,7 @@ except (ImportError, ModuleNotFoundError) as e:
|
|
|
42
42
|
|
|
43
43
|
from centralcli.cache import CentralObject
|
|
44
44
|
from centralcli.central import CentralApi # noqa
|
|
45
|
-
from centralcli.constants import (BlinkArgs, BounceArgs, IdenMetaVars, StartArgs, ResetArgs)
|
|
45
|
+
from centralcli.constants import (BlinkArgs, BounceArgs, IdenMetaVars, StartArgs, ResetArgs, EnableDisableArgs)
|
|
46
46
|
|
|
47
47
|
iden = IdenMetaVars()
|
|
48
48
|
|
|
@@ -715,6 +715,78 @@ def unarchive(
|
|
|
715
715
|
cli.display_results(resp, tablefmt="action")
|
|
716
716
|
|
|
717
717
|
|
|
718
|
+
@app.command(hidden=True)
|
|
719
|
+
def enable(
|
|
720
|
+
what: EnableDisableArgs = typer.Argument("auto-sub"),
|
|
721
|
+
services: List[cli.cache.LicenseTypes] = typer.Argument(..., show_default=False),
|
|
722
|
+
yes: bool = typer.Option(False, "-Y", "-y", help="Bypass confirmation prompts - Assume Yes"),
|
|
723
|
+
debug: bool = typer.Option(False, "--debug", envvar="ARUBACLI_DEBUG", help="Enable Additional Debug Logging",),
|
|
724
|
+
default: bool = typer.Option(False, "-d", is_flag=True, help="Use default central account", show_default=False,),
|
|
725
|
+
account: str = typer.Option("central_info",
|
|
726
|
+
envvar="ARUBACLI_ACCOUNT",
|
|
727
|
+
help="The Aruba Central Account to use (must be defined in the config)",
|
|
728
|
+
autocompletion=cli.cache.account_completion),
|
|
729
|
+
) -> None:
|
|
730
|
+
"""Enable auto subscribe for service.
|
|
731
|
+
|
|
732
|
+
Enabling auto subscribe sets the level (i.e. foundation/advanced) for all devices of the same type as the subscription provided.
|
|
733
|
+
i.e. `enable auto-sub advanced-switch-6300` will enable auto subscribe for all switch tiers (6100, 6200, etc)
|
|
734
|
+
"""
|
|
735
|
+
|
|
736
|
+
_msg = f"[bright_green]Enable[/] auto-subscribe for license"
|
|
737
|
+
if len(services) > 1:
|
|
738
|
+
_svc_msg = '\n '.join([s.name for s in services])
|
|
739
|
+
_msg = f'{_msg}s:\n {_svc_msg}\n'
|
|
740
|
+
else:
|
|
741
|
+
svc = services[0]
|
|
742
|
+
_msg = f'{_msg} {svc.name}'
|
|
743
|
+
print(_msg)
|
|
744
|
+
print('\n[dark_orange]!![/] Enabling auto-subscribe applies the specified tier (i.e. foundation/advanced) for [green bold]all[/] devices of the same type.')
|
|
745
|
+
print(f'[cyan]enable auto-sub advanced-switch-6300[/] will result in [green bold]all[/] switch models being set to auto-subscribe the advanced license appropriate for that model.')
|
|
746
|
+
print(f'Not just the 6300 models.')
|
|
747
|
+
if yes or typer.confirm("\nProceed?", abort=True):
|
|
748
|
+
services = [s.name for s in services]
|
|
749
|
+
|
|
750
|
+
resp = cli.central.request(cli.central.enable_auto_subscribe, services=services)
|
|
751
|
+
cli.display_results(resp, tablefmt="action")
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
@app.command(hidden=True)
|
|
755
|
+
def disable(
|
|
756
|
+
what: EnableDisableArgs = typer.Argument("auto-sub"),
|
|
757
|
+
services: List[cli.cache.LicenseTypes] = typer.Argument(..., show_default=False),
|
|
758
|
+
yes: bool = typer.Option(False, "-Y", "-y", help="Bypass confirmation prompts - Assume Yes"),
|
|
759
|
+
debug: bool = typer.Option(False, "--debug", envvar="ARUBACLI_DEBUG", help="Enable Additional Debug Logging",),
|
|
760
|
+
default: bool = typer.Option(False, "-d", is_flag=True, help="Use default central account", show_default=False,),
|
|
761
|
+
account: str = typer.Option("central_info",
|
|
762
|
+
envvar="ARUBACLI_ACCOUNT",
|
|
763
|
+
help="The Aruba Central Account to use (must be defined in the config)",
|
|
764
|
+
autocompletion=cli.cache.account_completion),
|
|
765
|
+
) -> None:
|
|
766
|
+
"""Disable auto subscribe for service.
|
|
767
|
+
|
|
768
|
+
Disabling auto subscribe removes auto-subscribe for all models of the same type.
|
|
769
|
+
i.e. `disable auto-sub advanced-switch-6300` will disable auto subscribe for all switch tiers (6100, 6200, etc)
|
|
770
|
+
"""
|
|
771
|
+
|
|
772
|
+
_msg = f"[bright_green]Disable[/] auto-subscribe for license"
|
|
773
|
+
if len(services) > 1:
|
|
774
|
+
_svc_msg = '\n '.join([s.name for s in services])
|
|
775
|
+
_msg = f'{_msg}s:\n {_svc_msg}\n'
|
|
776
|
+
else:
|
|
777
|
+
svc = services[0]
|
|
778
|
+
_msg = f'{_msg} {svc.name}'
|
|
779
|
+
print(_msg)
|
|
780
|
+
print('\n[dark_orange]!![/] Disabling auto subscribe removes auto-subscribe for all models of the same type.')
|
|
781
|
+
print(f'[cyan]disable auto-sub advanced-switch-6300[/] will result in auto-subscribe being disabled for [green bold]all[/] switch models.')
|
|
782
|
+
print(f'Not just the 6300.')
|
|
783
|
+
if yes or typer.confirm("\nProceed?", abort=True):
|
|
784
|
+
services = [s.name for s in services]
|
|
785
|
+
|
|
786
|
+
resp = cli.central.request(cli.central.enable_auto_subscribe, services=services)
|
|
787
|
+
cli.display_results(resp, tablefmt="action")
|
|
788
|
+
|
|
789
|
+
|
|
718
790
|
@app.command(short_help="convert j2 templates")
|
|
719
791
|
def convert(
|
|
720
792
|
template: Path = typer.Argument(..., help="j2 template to convert", exists=True),
|
|
@@ -24,6 +24,7 @@ except (ImportError, ModuleNotFoundError) as e:
|
|
|
24
24
|
app = typer.Typer()
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
# TODO consider removing auto option as we've added enable/disable auto-sub ...
|
|
27
28
|
@app.command()
|
|
28
29
|
def license(
|
|
29
30
|
license: cli.cache.LicenseTypes = typer.Argument(..., show_default=False),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "centralcli"
|
|
3
|
-
version = "2.3.
|
|
3
|
+
version = "2.3.3"
|
|
4
4
|
description = "A CLI for interacting with Aruba Central (Cloud Management Platform). Facilitates bulk imports, exports, reporting. A handy tool if you have devices managed by Aruba Central."
|
|
5
5
|
license = "MIT"
|
|
6
6
|
authors = ["Wade Wells (Pack3tL0ss) <wade@consolepi.org>"]
|
|
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
|