nexuscli.api.repository package¶
Subpackages¶
- nexuscli.api.repository.base_models package
- Submodules
- nexuscli.api.repository.base_models.base_repository module
- nexuscli.api.repository.base_models.group_repository module
- nexuscli.api.repository.base_models.hosted_repository module
- nexuscli.api.repository.base_models.proxy_repository module
- nexuscli.api.repository.base_models.repository module
- nexuscli.api.repository.base_models.util module
- Module contents
- nexuscli.api.repository.recipes package
- Submodules
- nexuscli.api.repository.recipes.apt module
- nexuscli.api.repository.recipes.bower module
- nexuscli.api.repository.recipes.docker module
- nexuscli.api.repository.recipes.maven module
- nexuscli.api.repository.recipes.npm module
- nexuscli.api.repository.recipes.nuget module
- nexuscli.api.repository.recipes.pypi module
- nexuscli.api.repository.recipes.raw module
- nexuscli.api.repository.recipes.rubygems module
- nexuscli.api.repository.recipes.validations module
- nexuscli.api.repository.recipes.yum module
- Module contents
Submodules¶
nexuscli.api.repository.collection module¶
-
class
nexuscli.api.repository.collection.
RepositoryCollection
(*args, **kwargs)¶ Bases:
nexuscli.api.base_collection.BaseCollection
A class to manage Nexus 3 repositories.
-
create
(repository)¶ Creates a Nexus repository with the given format and type.
- Parameters
repository (Repository) – the instance containing the settings for the repository to be created.
- Raises
NexusClientCreateRepositoryError – error creating repository.
-
get_by_name
(name: str) → nexuscli.api.repository.base_models.repository.Repository¶ Get a Nexus 3 repository by its name.
- Parameters
name (str) – name of the repository wanted
- Return type
nexuscli.api.repository.model.Repository
- Raises
exception.NexusClientInvalidRepository – when a repository with the given name isn’t found.
-
get_raw_by_name
(name: str) → dict¶ Return the raw dict for the repository called
name
. Remember torefresh()
to get the latest from the server.- Parameters
name (str) – name of the repository wanted
- Return type
- Raises
exception.NexusClientInvalidRepository – when a repository with the given name isn’t found.
-
new
(repo_type, **kwargs)¶ Creates a Repository instance object
-
raw_list
()¶ A raw representation of the Nexus repositories.
- Returns
for the format, see List Repositories.
- Return type
-
script_dependencies
() → List[str]¶ This method returns any scripts that the collection class depends on. These will be installed by the NexusClient instance, if not already present on the server.
-
set_health_check
(name: str, enable: bool = False) → None¶ Set the health check status on a Nexus 3 repository.
- Parameters
name – name of the repository wanted
enable – whether to enable of disable the health check
- Return type
nexuscli.api.repository.model.Repository
- Raises
exception.NexusClientInvalidRepository – when a repository with the given name isn’t found.
-
-
nexuscli.api.repository.collection.
get_classes_by_type
(repo_types: Union[str, list]) → List[Type[nexuscli.api.repository.base_models.repository.Repository]]¶
-
nexuscli.api.repository.collection.
get_repository_class
(raw_configuration: dict) → Type[nexuscli.api.repository.base_models.repository.Repository]¶ Given a raw repository configuration, returns its corresponding class.
- Parameters
raw_configuration (dict) – configuration as returned by the SCRIPT_NAME_GET groovy script.
- Returns
repository class
-
nexuscli.api.repository.collection.
get_repository_classes
() → List[Type[nexuscli.api.repository.base_models.repository.Repository]]¶
-
nexuscli.api.repository.collection.
get_supported_recipes
() → List[str]¶