<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 08/09/2012 08:20 AM, James Bowes wrote:
    <blockquote cite="mid:20120809122055.GH46364@pipboy.redhat.com"
      type="cite">
      <pre wrap="">On Thu, Aug 09, 2012 at 12:34:57PM +0100, Dmitri Dolguikh wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Please see <a class="moz-txt-link-freetext" href="https://bugzilla.redhat.com/show_bug.cgi?id=795928">https://bugzilla.redhat.com/show_bug.cgi?id=795928</a> for
description of an issue with environment renaming.

The immediate problems around environments: using of environment
names and environment ids for identification of environments
interchangeably. Using db ids for environment identification when
not using environment names.

To resolve these:
 - introduce environment uuids
 - update katello/katello cli to use uuids for environment identification
 - update repository naming to use environment uuids
 - update candlepin (this will include updates to schema, and
resource controller)

</pre>
      </blockquote>
      <pre wrap="">
-1 to UUIDs, for the same reason as has been discussed wrt pulp
repo labels. a url like:</pre>
    </blockquote>
    -1 for me too.  Much prefer labels.<br>
    <br>
    <blockquote cite="mid:20120809122055.GH46364@pipboy.redhat.com"
      type="cite">
      <pre wrap="">

<a class="moz-txt-link-freetext" href="https://my-cdn.local/content/dev/rhel-server/i386/">https://my-cdn.local/content/dev/rhel-server/i386/</a>

is way more useful than:

<a class="moz-txt-link-freetext" href="https://my-cdn.local/content/abc123213-23423423-aaa123/rhel-server/i386/">https://my-cdn.local/content/abc123213-23423423-aaa123/rhel-server/i386/</a>

not to mention, far more handsome!

I'd rather see either immutable labels, or supporting renaming labels,
too. 

To clarify, UUIDs are fine imo as an internal canonical id for envs
within katello as a whole, but once the env is exposed on the cli or in
a url, label should be used.

</pre>
      <blockquote type="cite">
        <pre wrap="">
The larger problem: Katello and Candlepin modelling of
products/product content/environments lost coherency.

Candlepin's view of the above trifecta (use of a monospaced font is
encouraged for the content below):
+-------------+          +--------------------+
| Environment | 1 <--- * | EnvironmentContent |
+-------------+          +--------------------+
                                ^
                                | *
                                | 1
+---------+          +----------------+
    | Product | 1 ---> * | ProductContent |
    +---------+          +----------------+


same thing in Katello (with added pulp repositories):

   +-------------+
   | Pulp::Repos |<-----------------------+
   +-------------+                        |
       ^                                  |
       | uses                             |
    +----------------------------------+  |  +-------------+
    | Candlepin::Product               |  |  | Environment |
    | (uses Candlepin::ProductContent) |  |  +-------------+
    +----------------------------------+  |          ^
       |       ^                          |          | 1
       |uses   | uses                     |          |
       |       |                          |          | *
+---------+                      +--------------------+
      | Product | 1 ---------------> * | EnvironmentProduct |
      +---------+                      +--------------------+
                                          |          |1
                                          |          |*
                                          |          V
                                          | uses +------------+
                                          +------| Repository |
                                                 +------------+


I propose:
 - Rename EnvironmentProduct to ProductContent
   - make it use Candlepin::ProductContent
   - remove use of Pulp::Repos from Product
   - delegate responsibility of generation of environment uuids to
Candlepin (should cp folks agree on this)

resulting in:

                        +-------------+
                        | Environment |
                        +-------------+
                               ^
                               | 1
                               | *
  +---------+          +----------------+
  | Product | 1 ---> * | ProductContent |
  +---------+          +----------------+
                           |1  | uses
                           |   |    +---------------------------+
                           |1  +->  | Candlepin::ProductContent |
                           V        +---------------------------+
    +-------------+ uses +------------+
    | Pulp::Repos |<-----| Repository |
    +-------------+      +------------+

I don't think many-1 relation is required on
Repository-ProductContent, it's 1-1?
</pre>
      </blockquote>
    </blockquote>
    <br>
    Repository-ProductContent is not 1-1.  For example there is a singe
    content object for  RHEL  6.1 i386 RPMs as for RHEL 6.2 x86_64
    RPMS.  WIthin the RHEL product its many-to-one for sure.  For custom
    repositories currently its 1-1.<br>
    <br>
    -Justin<br>
    <br>
    <blockquote cite="mid:20120809122055.GH46364@pipboy.redhat.com"
      type="cite">
      <blockquote type="cite">
        <pre wrap="">

Thoughts, concerns, opinions?
-d




</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">_______________________________________________
katello-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:katello-devel@redhat.com">katello-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/katello-devel">https://www.redhat.com/mailman/listinfo/katello-devel</a>
</pre>
      </blockquote>
      <pre wrap="">

-James</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
katello-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:katello-devel@redhat.com">katello-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/katello-devel">https://www.redhat.com/mailman/listinfo/katello-devel</a></pre>
    </blockquote>
    <br>
  </body>
</html>