-
Notifications
You must be signed in to change notification settings - Fork 438
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
enable api to handle osc meta -e for attributes #7839
Comments
Does the backend store it as XML? Because I don't see a way via API to get the attributes of a project in one XML i.e |
Yes the backend stores is as one xml |
Part of this could be solved by changing the request type from
Whereas right now the |
On Dienstag, 16. Juli 2019, 16:58:55 CEST Jimmy Berry wrote:
Part of this could be solved by changing the request type from `POST` to
`PUT` to be consistent. After which I would expect the following to work
fine.
```
osc api -e /source/openSUSE:Leap:15.1:Update/_attribute/OSRT:OriginConfig
```
we could support PUT in addition, but not replacing the POST functionality,
because the POST content can be selected attributes.
while PUT would drop also the ones not part of the body (after permission
checks).
…--
Adrian Schroeter
SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
email: [email protected]
|
It's fine to support both, but it is also a bit squirly to require restating the attribute given it is already required in the the path. I would not expect to be able to Supporting |
On Dienstag, 16. Juli 2019, 17:32:34 CEST Jimmy Berry wrote:
> we could support PUT in addition, but not replacing the POST
> functionality, because the POST content can be selected attributes.
It's fine to support both, but it is also a bit squirly to require restating
the attribute given it is already required in the the path. I would not
expect to be able to `POST` and update multiple attributes from a path such
as `/source/<project>/_attribute/<namespace>:<attribute>`. From
`/source/<project>/_attribute` perhaps, but not when I already specified a
specific attribute.
Supporting `PUT` would certainly be a step in the right direction.
problem is that each attribute is an own object and has different
permission.
but yes, the current attribute api is not really sane ...
…--
Adrian Schroeter
SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
email: [email protected]
|
It is not possible to edit attributes with osc in the way like project meta or package meta can
be edited.
For example:
osc meta -e prj
for the attributes you have to do something like this:
osc meta attribute --attribute 'OSRT:Config' --set 'a very long list'
Describe the solution you'd like
I want the API to be consistent on all meta data
Describe alternatives you've considered
Working the problem around in osc using single POSTs to create each attribute entry.
Additional context
@adrianschroeter suggested to open an issue and fix the API instead.
The text was updated successfully, but these errors were encountered: