Issue #2611 has been updated by Maru Newby.

I've been looking at creating OpenStack resources (users, images, etc) via a 
Puppet provider, and the capability to access resource attributes would be very 
useful.  

While it is possible to identify OpenStack resources by name, the name is not 
necessarily unique.  Each resource has a uuid, though, typically assigned on 
creation.  Not being able to access this uuid via a resource type means that a 
Puppet provider for a single OpenStack resource type has no definitive way of 
ensuring a given resource is associated with a target resource that has not yet 
been created.  The only way to ensure correct association would be creating all 
resources that need to be associated at the same time in the provider code, 
which wouldn't make for very modular or maintainable code.

----------------------------------------
Feature #2611: resource attribute access
https://projects.puppetlabs.com/issues/2611#change-92835

* Author: Jan Capek
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: language
* Target version: 3.x
* Affected Puppet version: 0.24.8
* Keywords: resource attribute access
* Branch: 
----------------------------------------
Based on a post to the development mailing list, it may be useful to add 
attribute access to the language.

Use case scenario:
- a resource has a certain attribute
- the attribute needs to be accessed from else where (e.g. another resource, 
template etc.)

Sample code:
<pre>
$cacert_path = Base::X509::Cert["cacert"].path
</pre>
Where the Base::X509::Cert resource is a custom define instantiated
e.g. as:
<pre>
  base::x509::cert { "cacert":
    path => "/etc/ssl/$name",
    source => "puppet:///profiles/cacert.pem",
  } 
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to