# Detect if called from pypi installed package or via cloned github repo (development) try: from centralcli import config, utils, cli, log, Response except (ImportError, ModuleNotFoundError) as e: pkg_dir = Path(__file__).absolute().parent if pkg_dir.name == "centralcli": sys.path.insert(0, str(pkg_dir.parent)) from centralcli import config, utils, cli, log, Response else: print(pkg_dir.parts) raise e from centralcli.constants import IdenMetaVars iden_meta_vars = IdenMetaVars() tty = utils.tty app = typer.Typer() class BatchArgs(str, Enum): sites = "sites" aps = "aps" class BatchDelArgs(str, Enum): sites = "sites" # aps = "aps" class FstrInt:
from centralcli import cli, utils, cleaner except (ImportError, ModuleNotFoundError) as e: pkg_dir = Path(__file__).absolute().parent if pkg_dir.name == "centralcli": sys.path.insert(0, str(pkg_dir.parent)) from centralcli import cli, utils, cleaner else: print(pkg_dir.parts) raise e from centralcli.constants import IdenMetaVars # noqa app = typer.Typer() tty = utils.tty iden_meta = IdenMetaVars() class ShowFirmwareDevType(str, Enum): ap = "ap" # gateway = "gateway" gw = "gw" switch = "switch" class ShowFirmwareKwags(str, Enum): group = "group" type = "type" @app.command(short_help="Show Detected Rogue APs")
# Detect if called from pypi installed package or via cloned github repo (development) try: from centralcli import cli, log except (ImportError, ModuleNotFoundError) as e: pkg_dir = Path(__file__).absolute().parent if pkg_dir.name == "centralcli": sys.path.insert(0, str(pkg_dir.parent)) from centralcli import cli, log else: print(pkg_dir.parts) raise e from centralcli.constants import IdenMetaVars iden = IdenMetaVars() app = typer.Typer() @app.command(short_help="Delete a certificate") def certificate( name: str = typer.Argument(..., ), yes: bool = typer.Option(False, "-Y", help="Bypass confirmation prompts - Assume Yes"), yes_: bool = typer.Option(False, "-y", hidden=True), debug: bool = typer.Option(False, "--debug", envvar="ARUBACLI_DEBUG", help="Enable Additional Debug Logging",), default: bool = typer.Option(False, "-d", is_flag=True, help="Use default central account", show_default=False,), account: str = typer.Option("central_info", envvar="ARUBACLI_ACCOUNT", help="The Aruba Central Account to use (must be defined in the config)",), ) -> None: