Composite resource identifier

7 views
Skip to first unread message

Francois Deppierraz

unread,
Sep 1, 2008, 7:22:51 AM9/1/08
to puppe...@googlegroups.com
Hi Folks,

The only way to fix #1531 is IMHO to make use of composite resource
identifiers.

What do you think ? Is it possible to generate the namevar on the fly ?

This problem seems similar to the one described on
http://reductivelabs.com/trac/puppet/wiki/ImprovedResourceIdentification

Thanks,

François

Luke Kanies

unread,
Sep 8, 2008, 11:47:26 PM9/8/08
to puppe...@googlegroups.com


Yeah, composite keys are the way to go, and I think we're actually at
the point (at least, in the master branch) where this is approachable.

Previously, we had lots of code that was responsible for determining
resource uniqueness, but it's essentially all been consolidated into
the Catalog class.

We'd likely still require unique titles, but it should be possible to,
um, make it possible to define resource types with multiple namevars.
Thus, any combination of namevars would have to be unique, but no
single value would be unique.

The reason you'd still probably want unique titles is so you could do
relationships; e.g., Key[foo] works, but how would you do composite
keys? Key[foo; comment => bar]? That would suck.

I suppose the unique titles could be optional -- you'd only need them
if you were specifying relationships.

It'd be a bit problematic, though, in that Puppet uses this resource
reference syntax a lot. Maybe have the namevars always in a specific
order, and do something like Foo[key/other/bar]?

In other words, this is technically feasible now, but we need an
appropriate internal design and an appropriate syntax to go with it.

--
The great thing about television is that if something important
happens anywhere in the world, day or night, you can always change
the channel. -- From "Taxi"
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

Francois Deppierraz

unread,
Sep 29, 2008, 11:34:03 AM9/29/08
to puppe...@googlegroups.com
Luke Kanies wrote:

> In other words, this is technically feasible now, but we need an
> appropriate internal design and an appropriate syntax to go with it.

That's good to hear.

I don't think I'm yet familiar enough with puppet core to implement
something along those lines.

It's filed under Feature #1621 just in case some puppet guru gets bored ;)

François

Reply all
Reply to author
Forward
0 new messages