Skip to content

Add: Quota Command to Manage Quotas#97

Merged
Vad1mo merged 12 commits into
goharbor:mainfrom
bupd:quota
May 13, 2025
Merged

Add: Quota Command to Manage Quotas#97
Vad1mo merged 12 commits into
goharbor:mainfrom
bupd:quota

Conversation

@bupd

@bupd bupd commented May 30, 2024

Copy link
Copy Markdown
Member

Fixes #96

This PR adds quota commands to manage quota of projects.

Screenshots:

Quota List command:

quotaList

Quota Update:

quotaUpdate

Quota View:

quotaView

@bupd bupd marked this pull request as ready for review May 31, 2024 19:49
@bupd

This comment was marked as resolved.

@bupd

This comment was marked as resolved.

@bupd bupd mentioned this pull request Jun 8, 2024
@Vad1mo Vad1mo added the Changes Requesed feedback that must be addressed before merging. label Apr 22, 2025
@Vad1mo

Vad1mo commented Apr 22, 2025

Copy link
Copy Markdown
Member

@bupd issues need to be resolved.

@Vad1mo Vad1mo requested a review from Copilot April 29, 2025 13:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new quota command to manage project quotas, addressing issue #96. The key changes include:

  • New interactive views and a form for updating quota parameters.
  • Implementation of list, view, and update commands in the quota module.
  • Updates to the API and prompt layers to support quota management.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/views/quota/update/view.go Introduces a new view for updating quotas with interactive inputs.
pkg/views/quota/select/view.go Adds selection view for choosing a quota.
pkg/views/quota/list/view.go Implements a table list view for displaying quotas.
pkg/prompt/prompt.go Adds prompt function to get quota IDs from the user.
pkg/api/types.go Introduces new flag types for quota listing.
pkg/api/quota_handler.go Adds functions for listing, getting, and updating quotas.
cmd/harbor/root/quota/view.go Implements the view quota command using the new API and list view.
cmd/harbor/root/quota/update.go Implements quota update command and storage string parsing.
cmd/harbor/root/quota/update_test.go Adds tests for storage string conversion.
cmd/harbor/root/quota/list.go Adds the quota list command.
cmd/harbor/root/quota/cmd.go Integrates the new quota commands into the CLI.
cmd/harbor/root/cmd.go Updates the root command to include quota management.

Comment thread pkg/views/quota/update/view.go Outdated
Comment thread cmd/harbor/root/quota/update.go Outdated
bupd added 4 commits May 3, 2025 03:20
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
bupd added 7 commits May 3, 2025 03:35
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
@bupd bupd added enhancement New feature or request and removed Changes Requesed feedback that must be addressed before merging. labels May 6, 2025
@bupd bupd requested a review from rizul2108 May 9, 2025 23:00
@bupd

bupd commented May 9, 2025

Copy link
Copy Markdown
Member Author

@rizul2108 can you help testing this out.

@Vad1mo Vad1mo merged commit be21559 into goharbor:main May 13, 2025
7 checks passed
rizul2108 pushed a commit to rizul2108/harbor-cli that referenced this pull request May 24, 2025
* add: quota `list` command

Signed-off-by: bupd <bupdprasanth@gmail.com>

* add: quota `view` command

Signed-off-by: bupd <bupdprasanth@gmail.com>

* add: quota `update` command

Signed-off-by: bupd <bupdprasanth@gmail.com>

* add: unit test for quota update

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix lint

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix quota list cmd

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix quota view cmd

Signed-off-by: bupd <bupdprasanth@gmail.com>

* update quota view

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix quota cmd

Signed-off-by: bupd <bupdprasanth@gmail.com>

* add docs

Signed-off-by: bupd <bupdprasanth@gmail.com>

* fix lint issues

Signed-off-by: bupd <bupdprasanth@gmail.com>

---------

Signed-off-by: bupd <bupdprasanth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Quota Command

3 participants