[katello-devel] Content view definition command

Mike McCune mmccune at redhat.com
Tue Oct 16 18:31:29 UTC 2012


how about a common use case of 1) create, 2) publish and 3) promote with 
the removal of a separate concept of 'definition vs view' to the end 
user which may just be too confusing.  This is just an idea, it may be 
important to expose the separation to the end user.

1) create
$ katello content_view create --name=MyView
(creates a new CV in the Library that is now only view-able by my user 
since it is unpublished)

2) add stuff to the view
$ katello content_view update --name=MyView --add_filter=stable
$ katello content_view update --name=MyView --add_product=product1
$ katello content_view update --name=MyView --add_repo=repo1
(adds new things to the definition behind the scenes and always 
operating on the stuff in Library)

3) publish the view to the Library
$ katello content_view publish --name=MyView
(view is now available to everyone in the Library)

$ katello changeset create --name=changeset-1 --environment=Dev
$ katello changeset update --name=changeset-1 --environment=Dev 
--add_content_view=MyView
$ katello changeset apply --name=changeset-1 --environment=Dev
(view is now promoted into Dev)

alternate shortcut to create a changeset and promote in 1 step:

$ katello content_view promote --view=MyView --env=Dev
(creates a machine-generated changeset and promotes the view and 
associated content)

$ katello content_view list --env=Dev (see the content views in Dev)
(shows "MyView" now in dev)

$ katello content_view list --env=Library
(shows all published views in the Library)


Another usecase would be to combine 2 views:

** Create a new view
$ katello content_view create --name=View2Sub
$ katello content_view update --name=View2Sub --add_repo=repo3
$ katello content_view publish --name=View2Sub
(now we have a new view avail)

** Update view from above to include the other view
$ katello content_view update --name=MyView --include_view=View2Sub
$ katello content_view publish --name=MyView
(now MyView includes its own definitions as well as those from View2Sub)

not sure if this is completely going against the design of CVs but I'm 
trying to think how to simplify it to the user so they don't have to 
worry so much about the 'views' vs the 'definitions' and just deal only 
with Content Views.

Mike
On 10/12/2012 06:13 AM, David Davis wrote:
> I think you could access the two separately but they would all be under the content_view command. Just to throw out something to illustrate this point:
>
> katello content_view definitions (list all the content_view_definitions)
> katello content_view publish --definition=Database (create a new content view from the content view defininition)
> katello content_view define or katello content_view create_definition (create a new content view definition)
> katello content_view update_definition --definition=Database --add_filter=stable (or something)
> katello content_view promote --view=MongoDB --env=Dev (promote the content view to the Dev environment)
> katello content_view list --env=Dev (see the content views in Dev)
>
> So you could access the definitions and views separately but you'd still call the same content_view command.
>
> David
>
> ----- Original Message -----
>> From: "Bryan Kearney"<bkearney at redhat.com>
>> To: katello-devel at redhat.com
>> Sent: Friday, October 12, 2012 8:15:43 AM
>> Subject: Re: [katello-devel] Content view definition command
>>
>> On 10/11/2012 03:02 PM, Mike McCune wrote:
>>> On 10/11/2012 11:45 AM, Eric Helms wrote:
>>>> On 10/11/2012 02:42 PM, David Davis wrote:
>>>>> I am working on content view definitions and having a
>>>>> content_view_definition command is starting to cause problems due
>>>>> to
>>>>> its length:
>>>>>
>>>>> https://dl.dropbox.com/u/29929/Screenshot%20at%202012-10-11%2014%3A38%3A42.png
>>>>>
>>>>>
>>>>> It would be nice to shorten it to make it easier to develop the
>>>>> cli
>>>>> command and for the end user to type. I was thinking of some
>>>>> options:
>>>>>
>>>>> cv_definition
>>>>> content_definition
>>>>> view_definition
>>>>> content_view_def
>>>>> definition
>>>>>
>>>>> Anyone have a preference?
>>>>>
>>>>> David
>>>>>
>>>>> _______________________________________________
>>>>> katello-devel mailing list
>>>>> katello-devel at redhat.com
>>>>> https://www.redhat.com/mailman/listinfo/katello-devel
>>>> Is it possible to do subcommands so all definition related items
>>>> lived
>>>> under that?
>>>>
>>>> katello content_view definition
>>>>
>>>
>>> the question too, do we want to really make users have to
>>> understand and
>>> act on 'content views' and 'content view definitions' as separate
>>> objects?
>>>
>>> Why not just 'content views'?
>>
>> I think if if you set up rules, you will be able to splat out 2
>> different snapshots from that rules. So, we will need names for the
>> splatter and the splatee.
>>
>> -- bk
>>
>>
>> _______________________________________________
>> katello-devel mailing list
>> katello-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/katello-devel
>>
>
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel

-- 
Mike McCune
mmccune AT redhat.com
Red Hat Engineering       | Portland, OR
Systems Management        | 650-254-4248




More information about the katello-devel mailing list