Re: [Pulp-dev] Renaming Content 'artifact' to '_artifact'

2019-01-07 Thread Austin Macdonald
Gotcha. /me shrugs However we decide to implement this, its pretty evident that this field will eventually be a core field, or at the very least treated like a core field. So I can confidently say that yes, it should be renamed. On Mon, Jan 7, 2019 at 11:06 AM Daniel Alley wrote: > The serializ

Re: [Pulp-dev] Renaming Content 'artifact' to '_artifact'

2019-01-07 Thread Daniel Alley
> > The serializer just needs to remove the _artifacts field and add an > _artifact field. Here's how I did it in docker, which is a total ripoff of > the file plugin. > I know it's fairly simple to do manually, I just meant to do so automatically (unless we also need a serializer mixin like you s

Re: [Pulp-dev] Renaming Content 'artifact' to '_artifact'

2019-01-07 Thread Austin Macdonald
The serializer just needs to remove the _artifacts field and add an _artifact field. Here's how I did it in docker, which is a total ripoff of the file plugin. https://github.com/pulp/pulp_docker/pull/291/ It might be worth making a serializer mixin also? (I can almost hear jortel cringing about

Re: [Pulp-dev] Renaming Content 'artifact' to '_artifact'

2019-01-07 Thread Daniel Alley
> > Given that single-artifact Content is likely to be a very common pattern > among plugins, maybe it would be best to add this as a mixin for pulpcore. > If that's the future of this field, we should definitely make it _artifact. +1 to this, I don't much like having to redefine this in every pl

Re: [Pulp-dev] Renaming Content 'artifact' to '_artifact'

2019-01-07 Thread Austin Macdonald
We have single-artifact Content in Docker as well. I've gone ahead and named the field _artifact. Given that single-artifact Content is likely to be a very common pattern among plugins, maybe it would be best to add this as a mixin for pulpcore. If that's the future of this field, we should defini

[Pulp-dev] Renaming Content 'artifact' to '_artifact'

2019-01-02 Thread David Davis
In most plugins, Content only has a single artifact so we created a virtual field 'artifact' that we expose to end users. In a recent change[0], we prefixed the Content fields with underscores ('_') so we're considering renaming the field to '_artifact' to be consistent with other plugins that have