nexuscli.cli package

Submodules

nexuscli.cli.blobstore_options module

nexuscli.cli.constants module

nexuscli.cli.repository_options module

nexuscli.cli.root_commands module

Handles base/root commands (as opposed to subcommands)

nexuscli.cli.root_commands.cmd_delete(nexus_client, repository_path)

Performs nexus3 delete

nexuscli.cli.root_commands.cmd_download(nexus_client, src=None, dst=None, flatten=None, cache=None)

Performs nexus3 download

nexuscli.cli.root_commands.cmd_list(nexus_client, full_path)

Performs nexus3 list

nexuscli.cli.root_commands.cmd_login(**kwargs)

Performs nexus3 login

nexuscli.cli.root_commands.cmd_upload(nexus_client, src=None, dst=None, flatten=None, recurse=None)

Performs nexus3 upload

nexuscli.cli.subcommand_blobstore module

nexuscli.cli.subcommand_blobstore.cmd_create(nexus_client: nexuscli.nexus_client.NexusClient, blob_type, name, **kwargs)

Performs nexus3 blobstore create

nexuscli.cli.subcommand_blobstore.cmd_delete(nexus_client: nexuscli.nexus_client.NexusClient, name)
nexuscli.cli.subcommand_blobstore.cmd_list(nexus_client: nexuscli.nexus_client.NexusClient, **kwargs)

Performs nexus3 blobstore list

nexuscli.cli.subcommand_blobstore.cmd_show(nexus_client: nexuscli.nexus_client.NexusClient, name)

Performs nexus3 blobstore show

nexuscli.cli.subcommand_cleanup_policy module

nexuscli.cli.subcommand_cleanup_policy.cmd_create(nexus_client: nexuscli.nexus_client.NexusClient, **kwargs) → None

Performs nexus3 cleanup_policy create

nexuscli.cli.subcommand_cleanup_policy.cmd_list(nexus_client: nexuscli.nexus_client.NexusClient) → None

Performs nexus3 cleanup_policy list

nexuscli.cli.subcommand_cleanup_policy.cmd_show(nexus_client: nexuscli.nexus_client.NexusClient, policy_name: str) → None

Performs ``nexus3 cleanup-policy show

nexuscli.cli.subcommand_realm module

nexuscli.cli.subcommand_realm.cmd_activate(nexus_client: nexuscli.nexus_client.NexusClient, realm_id: str) → None

Performs nexus3 security realm activate

nexuscli.cli.subcommand_realm.cmd_active(nexus_client: nexuscli.nexus_client.NexusClient) → None

Performs nexus3 security realm active

nexuscli.cli.subcommand_realm.cmd_available(nexus_client: nexuscli.nexus_client.NexusClient, **kwargs) → None

Performs nexus3 security realm available

nexuscli.cli.subcommand_repository module

nexuscli.cli.subcommand_repository.cmd_create(ctx, repo_type=None, **kwargs)

Performs nexus3 repository create commands

nexuscli.cli.subcommand_repository.cmd_delete(nexus_client, repository_name)

Performs nexus3 repository delete

nexuscli.cli.subcommand_repository.cmd_list(nexus_client)

Performs nexus3 repository list

nexuscli.cli.subcommand_repository.cmd_show(nexus_client, repository_name)

Performs ``nexus3 repository show

nexuscli.cli.subcommand_script module

nexuscli.cli.subcommand_script.cmd_create(nexus_client, name, content, **kwargs)

Performs nexus3 script create

nexuscli.cli.subcommand_script.cmd_delete(nexus_client, name)

Performs nexus3 script delete

nexuscli.cli.subcommand_script.cmd_list(nexus_client)

Performs nexus3 script list

nexuscli.cli.subcommand_script.cmd_run(nexus_client, name, arguments)

Performs nexus3 script run

nexuscli.cli.subcommand_task module

nexuscli.cli.subcommand_task.cmd_list(nexus_client, **kwargs)

Performs nexus3 task list

nexuscli.cli.subcommand_task.cmd_run(nexus_client, task_id)

Performs nexus3 task run

nexuscli.cli.subcommand_task.cmd_show(nexus_client, task_id)

Performs nexus3 task show

nexuscli.cli.subcommand_task.cmd_stop(nexus_client, task_id)

Performs nexus3 task stop

nexuscli.cli.util module

class nexuscli.cli.util.AliasedGroup(*args, **kwargs)

Bases: click_aliases.ClickAliasedGroup

Implements execution of the first partial match for a command. Fails with a message if there are no unique matches.

See: https://click.palletsprojects.com/en/7.x/advanced/#command-aliases

get_command(ctx, cmd_name)

Given a context and a command name, this returns a Command object if it exists or returns None.

nexuscli.cli.util.add_options(options)
nexuscli.cli.util.get_client() → nexuscli.nexus_client.NexusClient

Returns a Nexus Client instance. Prints a warning if the configuration file doesn’t exist.

nexuscli.cli.util.mapped_commands(command_map: dict)

TODO: document command_map format

Parameters

command_map

Returns

nexuscli.cli.util.move_to_key(mydict, new_key, keys_to_move)
nexuscli.cli.util.print_as_table(contents: List[Dict], fields: List) → None

Print json API output as a table

Parameters
  • contents – table contents

  • fields – list of key names in contents elements to be added as columns to table

nexuscli.cli.util.rename_keys(mydict: dict, rename_map: dict)
nexuscli.cli.util.upcase_values(mydict: dict, keys=[])
nexuscli.cli.util.with_nexus_client(click_command)

Module contents