Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add purging support to ini file #25

Merged
merged 1 commit into from
Mar 11, 2013

Conversation

bodepd
Copy link

@bodepd bodepd commented Jan 8, 2013

This commit adds purging to ini file native types.

Purging will only work for child providers that
implement the method: self.file_path. This is
because collecting all instances of the type (
which is a requirement for purging) is only possible
when the path of the file that is being managed
can be accessed by the class instance (in the
method self.instances.)

This commit adds the following method to the internal
of the ini_file:

  • get_settings - has of all settings/values for
    a given section

It also adds the following method to the section
class:

  • setting_names - list of all setting names in a
    section.

These methods are required for the instances method
to be able to list the values for all settings of
each section.

@bodepd
Copy link
Author

bodepd commented Jan 8, 2013

this is not quite ready for merge yet. still needs some unit tests.

This commit adds purging to ini file native types.

Purging will only work for child providers that
implement the method: self.file_path. This is
because collecting all instances of the type (
which is a requirement for purging) is only possible
when the path of the file that is being managed
can be accessed by the class instance (in the
method self.instances.)

This commit adds the following method to the internal
of the ini_file:
- get_settings - has of all settings/values for
a given section

It also adds the following method to the section
class:
- setting_names - list of all setting names in a
section.

These methods are required for the instances method
to be able to list the values for all settings of
each section.
cprice404 added a commit that referenced this pull request Mar 11, 2013
Add purging support to ini file
@cprice404 cprice404 merged commit 5fdca54 into puppetlabs:master Mar 11, 2013
cegeka-jenkins pushed a commit to cegeka/puppet-inifile that referenced this pull request Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants