cloudamatic/mu

View on GitHub

Showing 2,704 of 2,705 total issues

Class has too many lines. [1926/1000]
Open

class Server < MU::Cloud::Server
 
# A list of block device names to use if we get a storage block that
# doesn't declare one explicitly.
# This probably fails on some AMIs. It's crude.
Severity: Minor
Found in modules/mu/providers/aws/server.rb by rubocop

Assignment Branch Condition size for processReference is too high. [584.8/75]
Open

def self.processReference(vpc_block, parent_type, parent, configurator, sibling_vpcs: [], dflt_region: MU.curRegion, dflt_project: nil, credentials: nil)
 
if !vpc_block.is_a?(Hash) and vpc_block.kind_of?(MU::Cloud::VPC)
return true
end
Severity: Minor
Found in modules/mu/config/vpc.rb by rubocop

Class has too many lines. [1766/1000]
Open

class ContainerCluster < MU::Cloud::ContainerCluster
 
 
# Initialize this cloud resource object. Calling +super+ will invoke the initializer defined under {MU::Cloud}, which should set the attribtues listed in {MU::Cloud::PUBLIC_ATTRS} as well as applicable dependency shortcuts, like +@vpc+, for us.
# @param args [Hash]: Hash of named arguments passed via Ruby's double-splat

Method has too many lines. [613/200]
Open

def self.schema(_config)
toplevel_required = []
 
schema = {
"flavor" => {

Block has too many lines. [694/100]
Open

@@resource_types.each_key { |name|
Object.const_get("MU").const_get("Cloud").const_get(name).class_eval {
attr_reader :cloudclass
attr_reader :cloudobj
attr_reader :destroyed
Severity: Minor
Found in modules/mu/cloud/resource_base.rb by rubocop

Block has too many lines. [692/100]
Open

Object.const_get("MU").const_get("Cloud").const_get(name).class_eval {
attr_reader :cloudclass
attr_reader :cloudobj
attr_reader :destroyed
attr_reader :delayed_save
Severity: Minor
Found in modules/mu/cloud/resource_base.rb by rubocop

Assignment Branch Condition size for create is too high. [458.7/75]
Open

def create
if @config["zones"] == nil
@config["zones"] = MU::Cloud::AWS.listAZs(region: @region)
MU.log "Using zones from #{@region}", MU::DEBUG, details: @config['zones']
end

Assignment Branch Condition size for method_missing is too high. [405.5/75]
Open

def method_missing(method_sym, *arguments)
retries = 0
actual_resource = nil
 
enable_on_fail = true
Severity: Minor
Found in modules/mu/providers/google.rb by rubocop

Assignment Branch Condition size for insertKitten is too high. [397.2/75]
Open

def insertKitten(descriptor, type, delay_validation = false, ignore_duplicates: false, overwrite: false)
append = false
start = Time.now
 
shortclass, cfg_name, cfg_plural, classname = MU::Cloud.getResourceNames(type)
Severity: Minor
Found in modules/mu/config.rb by rubocop

Assignment Branch Condition size for dependencies is too high. [391.6/75]
Open

def dependencies(use_cache: false, debug: false)
@dependencies ||= {}
@loadbalancers ||= []
@firewall_rules ||= []
 
 
Severity: Minor
Found in modules/mu/cloud/resource_base.rb by rubocop

Module has too many lines. [613/100]
Open

module MU
 
# Subclass core thread so we can gracefully handle it when we hit system
# thread limits. Back off and wait makes sense for us, since most of our
# threads are terminal (in the dependency sense) and this is unlikely to get
Severity: Minor
Found in modules/mu.rb by rubocop

Class has too many lines. [1485/1000]
Open

class VPC < MU::Cloud::VPC
require 'mu/providers/aws/vpc_subnet'
 
# Initialize this cloud resource object. Calling +super+ will invoke the initializer defined under {MU::Cloud}, which should set the attribtues listed in {MU::Cloud::PUBLIC_ATTRS} as well as applicable dependency shortcuts, like +@vpc+, for us.
# @param args [Hash]: Hash of named arguments passed via Ruby's double-splat
Severity: Minor
Found in modules/mu/providers/aws/vpc.rb by rubocop

Method has too many lines. [491/200]
Open

def create
if @config["zones"] == nil
@config["zones"] = MU::Cloud::AWS.listAZs(region: @region)
MU.log "Using zones from #{@region}", MU::DEBUG, details: @config['zones']
end

Class has too many lines. [1404/1000]
Open

class Database < MU::Cloud::Database
 
# Map legal storage values for each disk type and database engine so
# our validator can check them for us.
STORAGE_RANGES = {

Method processReference has a Cognitive Complexity of 250 (exceeds 75 allowed). Consider refactoring.
Open

def self.processReference(vpc_block, parent_type, parent, configurator, sibling_vpcs: [], dflt_region: MU.curRegion, dflt_project: nil, credentials: nil)
 
if !vpc_block.is_a?(Hash) and vpc_block.kind_of?(MU::Cloud::VPC)
return true
end
Severity: Minor
Found in modules/mu/config/vpc.rb - About 3 days to fix

Assignment Branch Condition size for toKitten is too high. [303.2/75]
Open

def toKitten(**_args)
 
bok = {
"cloud" => "Google",
"project" => @config['project'],

Assignment Branch Condition size for genParams is too high. [300.9/75]
Open

def genParams(ext = nil)
params = {
:domain_name => @config['domain_name'] || @deploydata['domain_name']
}
 
 

Assignment Branch Condition size for writeCloudFormationTemplate is too high. [297.4/75]
Open

def self.writeCloudFormationTemplate(tails: MU::Config.tails, config: {}, path: nil, mommacat: nil)
cfm_template = {
"AWSTemplateFormatVersion" => "2010-09-09",
"Description" => "Automatically generated by Mu",
"Parameters" => {

Assignment Branch Condition size for validateConfig is too high. [290.3/75]
Open

def self.validateConfig(cluster, configurator)
ok = true
start = Time.now
cluster['size'] = MU::Cloud.resourceClass("AWS", "Server").validateInstanceType(cluster["instance_type"], cluster["region"])
ok = false if cluster['size'].nil?

Assignment Branch Condition size for run is too high. [274.8/75]
Open

def run
Signal.trap("INT") do
# Don't use MU.log in here, it does a synchronize {} and that ain't
# legal inside a trap.
die = true if (Time.now.to_i - @last_sigterm) < 5
Severity: Minor
Found in modules/mu/deploy.rb by rubocop
Severity
Category
Status
Source
Language