<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    Please see <a
      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.<br>
    <br>
    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.<br>
    <br>
    To resolve these: <br>
     - introduce environment uuids<br>
     - update katello/katello cli to use uuids for environment
    identification<br>
     - update repository naming to use environment uuids<br>
     - update candlepin (this will include updates to schema, and
    resource controller)<br>
    <br>
    <br>
    The larger problem: Katello and Candlepin modelling of
    products/product content/environments lost coherency. <br>
    <br>
    Candlepin's view of the above trifecta (use of a monospaced font is
    encouraged for the content below):<br>
    +-------------+          +--------------------+<br>
    | Environment | 1 <--- * | EnvironmentContent |<br>
    +-------------+          +--------------------+<br>
                                    ^<br>
                                    | *<br>
                                    | 1<br>
       
    +---------+          +----------------+ <br>
        | Product | 1 ---> * | ProductContent | <br>
        +---------+          +----------------+<br>
    <br>
    <br>
    same thing in Katello (with added pulp repositories):<br>
    <br>
       +-------------+<br>
       | Pulp::Repos |<-----------------------+<br>
       +-------------+                        |<br>
           ^                                  |<br>
           | uses                             |<br>
        +----------------------------------+  |  +-------------+<br>
        | Candlepin::Product               |  |  | Environment |<br>
        | (uses Candlepin::ProductContent) |  |  +-------------+<br>
        +----------------------------------+  |          ^ <br>
           |       ^                          |          | 1<br>
           |uses   | uses                     |          | <br>
           |       |                          |          | *<br>
         
    +---------+                      +--------------------+ <br>
          | Product | 1 ---------------> * | EnvironmentProduct | <br>
          +---------+                      +--------------------+<br>
                                              |          |1<br>
                                              |          |*<br>
                                              |          V<br>
                                              | uses +------------+<br>
                                              +------| Repository |<br>
                                                     +------------+<br>
                                     <br>
    <br>
    I propose: <br>
     - Rename EnvironmentProduct to ProductContent<br>
       - make it use Candlepin::ProductContent<br>
       - remove use of Pulp::Repos from Product<br>
       - delegate responsibility of generation of environment uuids to
    Candlepin (should cp folks agree on this) <br>
    <br>
    resulting in:<br>
    <br>
                            +-------------+<br>
                            | Environment |<br>
                            +-------------+<br>
                                   ^ <br>
                                   | 1<br>
                                   | *<br>
      +---------+          +----------------+ <br>
      | Product | 1 ---> * | ProductContent |<br>
      +---------+          +----------------+      <br>
                               |1  | uses<br>
                               |   |    +---------------------------+<br>
                               |1  +->  | Candlepin::ProductContent |<br>
                               V        +---------------------------+<br>
        +-------------+ uses +------------+<br>
        | Pulp::Repos |<-----| Repository |<br>
        +-------------+      +------------+<br>
                                     <br>
    I don't think many-1 relation is required on
    Repository-ProductContent, it's 1-1? <br>
    <br>
    <br>
    Thoughts, concerns, opinions?<br>
    -d<br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>