fog/fog-azure-rm

View on GitHub

Showing 528 of 528 total issues

Method data_disk_params has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def data_disk_params(disk_name, disk_size = nil, storage_account = nil, disk_resource_group = nil, caching = nil)
Severity: Minor
Found in lib/fog/azurerm/models/compute/server.rb - About 35 mins to fix

    Method define_vnet_object has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def define_vnet_object(location, address_prefixes, dns_servers, subnets, tags)
    Severity: Minor
    Found in lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb - About 35 mins to fix

      Method copy_blob has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def copy_blob(destination_container, destination_blob, source_container, source_blob, options = {})
      Severity: Minor
      Found in lib/fog/azurerm/requests/storage/copy_blob.rb - About 35 mins to fix

        Method get_storage_account_params has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def get_storage_account_params(sku_name, location, replication, encryption_enabled, tags)
        Severity: Minor
        Found in lib/fog/azurerm/requests/storage/create_storage_account.rb - About 35 mins to fix

          Method wait_blob_copy_operation_to_finish has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def wait_blob_copy_operation_to_finish(container_name, blob_name, copy_id, copy_status, timeout = nil)
          Severity: Minor
          Found in lib/fog/azurerm/requests/storage/wait_blob_copy_operation_to_finish.rb - About 35 mins to fix

            Method detach_network_security_group_from_subnet has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def detach_network_security_group_from_subnet(resource_group, subnet_name, virtual_network_name, address_prefix, route_table_id)

              Method get_unmanaged_disk_object has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def get_unmanaged_disk_object(disk_name, disk_size, lun, storage_account_name, access_key)
              Severity: Minor
              Found in lib/fog/azurerm/requests/compute/attach_data_disk_to_vm.rb - About 35 mins to fix

                Method image_config_params has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def image_config_params(location, new_vhd_path, platform, resource_group, vm_name)
                Severity: Minor
                Found in lib/fog/azurerm/requests/compute/create_virtual_machine.rb - About 35 mins to fix

                  Method format_server_parameters has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def format_server_parameters(location, version, admin_login, admin_password, tags)
                  Severity: Minor
                  Found in lib/fog/azurerm/requests/sql/create_or_update_sql_server.rb - About 35 mins to fix

                    Method copy_vhd_to_storage_account has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def copy_vhd_to_storage_account(resource_group, storage_account_name, vhd_path, location, vm_name)
                    Severity: Minor
                    Found in lib/fog/azurerm/requests/compute/create_virtual_machine.rb - About 35 mins to fix

                      Method get_availability_set_properties has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def get_availability_set_properties(location, fault_domain_count, update_domain_count, use_managed_disk, tags)
                      Severity: Minor
                      Found in lib/fog/azurerm/requests/compute/create_availability_set.rb - About 35 mins to fix

                        Method parse has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def self.parse(frontend_ip_configuration)
                        hash = {}
                        hash['id'] = frontend_ip_configuration.id
                        hash['name'] = frontend_ip_configuration.name
                        hash['subnet_id'] = frontend_ip_configuration.subnet.id unless frontend_ip_configuration.subnet.nil?
                        Severity: Minor
                        Found in lib/fog/azurerm/models/network/frontend_ip_configuration.rb - About 35 mins to fix

                        Method get_blob has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def get_blob(container_name, blob_name, options = {}, &block)
                        if block_given?
                        get_blob_with_block_given(container_name, blob_name, options, &block)
                        else
                        options[:request_id] = SecureRandom.uuid
                        Severity: Minor
                        Found in lib/fog/azurerm/requests/storage/get_blob.rb - About 35 mins to fix

                        Method initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def initialize(body)
                        if body.respond_to?(:read)
                        if body.respond_to?(:rewind)
                        begin
                        body.rewind
                        Severity: Minor
                        Found in lib/fog/azurerm/requests/storage/multipart_save_block_blob.rb - About 35 mins to fix

                        Method get_network_interface_object has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def get_network_interface_object(name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags, enable_accelerated_networking)
                        if public_ip_address_id
                        public_ipaddress = Azure::ARM::Network::Models::PublicIPAddress.new
                        public_ipaddress.id = public_ip_address_id
                        end
                        Severity: Minor
                        Found in lib/fog/azurerm/requests/network/create_or_update_network_interface.rb - About 35 mins to fix

                        Method initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def initialize(body)
                        if body.respond_to?(:read)
                        if body.respond_to?(:rewind)
                        begin
                        body.rewind
                        Severity: Minor
                        Found in lib/fog/azurerm/requests/storage/save_page_blob.rb - About 35 mins to fix

                        Method validate_ip_configurations has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def validate_ip_configurations(ip_configurations)
                        unless ip_configurations.is_a?(Array)
                        raise(ArgumentError, ':ip_configurations must be an Array')
                        end
                        unless ip_configurations.any?
                        Severity: Minor
                        Found in lib/fog/azurerm/models/network/virtual_network_gateway.rb - About 35 mins to fix

                        Method copy_vhd_to_storage_account has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def copy_vhd_to_storage_account(resource_group, storage_account_name, vhd_path, location, vm_name)
                        # Copy if VHD does not exist belongs to same storage account.
                        vhd_storage_account_name = (vhd_path.split('/')[2]).split('.')[0]
                        if storage_account_name != vhd_storage_account_name
                        if storage_account_name.nil?
                        Severity: Minor
                        Found in lib/fog/azurerm/requests/compute/create_virtual_machine.rb - About 35 mins to fix

                        Method detach_data_disk_from_vm has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def detach_data_disk_from_vm(resource_group, vm_name, disk_name, async)
                        msg = "Detaching Data Disk #{disk_name} from Virtual Machine #{vm_name} in Resource Group #{resource_group}."
                        Fog::Logger.debug msg
                        vm = get_virtual_machine_instance(resource_group, vm_name)
                        vm.storage_profile.data_disks.each_with_index do |disk, index|
                        Severity: Minor
                        Found in lib/fog/azurerm/requests/compute/detach_data_disk_from_vm.rb - About 35 mins to fix

                        Method parse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def self.parse(request_routing_rule)
                        hash = {}
                        hash['id'] = request_routing_rule.id
                        hash['name'] = request_routing_rule.name
                        hash['type'] = request_routing_rule.rule_type
                        Severity: Minor
                        Found in lib/fog/azurerm/models/application_gateway/request_routing_rule.rb - About 25 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language