Showing 156 of 616 total issues
Method create_user
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_user(name, password, email, tenantId = nil, enabled = true)
Method put_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_object(container, object, data, options = {}, &block)
Method create_lb_vip
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_lb_vip(subnet_id, pool_id, protocol, protocol_port, options = {})
Method create_lb_health_monitor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_lb_health_monitor(type, delay, timeout, max_retries, options = {})
Method rebuild
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def rebuild(image_ref, name, admin_pass = nil, metadata = nil, personality = nil)
Method create_lbaas_healthmonitor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_lbaas_healthmonitor(type, delay, timeout, max_retries, options = {})
Method create_security_group_rule
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_security_group_rule(min, max, ip_protocol = "tcp", cidr = "0.0.0.0/0", group_id = nil)
Method create_lbaas_l7rule
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_lbaas_l7rule(l7policy_id, type, compare_type, value, options = {})
Method put_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_object(container, object, data, options = {}, &block)
Method copy_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy_object(source_container_name, source_object_name, target_container_name, target_object_name, options = {})
Method create_lb_member
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_lb_member(pool_id, address, protocol_port, weight, options = {})
Method create_lb_health_monitor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_lb_health_monitor(type, delay, timeout, max_retries, options = {})
Method create_recordset
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_recordset(zone_id, name, type, records, options = {})
Method create_recordset
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_recordset(zone_id, name, type, records, options = {})
Method new
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.new(args = {})
@openstack_auth_uri = URI.parse(args[:openstack_auth_url]) if args[:openstack_auth_url]
if inspect == 'Fog::OpenStack::DNS'
service = Fog::OpenStack::DNS::V2.new(args) unless args.empty?
service ||= Fog::OpenStack::DNS::V1.new(args)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method get_template_contents
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_template_contents(template_file)
Fog::Logger.debug("get_template_contents [#{template_file}]")
raise "template_file should be Hash or String, not #{template_file.class.name}" unless
template_file.kind_of?(String) || template_file.kind_of?(Hash)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method new
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.new(args = {})
@openstack_auth_uri = URI.parse(args[:openstack_auth_url]) if args[:openstack_auth_url]
if inspect == 'Fog::OpenStack::Image'
service = Fog::OpenStack::Image::V2.new(args) unless args.empty?
service ||= Fog::OpenStack::Image::V1.new(args)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method headers
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def headers(additional_headers)
additional_headers ||= {}
unless @microversion.nil? || @microversion.empty?
microversion_value = if @microversion_key == 'Openstack-API-Version'
"#{@microversion_service_type} #{@microversion}"
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method update_router
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update_router(router_id, options = {})
data = {'router' => {}}
[:name, :admin_state_up, :routes].each do |key|
data['router'][key] = options[key] if options[key]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method put_object
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def put_object(container, object, data, options = {}, &block)
dgst = Digest::MD5.new
if block_given?
Kernel.loop do
chunk = yield
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"