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

do not pass dsc_timeout as timeout parameter to DSC resource params #359

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@
#
# @param resource [Hash] a hash with the information needed to run `Invoke-DscResource`
# @return [String] A string representing the PowerShell definition of the InvokeParams hash
def invoke_params(resource)

Check failure on line 902 in lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 2.7 | puppet ~> 7.0) / spec

Metrics/MethodLength: Method has too many lines. [43/42]

Check failure on line 902 in lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 3.2 | puppet ~> 8.0) / spec

Metrics/MethodLength: Method has too many lines. [43/42]
params = {
Name: resource[:dscmeta_resource_friendly_name],
Method: resource[:dsc_invoke_method],
Expand All @@ -917,6 +917,9 @@
params[:ModuleName] = resource[:dscmeta_module_name]
end
resource[:parameters].each do |property_name, property_hash|
# ignore dsc_timeout, since it is only used to specify the powershell command timeout
# and timeout itself is not a parameter to the DSC resource
next if property_name == :dsc_timeout

Check failure on line 922 in lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 2.7 | puppet ~> 7.0) / spec

Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.

Check failure on line 922 in lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 3.2 | puppet ~> 8.0) / spec

Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
# strip dsc_ from the beginning of the property name declaration
name = property_name.to_s.gsub(/^dsc_/, '').to_sym
params[:Property][name] = case property_hash[:mof_type]
Expand Down
Loading