From f09cb513fcafe122dae2e6a394e8c4d4d47b96b1 Mon Sep 17 00:00:00 2001 From: pederhan Date: Mon, 26 Aug 2024 14:14:49 +0200 Subject: [PATCH] Update model definitions --- CHANGELOG.md | 12 +++++++++++- harborapi/models/models.py | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a401e9be..15587769 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,17 @@ While the project is still on major version 0, breaking changes may be introduce - +## Unreleased + +### Added + +- Model fields: + - `ProjectMetadata.proxy_speed_kb` + - `Configurations.ldap_group_attach_parallel` + - `ConfigurationsResponse.ldap_group_attach_parallel` + - `Robot.creator` + - `Artifact.artifact_type` + - `Artifact.repository_name` ## [0.25.2](https://github.com/unioslo/harborapi/tree/harborapi-v0.25.2) - 2024-06-26 diff --git a/harborapi/models/models.py b/harborapi/models/models.py index a802ef1b..dd0bba62 100644 --- a/harborapi/models/models.py +++ b/harborapi/models/models.py @@ -525,6 +525,10 @@ class ProjectMetadata(BaseModel): retention_id: Optional[Union[str, int]] = Field( default=None, description="The ID of the tag retention policy for the project" ) + proxy_speed_kb: Optional[str] = Field( + default=None, + description="The bandwidth limit of proxy cache, in Kbps (kilobits per second). It limits the communication between Harbor and the upstream registry, not the client and the Harbor.", + ) @field_validator("*", mode="before") @classmethod @@ -1439,6 +1443,10 @@ class Configurations(BaseModel): default=None, description="The scope to search ldap group. ''0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE''", ) + ldap_group_attach_parallel: Optional[bool] = Field( + default=None, + description="Attach LDAP user group information in parallel, the parallel worker count is 5", + ) ldap_scope: Optional[int] = Field( default=None, description="The scope to search ldap users,'0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'", @@ -2401,6 +2409,7 @@ class ConfigurationsResponse(BaseModel): ldap_group_attribute_name: Optional[StringConfigItem] = None ldap_group_search_filter: Optional[StringConfigItem] = None ldap_group_search_scope: Optional[IntegerConfigItem] = None + ldap_group_attach_parallel: Optional[BoolConfigItem] = None ldap_scope: Optional[IntegerConfigItem] = None ldap_search_dn: Optional[StringConfigItem] = None ldap_timeout: Optional[IntegerConfigItem] = None @@ -2673,6 +2682,7 @@ class Robot(BaseModel): default=None, description="The expiration date of the robot" ) permissions: Optional[List[RobotPermission]] = None + creator: Optional[str] = Field(default=None, description="The creator of the robot") creation_time: Optional[AwareDatetime] = Field( default=None, description="The creation time of the robot." ) @@ -2748,6 +2758,9 @@ class Artifact(BaseModel): manifest_media_type: Optional[str] = Field( default=None, description="The manifest media type of the artifact" ) + artifact_type: Optional[str] = Field( + default=None, description="The artifact_type in the manifest of the artifact" + ) project_id: Optional[int] = Field( default=None, description="The ID of the project that the artifact belongs to" ) @@ -2755,6 +2768,10 @@ class Artifact(BaseModel): default=None, description="The ID of the repository that the artifact belongs to", ) + repository_name: Optional[str] = Field( + default=None, + description="The name of the repository that the artifact belongs to", + ) digest: Optional[str] = Field( default=None, description="The digest of the artifact" )