On 1/4/2011 11:29 AM, Brice Figureau wrote:
On Tue, 2011-01-04 at 10:52 +0100, David Schmitt wrote:
On 1/3/2011 10:32 PM, Brice Figureau wrote:
I didn't solve the uniqueness of the name of an interface yet (currently
it isn't possible to have 2 switches with the same interface name, which is
an issue).

One possibility would be to use as interface name, the device_url.
If anyone has a better idea, let me know.


It sounds like a problem the composite titles were designed to solve. It
should be pretty easy to use something like

      "ssh://user:[email protected]/FastEthernet/0/1"

Yes, that was what I was thinking about.

In fact I'd love to be able to do:

router {
   "myisprouter":
      device_url =>  "ssh://user:[email protected]";
}

interface {
  "myisprouter/FastEthernet0/1":
    ...
}

And then the interface would be smart enough to autorequire the router
and pickup the correct device url.

Do you think it's possible?

Ruby is Turing-complete, so I believe in the fundamental possibility. The challenge would be to do it "right" within the puppet framework. That is, how does the interface type access the router's device_url?

as title. Perhaps this would even work with parameter defaults, though
I'm a bit hazy on the details here.

Hmm, can you elaborate? I must admit I'm not really up to date on
provider/type development (those are my first attempts).

Composite keys were discussed first in http://groups.google.com/group/puppet-dev/browse_thread/thread/c503799d31eb21cd/97b5cdd149161378 Later puppetlabs created an implementation, but I lost track of it.



Best Regards, David
--
dasz.at OG              Tel: +43 (0)664 2602670     Web: http://dasz.at
Klosterneuburg                                         UID: ATU64260999

       FB-Nr.: FN 309285 g          FB-Gericht: LG Korneuburg

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to