Hello foreman-dev,
I have a feature request for hammer, and I'd like some feedback on how
I should implement it.
Currently, hammer allows ids or names to be used interchangeably for
some commands (i.e. hammer content-view filter create --repositories
repo1,repo2 --name 'filter_name'). This feature is to add the ability
to specify content view components (i.e. ContentViewVersions) by name
when adding a composite content view (i.e. hammer content_view create
–organization-id 1 --composite --components string1,string2,string3).
The problem is that ContentViewVersions have a major and minor version
number and an associated ContentView, which as a name.
So what should we make string1, string2, etc. for a
ContentViewVersion, which is uniquely identified by CV name and CVV
major.minor version? Is there a better way to specify CVVs than a
components array?
Any feedback is greatly appreciated!
Andrew Kofink
akofink@redhat.com
We discussed it briefly on irc today and so far CVV "labels" seem to be
a way to go.
CVV label would be in format <NAME>-<MAJOR>.<MINOR> Everything gets
parsed on the CLI side, no API changes required.
The command would then look like:
hammer content-view create --name=cvC --composite
–components='cvA-1.2,cvB-7.3'
If no version numbers are passed the latest is used.
Would that be acceptable? Please comment.
Thanks
Tomas
···
On 04/13/2016 04:21 PM, Andrew Kofink wrote:
> Hello foreman-dev,
>
> I have a feature request for hammer, and I'd like some feedback on how
> I should implement it.
>
> Currently, hammer allows ids or names to be used interchangeably for
> some commands (i.e. hammer content-view filter create --repositories
> repo1,repo2 --name 'filter_name'). This feature is to add the ability
> to specify content view components (i.e. ContentViewVersions) by name
> when adding a composite content view (i.e. hammer content_view create
> --organization-id 1 --composite --components string1,string2,string3).
> The problem is that ContentViewVersions have a major and minor version
> number and an associated ContentView, which as a name.
>
> So what should we make string1, string2, etc. for a
> ContentViewVersion, which is uniquely identified by CV name and CVV
> major.minor version? Is there a better way to specify CVVs than a
> components array?
>
> Any feedback is greatly appreciated!
>
> Andrew Kofink
> akofink@redhat.com
>
I like it. One question, would this example update the CCV to the latest versions?
hammer content-view create --name CV
hammer content-view publish --name CV
version CV-1.0 created
hammer content-view create --name CCV --composite --components CV
CCV created w/ version CV-1.0 as component
hammer content-view publish --name CV
version CV-2.0 created
hammer content-view update --name CCV --components CV
??? CCV updated to have version CV-2.0 as component?
···
----- Original Message -----
> On 04/13/2016 04:21 PM, Andrew Kofink wrote:
> > Hello foreman-dev,
> >
> > I have a feature request for hammer, and I'd like some feedback on how
> > I should implement it.
> >
> > Currently, hammer allows ids or names to be used interchangeably for
> > some commands (i.e. hammer content-view filter create --repositories
> > repo1,repo2 --name 'filter_name'). This feature is to add the ability
> > to specify content view components (i.e. ContentViewVersions) by name
> > when adding a composite content view (i.e. hammer content_view create
> > --organization-id 1 --composite --components string1,string2,string3).
> > The problem is that ContentViewVersions have a major and minor version
> > number and an associated ContentView, which as a name.
> >
> > So what should we make string1, string2, etc. for a
> > ContentViewVersion, which is uniquely identified by CV name and CVV
> > major.minor version? Is there a better way to specify CVVs than a
> > components array?
> >
> > Any feedback is greatly appreciated!
> >
> > Andrew Kofink
> > akofink@redhat.com
> >
>
> We discussed it briefly on irc today and so far CVV "labels" seem to be
> a way to go.
> CVV label would be in format -. Everything gets
> parsed on the CLI side, no API changes required.
>
> The command would then look like:
> hammer content-view create --name=cvC --composite
> --components='cvA-1.2,cvB-7.3'
>
> If no version numbers are passed the latest is used.
>
> Would that be acceptable? Please comment.
>
> Thanks
> Tomas
>
> --
> You received this message because you are subscribed to the Google Groups
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to foreman-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
BTW, here's the BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1309944
This one is also related:
https://bugzilla.redhat.com/show_bug.cgi?id=1167688
Right now, there doesn't appear to be a way to associate a composite CV
with the latest versions of its children CVs. I would expect "Latest" to be
an option in the screenshot below.
···
On Wed, Apr 13, 2016 at 11:01 AM, Tom McKay wrote:
----- Original Message -----
On 04/13/2016 04:21 PM, Andrew Kofink wrote:
Hello foreman-dev,
I have a feature request for hammer, and I’d like some feedback on how
I should implement it.
Currently, hammer allows ids or names to be used interchangeably for
some commands (i.e. hammer content-view filter create --repositories
repo1,repo2 --name ‘filter_name’). This feature is to add the ability
to specify content view components (i.e. ContentViewVersions) by name
when adding a composite content view (i.e. hammer content_view create
–organization-id 1 --composite --components string1,string2,string3).
The problem is that ContentViewVersions have a major and minor version
number and an associated ContentView, which as a name.
So what should we make string1, string2, etc. for a
ContentViewVersion, which is uniquely identified by CV name and CVV
major.minor version? Is there a better way to specify CVVs than a
components array?
Any feedback is greatly appreciated!
Andrew Kofink
akofink@redhat.com
We discussed it briefly on irc today and so far CVV “labels” seem to be
a way to go.
CVV label would be in format -. Everything gets
parsed on the CLI side, no API changes required.
The command would then look like:
hammer content-view create --name=cvC --composite
–components=‘cvA-1.2,cvB-7.3’
If no version numbers are passed the latest is used.
Would that be acceptable? Please comment.
Thanks
Tomas
–
You received this message because you are subscribed to the Google Groups
“foreman-dev” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I like it. One question, would this example update the CCV to the latest
versions?
hammer content-view create --name CV
hammer content-view publish --name CV
version CV-1.0 created
hammer content-view create --name CCV --composite --components CV
CCV created w/ version CV-1.0 as component
hammer content-view publish --name CV
version CV-2.0 created
hammer content-view update --name CCV --components CV
??? CCV updated to have version CV-2.0 as component?
–
You received this message because you are subscribed to the Google Groups
“foreman-dev” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
–
Andrew Kofink
akofink@redhat.com