HomePhorge

(#5662) Parsedfile doesnt work with mult keyattr
2a0c970b8f91Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#5662) Parsedfile doesnt work with mult keyattr

When one wants to use the parsedfile provider for a type with more than
one key_attribute (e.g. a type for entries in /etc/services with name
and protocol as key_attributes) the provider will not store all
key_attributes in property_hash and not all keyattributes will be
visible in the to_line function.

The create method of parsedfile will only put validproperties into the
propertyhash. As result :name and all the other key_attributes will not
be set.

In the flush method however the :name parameter is put in the
property_hash but the method does not handle other keyattributes.

This patch modifies flush to put all key_attributes into the property
hash
(Note: @resource.name is basically just an alias for @resource[:name])

Details

Provenance
Stefan Schulte <stefan.schulte@taunusstein.net>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUcc1f2b39a65e: Merge branch '2.6.next' into 2.6.x
Branches
Unknown
Tags
Unknown

Event Timeline

Stefan Schulte <stefan.schulte@taunusstein.net> committed rPU2a0c970b8f91: (#5662) Parsedfile doesnt work with mult keyattr (authored by Stefan Schulte <stefan.schulte@taunusstein.net>).Dec 23 2010, 9:27 PM