<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 14, 2015 at 1:53 PM, Rich Megginson <span dir="ltr"><<a href="mailto:rmeggins@redhat.com" target="_blank">rmeggins@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On 09/14/2015 02:30 PM, Sofer Athlan-Guyot wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi,<br>
<br>
Gilles Dubreuil <<a href="mailto:gilles@redhat.com" target="_blank">gilles@redhat.com</a>> writes:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
A. The 'composite namevar' approach:<br>
<br>
keystone_tenant {'projectX::domainY': ... }<br>
B. The 'meaningless name' approach:<br>
<br>
keystone_tenant {'myproject': name='projectX', domain=>'domainY', ...}<br>
<br>
Notes:<br>
- Actually using both combined should work too with the domain<br>
supposedly overriding the name part of the domain.<br>
- Please look at [1] this for some background between the two approaches:<br>
<br>
The question<br>
-------------<br>
Decide between the two approaches, the one we would like to retain for<br>
puppet-keystone.<br>
<br>
Why it matters?<br>
---------------<br>
1. Domain names are mandatory in every user, group or project. Besides<br>
the backward compatibility period mentioned earlier, where no domain<br>
means using the default one.<br>
2. Long term impact<br>
3. Both approaches are not completely equivalent which different<br>
consequences on the future usage.<br>
</blockquote>
I can't see why they couldn't be equivalent, but I may be missing<br>
something here.<br>
</blockquote>
<br></div></div>
I think we could support both. I don't see it as an either/or situation.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
4. Being consistent<br>
5. Therefore the community to decide<br>
<br>
Pros/Cons<br>
----------<br>
A.<br>
</blockquote>
I think it's the B: meaningless approach here.<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Pros<br>
- Easier names<br>
</blockquote>
That's subjective, creating unique and meaningful name don't look easy<br>
to me.<br>
</blockquote>
<br></span>
The point is that this allows choice - maybe the user already has some naming scheme, or wants to use a more "natural" meaningful name - rather than being forced into a possibly "awkward" naming scheme with "::"<br>
<br>
keystone_user { 'heat domain admin user':<br>
name => 'admin',<br>
domain => 'HeatDomain',<br>
...<br>
}<br>
<br>
keystone_user_role {'heat domain admin user@::HeatDomain':<br>
roles => ['admin']<br>
...<span class=""><br>
}<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Cons<br>
- Titles have no meaning!<br>
</blockquote></blockquote>
<br></span>
They have meaning to the user, not necessarily to Puppet.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
- Cases where 2 or more resources could exists<br>
</blockquote></blockquote>
<br></span>
This seems to be the hardest part - I still cannot figure out how to use "compound" names with Puppet.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
- More difficult to debug<br>
</blockquote></blockquote>
<br></span>
More difficult than it is already? :P<div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
- Titles mismatch when listing the resources (self.instances)<br>
<br>
B.<br>
Pros<br>
- Unique titles guaranteed<br>
- No ambiguity between resource found and their title<br>
Cons<br>
- More complicated titles<br>
My vote<br>
--------<br>
I would love to have the approach A for easier name.<br>
But I've seen the challenge of maintaining the providers behind the<br>
curtains and the confusion it creates with name/titles and when not sure<br>
about the domain we're dealing with.<br>
Also I believe that supporting self.instances consistently with<br>
meaningful name is saner.<br>
Therefore I vote B<br>
</blockquote>
+1 for B.<br>
<br>
My view is that this should be the advertised way, but the other method<br>
(meaningless) should be there if the user need it.<br>
<br>
So as far as I'm concerned the two idioms should co-exist. This would<br>
mimic what is possible with all puppet resources. For instance you can:<br>
<br>
file { '/tmp/foo.bar': ensure => present }<br>
<br>
and you can<br>
<br>
file { 'meaningless_id': name => '/tmp/foo.bar', ensure => present }<br>
<br>
The two refer to the same resource.<br>
</blockquote>
<br></div></div>
Right.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
But, If that's indeed not possible to have them both, then I would keep<br>
only the meaningful name.<br>
<br>
<br>
As a side note, someone raised an issue about the delimiter being<br>
hardcoded to "::". This could be a property of the resource. This<br>
would enable the user to use weird name with "::" in it and assign a "/"<br>
(for instance) to the delimiter property:<br>
<br>
Keystone_tenant { 'foo::blah/bar::is::cool': delimiter => "/", ... }<br>
<br>
bar::is::cool is the name of the domain and foo::blah is the project.<br>
</blockquote>
<br></span>
That's a good idea. Please file a bug for that.<div class=""><div class="h5"><br></div></div></blockquote><div><br></div><div>I'm not sure I see a benefit to notation like:</div><div> </div><div> Keystone_tenant { 'foo::blah/bar::is::cool': delimiter => "/", ... }</div><div><br></div><div>Overall option below just looks more straightforward (and requires less logic to convert to something useful). However, I admit I am not an expert in puppet conventions:</div><div><br></div><div> Keystone_tenant { 'foo::blah" domain => "bar::is::cool'", ... }</div><div><br></div><div><br></div><div>--Morgan</div></div></div></div>