chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Chef::Util::DSC::LocalConfigurationManager::Parser.parse
Parses the output from LCM and returns a list of Chef::Util::DSC::ResourceInfo objects
that describe how the resources affected the system
Example:
parse <<-EOF
What if: [Machine]: LCM: [Start Set ]
What if: [Machine]: LCM: [Start Resource ] [[File]FileToNotBeThere]
What if: [Machine]: LCM: [Start Set ] [[File]FileToNotBeThere]
What if: [C:\ShouldNotExist.txt] removed
What if: [Machine]: LCM: [End Set ] [[File]FileToNotBeThere] in 0.1 seconds
What if: [Machine]: LCM: [End Resource ] [[File]FileToNotBeThere]
What if: [Machine]: LCM: [End Set ]
EOF
would return
[
Chef::Util::DSC::ResourceInfo.new(
'[[File]FileToNotBeThere]',
true,
[
'[[File]FileToNotBeThere]',
'[C:\Shouldnotexist.txt]',
'[[File]FileToNotBeThere] in 0.1 seconds'
]
)
]Edit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/util/dsc/lcm_output_parser.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--Util--DSC--LocalConfigurationManager--Parser-parse-for-pr
# Commit to gitgit add lib/chef/util/dsc/lcm_output_parser.rbgit commit -m "better docs for Chef::Util::DSC::LocalConfigurationManager::Parser.parse"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--Util--DSC--LocalConfigurationManager--Parser-parse-for-pr
hub pull-request
# Celebrate!