Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] - improvement in the object-storage public-url option #41

Open
ximenesyuri opened this issue Nov 16, 2024 · 0 comments
Open

[FEAT] - improvement in the object-storage public-url option #41

ximenesyuri opened this issue Nov 16, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ximenesyuri
Copy link

ximenesyuri commented Nov 16, 2024

Is your feature request related to a problem? Please describe.
It seems that the options mgc object-storage <entity> public-url --dst <entry> produces the same output for both entity = objects, buckets. They seems to simply construct a url based on <entry> and on region. If the command is for a kind of <entity>, I would receive an output only for an <entry> of that kind.

I see two problems:

  1. the command mgc object-storage objects public-url --dst bucket_name should not output the public url for that bucket with given bucket_name, since the command is supposed to operate only over objects. Similarly, mgc object-storage buckets public-url --dst bucket_name/path/to/object should not print the url for the object, since now we are executing the command for buckets, not for objects.
  2. independently if the bucket/object there exists and even if it is owned by the user executing the command, the corresponding public url is displayed. However, for the other options related to the kinds objects and buckets, it is presupposed that they return an output only if the corresponding <entry> there exists and is owned by the user executing that command.

Describe the solution you'd like
I could suggest two approaches to improve the described situation:

  1. to create a new kind of <entity> called public-url, so that one could simply execute mgc object-storage public-url --dst whatever/one/needs. In this case, one should validate if the --dst there exists before printing its public url
  2. to modify the commands related to public-url for both objects and buckets to work only with <entry> of the corresponding kind. In this case, before printing its public url, one should validate if the --dst there exists and is owned by the user executing the command.

In my opinion the first option is preferable, although it could imply in modifying the semantics of the command mgc object-storage.

Additional context

@ximenesyuri ximenesyuri added the enhancement New feature or request label Nov 16, 2024
@ximenesyuri ximenesyuri changed the title [FEAT] - improvement in the object-storage option public-url [FEAT] - improvement in the object-storage public-url option Nov 18, 2024
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

No branches or pull requests

2 participants