Method: Puppet::Provider::AixObject#list_all
- Defined in:
- lib/vendor/puppet/provider/aixobject.rb
#list_all ⇒ Object
List all elements of given type. It works for colon separated commands and list commands. It returns a list of names.
255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/vendor/puppet/provider/aixobject.rb', line 255 def list_all names = [] begin output = execute(self.lsallcmd()).split('\n') (output.select{ |l| l != /^#/ }).each { |v| name = v.split(/[ :]/) names << name if not name.empty? } rescue Puppet::ExecutionFailure => detail # Print error if needed Puppet.debug "aix.list_all(): Could not get all resources of type #{@resource.class.name}: #{detail}" end names end |