Showing 255 of 2,705 total issues
Avoid deeply nested control flow statements. Open
Open
if retries < 6
retries = retries + 1
sleep 10
retry
else
Avoid deeply nested control flow statements. Open
Open
subnet.private? ? priv_nets << { "Ref" => "#{subnet.cfm_name}" } : pub_nets << { "Ref" => "#{subnet.cfm_name}" }
Avoid deeply nested control flow statements. Open
Open
raise MuError, "No valid credentials available! Either grant admin privileges to machine service account, or manually add a different one with mu-configure" if found.nil?
Avoid deeply nested control flow statements. Open
Open
if !noop
MU::Cloud::Google.iam(credentials: credentials).delete_project_role(id)
end
Avoid deeply nested control flow statements. Open
Open
raise e if !e.message.match(/(?:forbidden|notFound): /)
Avoid deeply nested control flow statements. Open
Open
if !resp or !resp.attached_policies.map { |a_p| a_p.policy_name }.include?(p.policy_name)
MU.log "Attaching policy #{p.policy_name} to group #{entityname}", MU::NOTICE
MU::Cloud::AWS.iam(credentials: @credentials).attach_group_policy(
policy_arn: p.arn,
group_name: entityname
Avoid deeply nested control flow statements. Open
Open
if !MU::Cloud::Google.hosted?
raise MuError, "Google Cloud credentials not found in Vault #{vault}:#{item}"
end
Avoid deeply nested control flow statements. Open
Open
if retries < max_retries
sleep 30
retries += 1
puts retries
else
Avoid deeply nested control flow statements. Open
Open
if public
# Make sure we have a public canonical name to register. Use the private one if we don't
deploydata['public_dns_name'].empty? ? deploydata['private_dns_name'] : deploydata['public_dns_name']
else
# If we specifically requested to register the private canonical name lets use that
Avoid deeply nested control flow statements. Open
Open
if bucket_style
statement["Principal"] << { "AWS" => id }
else
statement["Principal"] << id
end
Avoid deeply nested control flow statements. Open
Open
child_params = Hash.new if child_params.nil?
Avoid deeply nested control flow statements. Open
Open
rescue StandardError => e
MU.log e.inspect, MU::WARN, details: cfg
next
Avoid deeply nested control flow statements. Open
Open
new_args << {} if new_args.empty?
Avoid deeply nested control flow statements. Open
Open
raise MuError, "Couldn't find #{dnsrec['mu_type']} #{dnsrec["target"]}" if found.nil? || found.empty?
Avoid deeply nested control flow statements. Open
Open
break if elt == other_elt # if they're identical, we're done
Avoid deeply nested control flow statements. Open
Open
if cfg['account_number'] and name.to_s == cfg['account_number'].to_s
return name_only ? acctname : $MU_CFG['aws'][acctname]
end
Avoid deeply nested control flow statements. Open
Open
if subpaths.size > 0
p_arn = "arn:"+(MU::Cloud::AWS.isGovCloud?(@region) ? "aws-us-gov" : "aws")+":iam::aws:policy/#{subpaths.shift}/"+policy
retry
end
Avoid deeply nested control flow statements. Open
Open
if new_args.size == 1 and new_args.first.is_a?(Hash)
new_args[0][page_markers[paginator]] = new_page
else
MU.log "I don't know how to insert a #{paginator} into these arguments for #{method_sym}", MU::WARN, details: new_args
end
Avoid deeply nested control flow statements. Open
Open
rescue ::Google::Apis::ClientError => e
MU.log "Error enabling #{svc_name} in #{project.gsub(/^projects\/([^\/]+)\/.*/, '\1')} for #{method_sym.to_s}: "+ e.message, MU::ERR, details: enable_obj
raise e
Avoid deeply nested control flow statements. Open
Open
if retval.error
raise MuError, retval.error.message
end