On Feb 5, 2011, at 12:24 PM, Dan Bode wrote:
> Is there a method somewhere in puppet to convert 0.25.x catalogs into
> something that 2.6.x can interact with?
>
> I had to monkeypatch the resources:
>
> catalog.resources.each do |r|
> unless r.title
> # this is for 0.25 catalogs, this is ghetto,
> # but I think it needs to be...
> Puppet.notice('converting 0.25.x resources to work with 2.6.x')
> type = r.instance_variable_get(:@reference).type
> title = r.instance_variable_get(:@reference).title
> r.instance_variable_set(:@type, type)
> r.instance_variable_set(:@title, title)
> end
> end
>
> and it feels dirty...
The short answer is that there's no such method that I know about; we only ever
go from 2.6 to 0.25. You might be able to write it back out as json and read
it back in; or at least, make a script that can read in 0.25 catalogs (as yaml,
I assume) and write it out as json that 2.6 can understand.
--
Never esteem anything as of advantage to you that will make you break
your word or lose your self-respect. -- Marcus Aurelius Antoninus
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199
--
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.