saltstack/salt

View on GitHub
salt/states/azurearm_network.py

Summary

Maintainability
F
1 mo
Test Coverage

File azurearm_network.py has 1998 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
'''
Azure (ARM) Network State Module

.. versionadded:: 2019.2.0
Severity: Major
Found in salt/states/azurearm_network.py - About 5 days to fix

    Function load_balancer_present has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
    Open

    def load_balancer_present(name, resource_group, sku=None, frontend_ip_configurations=None, backend_address_pools=None,
                              load_balancing_rules=None, probes=None, inbound_nat_rules=None, inbound_nat_pools=None,
                              outbound_nat_rules=None, tags=None, connection_auth=None, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    Severity: Minor
    Found in salt/states/azurearm_network.py - About 1 day to fix

    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

    Function security_rule_present has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
    Open

    def security_rule_present(name, access, direction, priority, protocol, security_group, resource_group,
                              destination_address_prefix=None, destination_port_range=None, source_address_prefix=None,
                              source_port_range=None, description=None, destination_address_prefixes=None,
                              destination_port_ranges=None, source_address_prefixes=None, source_port_ranges=None,
                              connection_auth=None, **kwargs):
    Severity: Minor
    Found in salt/states/azurearm_network.py - About 1 day to fix

    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

    Function network_interface_present has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
    Open

    def network_interface_present(name, ip_configurations, subnet, virtual_network, resource_group, tags=None,
                                  virtual_machine=None, network_security_group=None, dns_settings=None, mac_address=None,
                                  primary=None, enable_accelerated_networking=None, enable_ip_forwarding=None,
                                  connection_auth=None, **kwargs):
        '''
    Severity: Minor
    Found in salt/states/azurearm_network.py - About 1 day to fix

    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

    Function public_ip_address_present has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
    Open

    def public_ip_address_present(name, resource_group, tags=None, sku=None, public_ip_allocation_method=None,
                                  public_ip_address_version=None, dns_settings=None, idle_timeout_in_minutes=None,
                                  connection_auth=None, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    Severity: Minor
    Found in salt/states/azurearm_network.py - About 6 hrs to fix

    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

    Cyclomatic complexity is too high in function security_rule_present. (39)
    Open

    def security_rule_present(name, access, direction, priority, protocol, security_group, resource_group,
                              destination_address_prefix=None, destination_port_range=None, source_address_prefix=None,
                              source_port_range=None, description=None, destination_address_prefixes=None,
                              destination_port_ranges=None, source_address_prefixes=None, source_port_ranges=None,
                              connection_auth=None, **kwargs):
    Severity: Minor
    Found in salt/states/azurearm_network.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function load_balancer_present. (33)
    Open

    def load_balancer_present(name, resource_group, sku=None, frontend_ip_configurations=None, backend_address_pools=None,
                              load_balancing_rules=None, probes=None, inbound_nat_rules=None, inbound_nat_pools=None,
                              outbound_nat_rules=None, tags=None, connection_auth=None, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    Severity: Minor
    Found in salt/states/azurearm_network.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function route_table_present has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    def route_table_present(name, resource_group, tags=None, routes=None, disable_bgp_route_propagation=None,
                            connection_auth=None, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
    
    Severity: Minor
    Found in salt/states/azurearm_network.py - About 3 hrs to fix

    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

    Cyclomatic complexity is too high in function network_interface_present. (29)
    Open

    def network_interface_present(name, ip_configurations, subnet, virtual_network, resource_group, tags=None,
                                  virtual_machine=None, network_security_group=None, dns_settings=None, mac_address=None,
                                  primary=None, enable_accelerated_networking=None, enable_ip_forwarding=None,
                                  connection_auth=None, **kwargs):
        '''
    Severity: Minor
    Found in salt/states/azurearm_network.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function subnet_present has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    def subnet_present(name, address_prefix, virtual_network, resource_group,
                       security_group=None, route_table=None, connection_auth=None, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
    
    Severity: Minor
    Found in salt/states/azurearm_network.py - About 2 hrs to fix

    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

    Function virtual_network_present has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    def virtual_network_present(name, address_prefixes, resource_group, dns_servers=None,
                                tags=None, connection_auth=None, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
    
    Severity: Minor
    Found in salt/states/azurearm_network.py - About 2 hrs to fix

    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

    Function network_security_group_present has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    def network_security_group_present(name, resource_group, tags=None, security_rules=None, connection_auth=None,
                                       **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
    
    Severity: Minor
    Found in salt/states/azurearm_network.py - About 2 hrs to fix

    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

    Function route_present has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    def route_present(name, address_prefix, next_hop_type, route_table, resource_group, next_hop_ip_address=None,
                      connection_auth=None, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
    
    Severity: Minor
    Found in salt/states/azurearm_network.py - About 2 hrs to fix

    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

    Cyclomatic complexity is too high in function public_ip_address_present. (22)
    Open

    def public_ip_address_present(name, resource_group, tags=None, sku=None, public_ip_allocation_method=None,
                                  public_ip_address_version=None, dns_settings=None, idle_timeout_in_minutes=None,
                                  connection_auth=None, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    Severity: Minor
    Found in salt/states/azurearm_network.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Avoid deeply nested control flow statements.
    Open

                        if local_src_addrs[idx].lower() != remote_src_addrs[idx].lower():
                            ret['changes']['source_address_prefixes'] = {
                                'old': rule.get('source_address_prefixes'),
                                'new': source_address_prefixes
                            }
    Severity: Major
    Found in salt/states/azurearm_network.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if local_dst_addrs[idx].lower() != remote_dst_addrs[idx].lower():
                              ret['changes']['destination_address_prefixes'] = {
                                  'old': rule.get('destination_address_prefixes'),
                                  'new': destination_address_prefixes
                              }
      Severity: Major
      Found in salt/states/azurearm_network.py - About 45 mins to fix

        Avoid too many return statements within this function.
        Open

            return ret
        Severity: Major
        Found in salt/states/azurearm_network.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return ret
          Severity: Major
          Found in salt/states/azurearm_network.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return ret
            Severity: Major
            Found in salt/states/azurearm_network.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return ret
              Severity: Major
              Found in salt/states/azurearm_network.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return ret
                Severity: Major
                Found in salt/states/azurearm_network.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return ret
                  Severity: Major
                  Found in salt/states/azurearm_network.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return ret
                    Severity: Major
                    Found in salt/states/azurearm_network.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return ret
                      Severity: Major
                      Found in salt/states/azurearm_network.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return ret
                        Severity: Major
                        Found in salt/states/azurearm_network.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return ret
                          Severity: Major
                          Found in salt/states/azurearm_network.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return ret
                            Severity: Major
                            Found in salt/states/azurearm_network.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return ret
                              Severity: Major
                              Found in salt/states/azurearm_network.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return ret
                                Severity: Major
                                Found in salt/states/azurearm_network.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return ret
                                  Severity: Major
                                  Found in salt/states/azurearm_network.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        return ret
                                    Severity: Major
                                    Found in salt/states/azurearm_network.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                      return ret
                                      Severity: Major
                                      Found in salt/states/azurearm_network.py - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                    return ret
                                        Severity: Major
                                        Found in salt/states/azurearm_network.py - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                      return ret
                                          Severity: Major
                                          Found in salt/states/azurearm_network.py - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                return ret
                                            Severity: Major
                                            Found in salt/states/azurearm_network.py - About 30 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                  return ret
                                              Severity: Major
                                              Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                    return ret
                                                Severity: Major
                                                Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                          return ret
                                                  Severity: Major
                                                  Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                            return ret
                                                    Severity: Major
                                                    Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                          return ret
                                                      Severity: Major
                                                      Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                                    return ret
                                                        Severity: Major
                                                        Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                  return ret
                                                          Severity: Major
                                                          Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                return ret
                                                            Severity: Major
                                                            Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                      return ret
                                                              Severity: Major
                                                              Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                        return ret
                                                                Severity: Major
                                                                Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                      return ret
                                                                  Severity: Major
                                                                  Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                            return ret
                                                                    Severity: Major
                                                                    Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                                      return ret
                                                                      Severity: Major
                                                                      Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                            return ret
                                                                        Severity: Major
                                                                        Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                              return ret
                                                                          Severity: Major
                                                                          Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                            return ret
                                                                            Severity: Major
                                                                            Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                              return ret
                                                                              Severity: Major
                                                                              Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                    return ret
                                                                                Severity: Major
                                                                                Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                              return ret
                                                                                  Severity: Major
                                                                                  Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                            return ret
                                                                                    Severity: Major
                                                                                    Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                              return ret
                                                                                      Severity: Major
                                                                                      Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                            return ret
                                                                                        Severity: Major
                                                                                        Found in salt/states/azurearm_network.py - About 30 mins to fix

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                          def route_absent(name, route_table, resource_group, connection_auth=None):
                                                                                              '''
                                                                                              .. versionadded:: 2019.2.0
                                                                                          
                                                                                              Ensure a route table does not exist in the resource group.
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 2 days to fix
                                                                                          salt/states/azurearm_network.py on lines 466..530
                                                                                          salt/states/azurearm_network.py on lines 1055..1119

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 270.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                          def subnet_absent(name, virtual_network, resource_group, connection_auth=None):
                                                                                              '''
                                                                                              .. versionadded:: 2019.2.0
                                                                                          
                                                                                              Ensure a virtual network does not exist in the virtual network.
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 2 days to fix
                                                                                          salt/states/azurearm_network.py on lines 1055..1119
                                                                                          salt/states/azurearm_network.py on lines 2450..2514

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 270.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                          def security_rule_absent(name, security_group, resource_group, connection_auth=None):
                                                                                              '''
                                                                                              .. versionadded:: 2019.2.0
                                                                                          
                                                                                              Ensure a security rule does not exist in the network security group.
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 2 days to fix
                                                                                          salt/states/azurearm_network.py on lines 466..530
                                                                                          salt/states/azurearm_network.py on lines 2450..2514

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 270.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 9 locations. Consider refactoring.
                                                                                          Open

                                                                                          def network_interface_absent(name, resource_group, connection_auth=None):
                                                                                              '''
                                                                                              .. versionadded:: 2019.2.0
                                                                                          
                                                                                              Ensure a network interface does not exist in the resource group.
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 8 other locations - About 2 days to fix
                                                                                          salt/states/azurearm_compute.py on lines 266..326
                                                                                          salt/states/azurearm_dns.py on lines 307..367
                                                                                          salt/states/azurearm_network.py on lines 261..321
                                                                                          salt/states/azurearm_network.py on lines 674..734
                                                                                          salt/states/azurearm_network.py on lines 1481..1541
                                                                                          salt/states/azurearm_network.py on lines 1730..1790
                                                                                          salt/states/azurearm_network.py on lines 2254..2314
                                                                                          salt/states/azurearm_resource.py on lines 756..816

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 267.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 9 locations. Consider refactoring.
                                                                                          Open

                                                                                          def public_ip_address_absent(name, resource_group, connection_auth=None):
                                                                                              '''
                                                                                              .. versionadded:: 2019.2.0
                                                                                          
                                                                                              Ensure a public IP address does not exist in the resource group.
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 8 other locations - About 2 days to fix
                                                                                          salt/states/azurearm_compute.py on lines 266..326
                                                                                          salt/states/azurearm_dns.py on lines 307..367
                                                                                          salt/states/azurearm_network.py on lines 261..321
                                                                                          salt/states/azurearm_network.py on lines 674..734
                                                                                          salt/states/azurearm_network.py on lines 1481..1541
                                                                                          salt/states/azurearm_network.py on lines 2050..2110
                                                                                          salt/states/azurearm_network.py on lines 2254..2314
                                                                                          salt/states/azurearm_resource.py on lines 756..816

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 267.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 9 locations. Consider refactoring.
                                                                                          Open

                                                                                          def load_balancer_absent(name, resource_group, connection_auth=None):
                                                                                              '''
                                                                                              .. versionadded:: 2019.2.0
                                                                                          
                                                                                              Ensure a load balancer does not exist in the resource group.
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 8 other locations - About 2 days to fix
                                                                                          salt/states/azurearm_compute.py on lines 266..326
                                                                                          salt/states/azurearm_dns.py on lines 307..367
                                                                                          salt/states/azurearm_network.py on lines 261..321
                                                                                          salt/states/azurearm_network.py on lines 674..734
                                                                                          salt/states/azurearm_network.py on lines 1730..1790
                                                                                          salt/states/azurearm_network.py on lines 2050..2110
                                                                                          salt/states/azurearm_network.py on lines 2254..2314
                                                                                          salt/states/azurearm_resource.py on lines 756..816

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 267.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 9 locations. Consider refactoring.
                                                                                          Open

                                                                                          def network_security_group_absent(name, resource_group, connection_auth=None):
                                                                                              '''
                                                                                              .. versionadded:: 2019.2.0
                                                                                          
                                                                                              Ensure a network security group does not exist in the resource group.
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 8 other locations - About 2 days to fix
                                                                                          salt/states/azurearm_compute.py on lines 266..326
                                                                                          salt/states/azurearm_dns.py on lines 307..367
                                                                                          salt/states/azurearm_network.py on lines 261..321
                                                                                          salt/states/azurearm_network.py on lines 1481..1541
                                                                                          salt/states/azurearm_network.py on lines 1730..1790
                                                                                          salt/states/azurearm_network.py on lines 2050..2110
                                                                                          salt/states/azurearm_network.py on lines 2254..2314
                                                                                          salt/states/azurearm_resource.py on lines 756..816

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 267.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 9 locations. Consider refactoring.
                                                                                          Open

                                                                                          def route_table_absent(name, resource_group, connection_auth=None):
                                                                                              '''
                                                                                              .. versionadded:: 2019.2.0
                                                                                          
                                                                                              Ensure a route table does not exist in the resource group.
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 8 other locations - About 2 days to fix
                                                                                          salt/states/azurearm_compute.py on lines 266..326
                                                                                          salt/states/azurearm_dns.py on lines 307..367
                                                                                          salt/states/azurearm_network.py on lines 261..321
                                                                                          salt/states/azurearm_network.py on lines 674..734
                                                                                          salt/states/azurearm_network.py on lines 1481..1541
                                                                                          salt/states/azurearm_network.py on lines 1730..1790
                                                                                          salt/states/azurearm_network.py on lines 2050..2110
                                                                                          salt/states/azurearm_resource.py on lines 756..816

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 267.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 9 locations. Consider refactoring.
                                                                                          Open

                                                                                          def virtual_network_absent(name, resource_group, connection_auth=None):
                                                                                              '''
                                                                                              .. versionadded:: 2019.2.0
                                                                                          
                                                                                              Ensure a virtual network does not exist in the resource group.
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 8 other locations - About 2 days to fix
                                                                                          salt/states/azurearm_compute.py on lines 266..326
                                                                                          salt/states/azurearm_dns.py on lines 307..367
                                                                                          salt/states/azurearm_network.py on lines 674..734
                                                                                          salt/states/azurearm_network.py on lines 1481..1541
                                                                                          salt/states/azurearm_network.py on lines 1730..1790
                                                                                          salt/states/azurearm_network.py on lines 2050..2110
                                                                                          salt/states/azurearm_network.py on lines 2254..2314
                                                                                          salt/states/azurearm_resource.py on lines 756..816

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 267.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if sorted(source_address_prefixes or []) != sorted(rule.get('source_address_prefixes', [])):
                                                                                                      if len(source_address_prefixes or []) != len(rule.get('source_address_prefixes', [])):
                                                                                                          ret['changes']['source_address_prefixes'] = {
                                                                                                              'old': rule.get('source_address_prefixes'),
                                                                                                              'new': source_address_prefixes
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 1 day to fix
                                                                                          salt/states/azurearm_network.py on lines 952..967

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 190.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if sorted(destination_address_prefixes or []) != sorted(rule.get('destination_address_prefixes', [])):
                                                                                                      if len(destination_address_prefixes or []) != len(rule.get('destination_address_prefixes', [])):
                                                                                                          ret['changes']['destination_address_prefixes'] = {
                                                                                                              'old': rule.get('destination_address_prefixes'),
                                                                                                              'new': destination_address_prefixes
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 1 day to fix
                                                                                          salt/states/azurearm_network.py on lines 970..985

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 190.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if outbound_nat_rules:
                                                                                                      comp_ret = __utils__['azurearm.compare_list_of_dicts'](
                                                                                                          load_bal.get('outbound_nat_rules', []),
                                                                                                          outbound_nat_rules,
                                                                                                          ['frontend_ip_configuration']
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 5 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 1378..1390
                                                                                          salt/states/azurearm_network.py on lines 1393..1405

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 99.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if inbound_nat_pools:
                                                                                                      comp_ret = __utils__['azurearm.compare_list_of_dicts'](
                                                                                                          load_bal.get('inbound_nat_pools', []),
                                                                                                          inbound_nat_pools,
                                                                                                          ['frontend_ip_configuration']
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 5 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 1378..1390
                                                                                          salt/states/azurearm_network.py on lines 1408..1420

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 99.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if inbound_nat_rules:
                                                                                                      comp_ret = __utils__['azurearm.compare_list_of_dicts'](
                                                                                                          load_bal.get('inbound_nat_rules', []),
                                                                                                          inbound_nat_rules,
                                                                                                          ['frontend_ip_configuration']
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 5 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 1393..1405
                                                                                          salt/states/azurearm_network.py on lines 1408..1420

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 99.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if routes:
                                                                                                      comp_ret = __utils__['azurearm.compare_list_of_dicts'](rt_tbl.get('routes', []), routes)
                                                                                          
                                                                                                      if comp_ret.get('comment'):
                                                                                                          ret['comment'] = '"routes" {0}'.format(comp_ret['comment'])
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 3 other locations - About 5 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 618..626
                                                                                          salt/states/azurearm_network.py on lines 1338..1349
                                                                                          salt/states/azurearm_network.py on lines 1352..1360

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 96.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if security_rules:
                                                                                                      comp_ret = __utils__['azurearm.compare_list_of_dicts'](nsg.get('security_rules', []), security_rules)
                                                                                          
                                                                                                      if comp_ret.get('comment'):
                                                                                                          ret['comment'] = '"security_rules" {0}'.format(comp_ret['comment'])
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 3 other locations - About 5 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 1338..1349
                                                                                          salt/states/azurearm_network.py on lines 1352..1360
                                                                                          salt/states/azurearm_network.py on lines 2197..2205

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 96.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if backend_address_pools:
                                                                                                      comp_ret = __utils__['azurearm.compare_list_of_dicts'](
                                                                                                          load_bal.get('backend_address_pools', []),
                                                                                                          backend_address_pools
                                                                                                      )
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 3 other locations - About 5 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 618..626
                                                                                          salt/states/azurearm_network.py on lines 1352..1360
                                                                                          salt/states/azurearm_network.py on lines 2197..2205

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 96.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if probes:
                                                                                                      comp_ret = __utils__['azurearm.compare_list_of_dicts'](load_bal.get('probes', []), probes)
                                                                                          
                                                                                                      if comp_ret.get('comment'):
                                                                                                          ret['comment'] = '"probes" {0}'.format(comp_ret['comment'])
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 3 other locations - About 5 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 618..626
                                                                                          salt/states/azurearm_network.py on lines 1338..1349
                                                                                          salt/states/azurearm_network.py on lines 2197..2205

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 96.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if (source_address_prefix or '').lower() != rule.get('source_address_prefix', '').lower():
                                                                                                      ret['changes']['source_address_prefix'] = {
                                                                                                          'old': rule.get('source_address_prefix'),
                                                                                                          'new': source_address_prefix
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 6 other locations - About 2 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 938..941
                                                                                          salt/states/azurearm_resource.py on lines 457..460
                                                                                          salt/states/azurearm_resource.py on lines 463..466
                                                                                          salt/states/azurearm_resource.py on lines 469..472
                                                                                          salt/states/azurearm_resource.py on lines 686..689
                                                                                          salt/states/azurearm_resource.py on lines 692..695

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 59.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if (destination_address_prefix or '').lower() != rule.get('destination_address_prefix', '').lower():
                                                                                                      ret['changes']['destination_address_prefix'] = {
                                                                                                          'old': rule.get('destination_address_prefix'),
                                                                                                          'new': destination_address_prefix
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 6 other locations - About 2 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 945..948
                                                                                          salt/states/azurearm_resource.py on lines 457..460
                                                                                          salt/states/azurearm_resource.py on lines 463..466
                                                                                          salt/states/azurearm_resource.py on lines 469..472
                                                                                          salt/states/azurearm_resource.py on lines 686..689
                                                                                          salt/states/azurearm_resource.py on lines 692..695

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 59.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if sorted(destination_port_ranges or []) != sorted(rule.get('destination_port_ranges', [])):
                                                                                                      ret['changes']['destination_port_ranges'] = {
                                                                                                          'old': rule.get('destination_port_ranges'),
                                                                                                          'new': destination_port_ranges
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 2 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 931..934

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 59.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if sorted(source_port_ranges or []) != sorted(rule.get('source_port_ranges', [])):
                                                                                                      ret['changes']['source_port_ranges'] = {
                                                                                                          'old': rule.get('source_port_ranges'),
                                                                                                          'new': source_port_ranges
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 2 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 924..927

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 59.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if kwargs.get('enable_ddos_protection', False) != vnet.get('enable_ddos_protection'):
                                                                                                      ret['changes']['enable_ddos_protection'] = {
                                                                                                          'old': vnet.get('enable_ddos_protection'),
                                                                                                          'new': kwargs.get('enable_ddos_protection')
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 2 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 205..208

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 58.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if kwargs.get('enable_vm_protection', False) != vnet.get('enable_vm_protection'):
                                                                                                      ret['changes']['enable_vm_protection'] = {
                                                                                                          'old': vnet.get('enable_vm_protection'),
                                                                                                          'new': kwargs.get('enable_vm_protection')
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 2 hrs to fix
                                                                                          salt/states/azurearm_network.py on lines 199..202

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 58.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if enable_ip_forwarding is not None:
                                                                                                      if enable_ip_forwarding != iface.get('enable_ip_forwarding'):
                                                                                                          ret['changes']['enable_ip_forwarding'] = {
                                                                                                              'old': iface.get('enable_ip_forwarding'),
                                                                                                              'new': enable_ip_forwarding
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 1924..1928

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 55.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if enable_accelerated_networking is not None:
                                                                                                      if enable_accelerated_networking != iface.get('enable_accelerated_networking'):
                                                                                                          ret['changes']['enable_accelerated_networking'] = {
                                                                                                              'old': iface.get('enable_accelerated_networking'),
                                                                                                              'new': enable_accelerated_networking
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 1932..1936

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 55.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if protocol.lower() != rule.get('protocol', '').lower():
                                                                                                      ret['changes']['protocol'] = {
                                                                                                          'old': rule.get('protocol'),
                                                                                                          'new': protocol
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 1663..1667
                                                                                          salt/states/azurearm_network.py on lines 2390..2393

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 54.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if public_ip_address_version:
                                                                                                      if public_ip_address_version.lower() != pub_ip.get('public_ip_address_version', '').lower():
                                                                                                          ret['changes']['public_ip_address_version'] = {
                                                                                                              'old': pub_ip.get('public_ip_address_version'),
                                                                                                              'new': public_ip_address_version
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 903..906
                                                                                          salt/states/azurearm_network.py on lines 2390..2393

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 54.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if next_hop_type.lower() != route.get('next_hop_type', '').lower():
                                                                                                      ret['changes']['next_hop_type'] = {
                                                                                                          'old': route.get('next_hop_type'),
                                                                                                          'new': next_hop_type
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 903..906
                                                                                          salt/states/azurearm_network.py on lines 1663..1667

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 54.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if idle_timeout_in_minutes and (int(idle_timeout_in_minutes) != pub_ip.get('idle_timeout_in_minutes')):
                                                                                                      ret['changes']['idle_timeout_in_minutes'] = {
                                                                                                          'old': pub_ip.get('idle_timeout_in_minutes'),
                                                                                                          'new': idle_timeout_in_minutes
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 1 hr to fix
                                                                                          salt/states/azurearm_compute.py on lines 184..187
                                                                                          salt/states/azurearm_compute.py on lines 190..193

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 54.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if mac_address and (mac_address != iface.get('mac_address')):
                                                                                                      ret['changes']['mac_address'] = {
                                                                                                          'old': iface.get('mac_address'),
                                                                                                          'new': mac_address
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 2190..2193

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 50.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if disable_bgp_route_propagation and (disable_bgp_route_propagation != rt_tbl.get('disable_bgp_route_propagation')):
                                                                                                      ret['changes']['disable_bgp_route_propagation'] = {
                                                                                                          'old': rt_tbl.get('disable_bgp_route_propagation'),
                                                                                                          'new': disable_bgp_route_propagation
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 1909..1912

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 50.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                              rule = __salt__['azurearm_network.security_rule_create_or_update'](
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 1 hr to fix
                                                                                          salt/states/grafana4_datasource.py on lines 133..133
                                                                                          salt/states/syslog_ng.py on lines 100..100

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 49.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if access.capitalize() != rule.get('access'):
                                                                                                      ret['changes']['access'] = {
                                                                                                          'old': rule.get('access'),
                                                                                                          'new': access
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 889..892
                                                                                          salt/states/azurearm_network.py on lines 1655..1659

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 49.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if public_ip_allocation_method:
                                                                                                      if public_ip_allocation_method.capitalize() != pub_ip.get('public_ip_allocation_method'):
                                                                                                          ret['changes']['public_ip_allocation_method'] = {
                                                                                                              'old': pub_ip.get('public_ip_allocation_method'),
                                                                                                              'new': public_ip_allocation_method
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 875..878
                                                                                          salt/states/azurearm_network.py on lines 889..892

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 49.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if direction.capitalize() != rule.get('direction'):
                                                                                                      ret['changes']['direction'] = {
                                                                                                          'old': rule.get('direction'),
                                                                                                          'new': direction
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 875..878
                                                                                          salt/states/azurearm_network.py on lines 1655..1659

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 49.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if sku:
                                                                                                      sku_changes = __utils__['dictdiffer.deep_diff'](pub_ip.get('sku', {}), sku)
                                                                                                      if sku_changes:
                                                                                                          ret['changes']['sku'] = sku_changes
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 1317..1320

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 48.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if sku:
                                                                                                      sku_changes = __utils__['dictdiffer.deep_diff'](load_bal.get('sku', {}), sku)
                                                                                                      if sku_changes:
                                                                                                          ret['changes']['sku'] = sku_changes
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 1 other location - About 1 hr to fix
                                                                                          salt/states/azurearm_network.py on lines 1649..1652

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 48.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if not ret['changes']:
                                                                                                      ret['result'] = True
                                                                                                      ret['comment'] = 'Route table {0} is already present.'.format(name)
                                                                                                      return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 55 mins to fix
                                                                                          salt/states/azurearm_compute.py on lines 215..218
                                                                                          salt/states/azurearm_dns.py on lines 253..256
                                                                                          salt/states/azurearm_dns.py on lines 557..560
                                                                                          salt/states/azurearm_network.py on lines 211..214
                                                                                          salt/states/azurearm_network.py on lines 418..421
                                                                                          salt/states/azurearm_network.py on lines 628..631
                                                                                          salt/states/azurearm_network.py on lines 987..990
                                                                                          salt/states/azurearm_network.py on lines 1422..1425
                                                                                          salt/states/azurearm_network.py on lines 1677..1680
                                                                                          salt/states/azurearm_network.py on lines 1989..1992
                                                                                          salt/states/azurearm_network.py on lines 2402..2405
                                                                                          salt/states/azurearm_resource.py on lines 160..163
                                                                                          salt/states/azurearm_resource.py on lines 487..490
                                                                                          salt/states/azurearm_resource.py on lines 702..705

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 45.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if not ret['changes']:
                                                                                                      ret['result'] = True
                                                                                                      ret['comment'] = 'Route {0} is already present.'.format(name)
                                                                                                      return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 55 mins to fix
                                                                                          salt/states/azurearm_compute.py on lines 215..218
                                                                                          salt/states/azurearm_dns.py on lines 253..256
                                                                                          salt/states/azurearm_dns.py on lines 557..560
                                                                                          salt/states/azurearm_network.py on lines 211..214
                                                                                          salt/states/azurearm_network.py on lines 418..421
                                                                                          salt/states/azurearm_network.py on lines 628..631
                                                                                          salt/states/azurearm_network.py on lines 987..990
                                                                                          salt/states/azurearm_network.py on lines 1422..1425
                                                                                          salt/states/azurearm_network.py on lines 1677..1680
                                                                                          salt/states/azurearm_network.py on lines 1989..1992
                                                                                          salt/states/azurearm_network.py on lines 2207..2210
                                                                                          salt/states/azurearm_resource.py on lines 160..163
                                                                                          salt/states/azurearm_resource.py on lines 487..490
                                                                                          salt/states/azurearm_resource.py on lines 702..705

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 45.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if not ret['changes']:
                                                                                                      ret['result'] = True
                                                                                                      ret['comment'] = 'Network interface {0} is already present.'.format(name)
                                                                                                      return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 55 mins to fix
                                                                                          salt/states/azurearm_compute.py on lines 215..218
                                                                                          salt/states/azurearm_dns.py on lines 253..256
                                                                                          salt/states/azurearm_dns.py on lines 557..560
                                                                                          salt/states/azurearm_network.py on lines 211..214
                                                                                          salt/states/azurearm_network.py on lines 418..421
                                                                                          salt/states/azurearm_network.py on lines 628..631
                                                                                          salt/states/azurearm_network.py on lines 987..990
                                                                                          salt/states/azurearm_network.py on lines 1422..1425
                                                                                          salt/states/azurearm_network.py on lines 1677..1680
                                                                                          salt/states/azurearm_network.py on lines 2207..2210
                                                                                          salt/states/azurearm_network.py on lines 2402..2405
                                                                                          salt/states/azurearm_resource.py on lines 160..163
                                                                                          salt/states/azurearm_resource.py on lines 487..490
                                                                                          salt/states/azurearm_resource.py on lines 702..705

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 45.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if not ret['changes']:
                                                                                                      ret['result'] = True
                                                                                                      ret['comment'] = 'Network security group {0} is already present.'.format(name)
                                                                                                      return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 55 mins to fix
                                                                                          salt/states/azurearm_compute.py on lines 215..218
                                                                                          salt/states/azurearm_dns.py on lines 253..256
                                                                                          salt/states/azurearm_dns.py on lines 557..560
                                                                                          salt/states/azurearm_network.py on lines 211..214
                                                                                          salt/states/azurearm_network.py on lines 418..421
                                                                                          salt/states/azurearm_network.py on lines 987..990
                                                                                          salt/states/azurearm_network.py on lines 1422..1425
                                                                                          salt/states/azurearm_network.py on lines 1677..1680
                                                                                          salt/states/azurearm_network.py on lines 1989..1992
                                                                                          salt/states/azurearm_network.py on lines 2207..2210
                                                                                          salt/states/azurearm_network.py on lines 2402..2405
                                                                                          salt/states/azurearm_resource.py on lines 160..163
                                                                                          salt/states/azurearm_resource.py on lines 487..490
                                                                                          salt/states/azurearm_resource.py on lines 702..705

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 45.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if not ret['changes']:
                                                                                                      ret['result'] = True
                                                                                                      ret['comment'] = 'Subnet {0} is already present.'.format(name)
                                                                                                      return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 55 mins to fix
                                                                                          salt/states/azurearm_compute.py on lines 215..218
                                                                                          salt/states/azurearm_dns.py on lines 253..256
                                                                                          salt/states/azurearm_dns.py on lines 557..560
                                                                                          salt/states/azurearm_network.py on lines 211..214
                                                                                          salt/states/azurearm_network.py on lines 628..631
                                                                                          salt/states/azurearm_network.py on lines 987..990
                                                                                          salt/states/azurearm_network.py on lines 1422..1425
                                                                                          salt/states/azurearm_network.py on lines 1677..1680
                                                                                          salt/states/azurearm_network.py on lines 1989..1992
                                                                                          salt/states/azurearm_network.py on lines 2207..2210
                                                                                          salt/states/azurearm_network.py on lines 2402..2405
                                                                                          salt/states/azurearm_resource.py on lines 160..163
                                                                                          salt/states/azurearm_resource.py on lines 487..490
                                                                                          salt/states/azurearm_resource.py on lines 702..705

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 45.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if not ret['changes']:
                                                                                                      ret['result'] = True
                                                                                                      ret['comment'] = 'Load balancer {0} is already present.'.format(name)
                                                                                                      return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 55 mins to fix
                                                                                          salt/states/azurearm_compute.py on lines 215..218
                                                                                          salt/states/azurearm_dns.py on lines 253..256
                                                                                          salt/states/azurearm_dns.py on lines 557..560
                                                                                          salt/states/azurearm_network.py on lines 211..214
                                                                                          salt/states/azurearm_network.py on lines 418..421
                                                                                          salt/states/azurearm_network.py on lines 628..631
                                                                                          salt/states/azurearm_network.py on lines 987..990
                                                                                          salt/states/azurearm_network.py on lines 1677..1680
                                                                                          salt/states/azurearm_network.py on lines 1989..1992
                                                                                          salt/states/azurearm_network.py on lines 2207..2210
                                                                                          salt/states/azurearm_network.py on lines 2402..2405
                                                                                          salt/states/azurearm_resource.py on lines 160..163
                                                                                          salt/states/azurearm_resource.py on lines 487..490
                                                                                          salt/states/azurearm_resource.py on lines 702..705

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 45.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if not ret['changes']:
                                                                                                      ret['result'] = True
                                                                                                      ret['comment'] = 'Public IP address {0} is already present.'.format(name)
                                                                                                      return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 55 mins to fix
                                                                                          salt/states/azurearm_compute.py on lines 215..218
                                                                                          salt/states/azurearm_dns.py on lines 253..256
                                                                                          salt/states/azurearm_dns.py on lines 557..560
                                                                                          salt/states/azurearm_network.py on lines 211..214
                                                                                          salt/states/azurearm_network.py on lines 418..421
                                                                                          salt/states/azurearm_network.py on lines 628..631
                                                                                          salt/states/azurearm_network.py on lines 987..990
                                                                                          salt/states/azurearm_network.py on lines 1422..1425
                                                                                          salt/states/azurearm_network.py on lines 1989..1992
                                                                                          salt/states/azurearm_network.py on lines 2207..2210
                                                                                          salt/states/azurearm_network.py on lines 2402..2405
                                                                                          salt/states/azurearm_resource.py on lines 160..163
                                                                                          salt/states/azurearm_resource.py on lines 487..490
                                                                                          salt/states/azurearm_resource.py on lines 702..705

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 45.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if not ret['changes']:
                                                                                                      ret['result'] = True
                                                                                                      ret['comment'] = 'Virtual network {0} is already present.'.format(name)
                                                                                                      return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 55 mins to fix
                                                                                          salt/states/azurearm_compute.py on lines 215..218
                                                                                          salt/states/azurearm_dns.py on lines 253..256
                                                                                          salt/states/azurearm_dns.py on lines 557..560
                                                                                          salt/states/azurearm_network.py on lines 418..421
                                                                                          salt/states/azurearm_network.py on lines 628..631
                                                                                          salt/states/azurearm_network.py on lines 987..990
                                                                                          salt/states/azurearm_network.py on lines 1422..1425
                                                                                          salt/states/azurearm_network.py on lines 1677..1680
                                                                                          salt/states/azurearm_network.py on lines 1989..1992
                                                                                          salt/states/azurearm_network.py on lines 2207..2210
                                                                                          salt/states/azurearm_network.py on lines 2402..2405
                                                                                          salt/states/azurearm_resource.py on lines 160..163
                                                                                          salt/states/azurearm_resource.py on lines 487..490
                                                                                          salt/states/azurearm_resource.py on lines 702..705

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 45.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                                  if not ret['changes']:
                                                                                                      ret['result'] = True
                                                                                                      ret['comment'] = 'Security rule {0} is already present.'.format(name)
                                                                                                      return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 55 mins to fix
                                                                                          salt/states/azurearm_compute.py on lines 215..218
                                                                                          salt/states/azurearm_dns.py on lines 253..256
                                                                                          salt/states/azurearm_dns.py on lines 557..560
                                                                                          salt/states/azurearm_network.py on lines 211..214
                                                                                          salt/states/azurearm_network.py on lines 418..421
                                                                                          salt/states/azurearm_network.py on lines 628..631
                                                                                          salt/states/azurearm_network.py on lines 1422..1425
                                                                                          salt/states/azurearm_network.py on lines 1677..1680
                                                                                          salt/states/azurearm_network.py on lines 1989..1992
                                                                                          salt/states/azurearm_network.py on lines 2207..2210
                                                                                          salt/states/azurearm_network.py on lines 2402..2405
                                                                                          salt/states/azurearm_resource.py on lines 160..163
                                                                                          salt/states/azurearm_resource.py on lines 487..490
                                                                                          salt/states/azurearm_resource.py on lines 702..705

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 45.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                              if 'error' not in snet:
                                                                                                  ret['result'] = True
                                                                                                  ret['comment'] = 'Subnet {0} has been created.'.format(name)
                                                                                                  return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 35 mins to fix
                                                                                          salt/modules/gpg.py on lines 904..907
                                                                                          salt/states/azurearm_compute.py on lines 257..260
                                                                                          salt/states/azurearm_dns.py on lines 298..301
                                                                                          salt/states/azurearm_dns.py on lines 617..620
                                                                                          salt/states/azurearm_network.py on lines 252..255
                                                                                          salt/states/azurearm_network.py on lines 665..668
                                                                                          salt/states/azurearm_network.py on lines 1046..1049
                                                                                          salt/states/azurearm_network.py on lines 1472..1475
                                                                                          salt/states/azurearm_network.py on lines 1721..1724
                                                                                          salt/states/azurearm_network.py on lines 2041..2044
                                                                                          salt/states/azurearm_network.py on lines 2245..2248
                                                                                          salt/states/azurearm_network.py on lines 2441..2444
                                                                                          salt/states/azurearm_resource.py on lines 538..541
                                                                                          salt/states/azurearm_resource.py on lines 747..750

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 41.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                              if 'error' not in nsg:
                                                                                                  ret['result'] = True
                                                                                                  ret['comment'] = 'Network security group {0} has been created.'.format(name)
                                                                                                  return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 35 mins to fix
                                                                                          salt/modules/gpg.py on lines 904..907
                                                                                          salt/states/azurearm_compute.py on lines 257..260
                                                                                          salt/states/azurearm_dns.py on lines 298..301
                                                                                          salt/states/azurearm_dns.py on lines 617..620
                                                                                          salt/states/azurearm_network.py on lines 252..255
                                                                                          salt/states/azurearm_network.py on lines 457..460
                                                                                          salt/states/azurearm_network.py on lines 1046..1049
                                                                                          salt/states/azurearm_network.py on lines 1472..1475
                                                                                          salt/states/azurearm_network.py on lines 1721..1724
                                                                                          salt/states/azurearm_network.py on lines 2041..2044
                                                                                          salt/states/azurearm_network.py on lines 2245..2248
                                                                                          salt/states/azurearm_network.py on lines 2441..2444
                                                                                          salt/states/azurearm_resource.py on lines 538..541
                                                                                          salt/states/azurearm_resource.py on lines 747..750

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 41.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                              if 'error' not in vnet:
                                                                                                  ret['result'] = True
                                                                                                  ret['comment'] = 'Virtual network {0} has been created.'.format(name)
                                                                                                  return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 35 mins to fix
                                                                                          salt/modules/gpg.py on lines 904..907
                                                                                          salt/states/azurearm_compute.py on lines 257..260
                                                                                          salt/states/azurearm_dns.py on lines 298..301
                                                                                          salt/states/azurearm_dns.py on lines 617..620
                                                                                          salt/states/azurearm_network.py on lines 457..460
                                                                                          salt/states/azurearm_network.py on lines 665..668
                                                                                          salt/states/azurearm_network.py on lines 1046..1049
                                                                                          salt/states/azurearm_network.py on lines 1472..1475
                                                                                          salt/states/azurearm_network.py on lines 1721..1724
                                                                                          salt/states/azurearm_network.py on lines 2041..2044
                                                                                          salt/states/azurearm_network.py on lines 2245..2248
                                                                                          salt/states/azurearm_network.py on lines 2441..2444
                                                                                          salt/states/azurearm_resource.py on lines 538..541
                                                                                          salt/states/azurearm_resource.py on lines 747..750

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 41.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                              if 'error' not in load_bal:
                                                                                                  ret['result'] = True
                                                                                                  ret['comment'] = 'Load balancer {0} has been created.'.format(name)
                                                                                                  return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 35 mins to fix
                                                                                          salt/modules/gpg.py on lines 904..907
                                                                                          salt/states/azurearm_compute.py on lines 257..260
                                                                                          salt/states/azurearm_dns.py on lines 298..301
                                                                                          salt/states/azurearm_dns.py on lines 617..620
                                                                                          salt/states/azurearm_network.py on lines 252..255
                                                                                          salt/states/azurearm_network.py on lines 457..460
                                                                                          salt/states/azurearm_network.py on lines 665..668
                                                                                          salt/states/azurearm_network.py on lines 1046..1049
                                                                                          salt/states/azurearm_network.py on lines 1721..1724
                                                                                          salt/states/azurearm_network.py on lines 2041..2044
                                                                                          salt/states/azurearm_network.py on lines 2245..2248
                                                                                          salt/states/azurearm_network.py on lines 2441..2444
                                                                                          salt/states/azurearm_resource.py on lines 538..541
                                                                                          salt/states/azurearm_resource.py on lines 747..750

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 41.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                              if 'error' not in route:
                                                                                                  ret['result'] = True
                                                                                                  ret['comment'] = 'Route {0} has been created.'.format(name)
                                                                                                  return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 35 mins to fix
                                                                                          salt/modules/gpg.py on lines 904..907
                                                                                          salt/states/azurearm_compute.py on lines 257..260
                                                                                          salt/states/azurearm_dns.py on lines 298..301
                                                                                          salt/states/azurearm_dns.py on lines 617..620
                                                                                          salt/states/azurearm_network.py on lines 252..255
                                                                                          salt/states/azurearm_network.py on lines 457..460
                                                                                          salt/states/azurearm_network.py on lines 665..668
                                                                                          salt/states/azurearm_network.py on lines 1046..1049
                                                                                          salt/states/azurearm_network.py on lines 1472..1475
                                                                                          salt/states/azurearm_network.py on lines 1721..1724
                                                                                          salt/states/azurearm_network.py on lines 2041..2044
                                                                                          salt/states/azurearm_network.py on lines 2245..2248
                                                                                          salt/states/azurearm_resource.py on lines 538..541
                                                                                          salt/states/azurearm_resource.py on lines 747..750

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 41.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                              if 'error' not in rule:
                                                                                                  ret['result'] = True
                                                                                                  ret['comment'] = 'Security rule {0} has been created.'.format(name)
                                                                                                  return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 35 mins to fix
                                                                                          salt/modules/gpg.py on lines 904..907
                                                                                          salt/states/azurearm_compute.py on lines 257..260
                                                                                          salt/states/azurearm_dns.py on lines 298..301
                                                                                          salt/states/azurearm_dns.py on lines 617..620
                                                                                          salt/states/azurearm_network.py on lines 252..255
                                                                                          salt/states/azurearm_network.py on lines 457..460
                                                                                          salt/states/azurearm_network.py on lines 665..668
                                                                                          salt/states/azurearm_network.py on lines 1472..1475
                                                                                          salt/states/azurearm_network.py on lines 1721..1724
                                                                                          salt/states/azurearm_network.py on lines 2041..2044
                                                                                          salt/states/azurearm_network.py on lines 2245..2248
                                                                                          salt/states/azurearm_network.py on lines 2441..2444
                                                                                          salt/states/azurearm_resource.py on lines 538..541
                                                                                          salt/states/azurearm_resource.py on lines 747..750

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 41.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                              if 'error' not in pub_ip:
                                                                                                  ret['result'] = True
                                                                                                  ret['comment'] = 'Public IP address {0} has been created.'.format(name)
                                                                                                  return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 35 mins to fix
                                                                                          salt/modules/gpg.py on lines 904..907
                                                                                          salt/states/azurearm_compute.py on lines 257..260
                                                                                          salt/states/azurearm_dns.py on lines 298..301
                                                                                          salt/states/azurearm_dns.py on lines 617..620
                                                                                          salt/states/azurearm_network.py on lines 252..255
                                                                                          salt/states/azurearm_network.py on lines 457..460
                                                                                          salt/states/azurearm_network.py on lines 665..668
                                                                                          salt/states/azurearm_network.py on lines 1046..1049
                                                                                          salt/states/azurearm_network.py on lines 1472..1475
                                                                                          salt/states/azurearm_network.py on lines 2041..2044
                                                                                          salt/states/azurearm_network.py on lines 2245..2248
                                                                                          salt/states/azurearm_network.py on lines 2441..2444
                                                                                          salt/states/azurearm_resource.py on lines 538..541
                                                                                          salt/states/azurearm_resource.py on lines 747..750

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 41.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                              if 'error' not in iface:
                                                                                                  ret['result'] = True
                                                                                                  ret['comment'] = 'Network interface {0} has been created.'.format(name)
                                                                                                  return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 35 mins to fix
                                                                                          salt/modules/gpg.py on lines 904..907
                                                                                          salt/states/azurearm_compute.py on lines 257..260
                                                                                          salt/states/azurearm_dns.py on lines 298..301
                                                                                          salt/states/azurearm_dns.py on lines 617..620
                                                                                          salt/states/azurearm_network.py on lines 252..255
                                                                                          salt/states/azurearm_network.py on lines 457..460
                                                                                          salt/states/azurearm_network.py on lines 665..668
                                                                                          salt/states/azurearm_network.py on lines 1046..1049
                                                                                          salt/states/azurearm_network.py on lines 1472..1475
                                                                                          salt/states/azurearm_network.py on lines 1721..1724
                                                                                          salt/states/azurearm_network.py on lines 2245..2248
                                                                                          salt/states/azurearm_network.py on lines 2441..2444
                                                                                          salt/states/azurearm_resource.py on lines 538..541
                                                                                          salt/states/azurearm_resource.py on lines 747..750

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 41.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 15 locations. Consider refactoring.
                                                                                          Open

                                                                                              if 'error' not in rt_tbl:
                                                                                                  ret['result'] = True
                                                                                                  ret['comment'] = 'Route table {0} has been created.'.format(name)
                                                                                                  return ret
                                                                                          Severity: Major
                                                                                          Found in salt/states/azurearm_network.py and 14 other locations - About 35 mins to fix
                                                                                          salt/modules/gpg.py on lines 904..907
                                                                                          salt/states/azurearm_compute.py on lines 257..260
                                                                                          salt/states/azurearm_dns.py on lines 298..301
                                                                                          salt/states/azurearm_dns.py on lines 617..620
                                                                                          salt/states/azurearm_network.py on lines 252..255
                                                                                          salt/states/azurearm_network.py on lines 457..460
                                                                                          salt/states/azurearm_network.py on lines 665..668
                                                                                          salt/states/azurearm_network.py on lines 1046..1049
                                                                                          salt/states/azurearm_network.py on lines 1472..1475
                                                                                          salt/states/azurearm_network.py on lines 1721..1724
                                                                                          salt/states/azurearm_network.py on lines 2041..2044
                                                                                          salt/states/azurearm_network.py on lines 2441..2444
                                                                                          salt/states/azurearm_resource.py on lines 538..541
                                                                                          salt/states/azurearm_resource.py on lines 747..750

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 41.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                          Open

                                                                                              pub_ip = __salt__['azurearm_network.public_ip_address_create_or_update'](
                                                                                          Severity: Minor
                                                                                          Found in salt/states/azurearm_network.py and 2 other locations - About 30 mins to fix
                                                                                          salt/states/azurearm_resource.py on lines 526..526
                                                                                          salt/states/kubernetes.py on lines 324..324

                                                                                          Duplicated Code

                                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                          Tuning

                                                                                          This issue has a mass of 40.

                                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                          Refactorings

                                                                                          Further Reading

                                                                                          There are no issues that match your filters.

                                                                                          Category
                                                                                          Status