Henrik
Cheers for the response.
I possibly didn't explain it that clearly... This resource is trying to
match the name of a different resource with the same target.
E.g, I was trying to guard against this:
> # JMS resource
>
> jmsresource { 'jms/test':
>
> ensure => present,
>
> restype => 'javax.jms.Topic',
>
> target => 'testCluster',
>
> }
>
>
>> resourceref { 'jms/test':
>
> ensure => present,
>
> target => 'testCluster'
>
> }
>
>
Trying to do this via the Glassfish CLI would fail.
However it looks like I was trying to guard against a scenario that isn't
going to happen, as the *resourceref.exists?* matches the resource created
by *jmsresource*.
So even if someone does provide the above resources, they won't get an
error...
Cheers
Gavin
On Friday, 6 March 2015 14:25:29 UTC, Henrik Lindberg wrote:
>
> On 2015-06-03 12:18, Gavin Williams wrote:
> > Morning all
> >
> > I'm trying to add some validation to a new type I've written[1] for my
> > Puppet-glassfish module[2].
> >
> > As part of the validation, I need to access the current catalog to make
> > sure that there's no another resources defined with the same /:name/ and
> > /:target /values.
>
> If name is the same as title of the resource, then by definition there
> will never be two resources with the same title/name in the catalog.
> This is enforced by the compiler.
>
> If you need a complex key (name and target), then you could use both as
> title, and split it up in the type.
>
> - henrik
>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Puppet Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to [email protected] <javascript:>
> > <mailto:[email protected] <javascript:>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/puppet-users/66050a1f-b969-4852-b271-8b7526b307cf%40googlegroups.com
>
> > <
> https://groups.google.com/d/msgid/puppet-users/66050a1f-b969-4852-b271-8b7526b307cf%40googlegroups..com?utm_medium=email&utm_source=footer>.
>
>
> > For more options, visit https://groups.google.com/d/optout.
>
>
> --
>
> Visit my Blog "Puppet on the Edge"
> http://puppet-on-the-edge.blogspot.se/
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/1c9b1455-cba9-4779-9ec3-44df2ac9bc7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.