saltstack/salt

View on GitHub
salt/modules/azurearm_network.py

Summary

Maintainability
F
2 mos
Test Coverage

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

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

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

    Function load_balancer_create_or_update has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
    Open

    def load_balancer_create_or_update(name, resource_group, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
        Create or update a load balancer within a specified resource group.
    Severity: Minor
    Found in salt/modules/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_create_or_update has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
    Open

    def network_interface_create_or_update(name, ip_configurations, subnet, virtual_network,
                                           resource_group, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
    
    Severity: Minor
    Found in salt/modules/azurearm_network.py - About 7 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 load_balancer_create_or_update. (29)
    Open

    def load_balancer_create_or_update(name, resource_group, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
        Create or update a load balancer within a specified resource group.
    Severity: Minor
    Found in salt/modules/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_create_or_update has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    def subnet_create_or_update(name, address_prefix, virtual_network, resource_group, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
        Create or update a subnet.
    Severity: Minor
    Found in salt/modules/azurearm_network.py - About 55 mins 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_filter_rule_create_or_update has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    def route_filter_rule_create_or_update(name, access, communities, route_filter, resource_group, **kwargs):
        '''
        .. versionadded:: 2019.2.0
    
        Create or update a rule within a specified route filter.
    Severity: Minor
    Found in salt/modules/azurearm_network.py - About 55 mins 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

    Avoid deeply nested control flow statements.
    Open

                        if isinstance(ipconfig.get('load_balancer_inbound_nat_rules'), list):
                            # TODO: Add ID lookup for referenced object names
                            pass
                        if ipconfig.get('public_ip_address'):
    Severity: Major
    Found in salt/modules/azurearm_network.py - About 45 mins to fix

      Function security_rule_create_or_update has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      def security_rule_create_or_update(name, access, direction, priority, protocol, security_group, resource_group,
                                         source_address_prefix=None, destination_address_prefix=None, source_port_range=None,
                                         destination_port_range=None, source_address_prefixes=None,
                                         destination_address_prefixes=None, source_port_ranges=None,
                                         destination_port_ranges=None, **kwargs):
      Severity: Minor
      Found in salt/modules/azurearm_network.py - About 45 mins 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

      Avoid deeply nested control flow statements.
      Open

                          if ipconfig.get('public_ip_address'):
                              pub_ip = public_ip_address_get(
                                  name=ipconfig['public_ip_address'],
                                  resource_group=resource_group,
                                  **kwargs
      Severity: Major
      Found in salt/modules/azurearm_network.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            for vnet in vnets:
                                subnets = subnets_list(
                                    virtual_network=vnet,
                                    resource_group=resource_group,
                                    **kwargs
        Severity: Major
        Found in salt/modules/azurearm_network.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if isinstance(ipconfig.get('load_balancer_backend_address_pools'), list):
                                  # TODO: Add ID lookup for referenced object names
                                  pass
                              if isinstance(ipconfig.get('load_balancer_inbound_nat_rules'), list):
          Severity: Major
          Found in salt/modules/azurearm_network.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if isinstance(ipconfig.get('application_gateway_backend_address_pools'), list):
                                    # TODO: Add ID lookup for referenced object names
                                    pass
                                if isinstance(ipconfig.get('load_balancer_backend_address_pools'), list):
            Severity: Major
            Found in salt/modules/azurearm_network.py - About 45 mins to fix

              Function default_security_rule_get has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def default_security_rule_get(name, security_group, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a default security rule within a security group.
              Severity: Minor
              Found in salt/modules/azurearm_network.py - About 35 mins 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_create_or_update has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def virtual_network_create_or_update(name,
                                                   address_prefixes,
                                                   resource_group,
                                                   **kwargs):
                  '''
              Severity: Minor
              Found in salt/modules/azurearm_network.py - About 35 mins 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_create_or_update has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def public_ip_address_create_or_update(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Create or update a public IP address within a specified resource group.
              Severity: Minor
              Found in salt/modules/azurearm_network.py - About 25 mins 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_create_or_update has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def network_security_group_create_or_update(name, resource_group, **kwargs):  # pylint: disable=invalid-name
                  '''
                  .. versionadded:: 2019.2.0
              
                  Create or update a network security group.
              Severity: Minor
              Found in salt/modules/azurearm_network.py - About 25 mins 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_filter_create_or_update has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def route_filter_create_or_update(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Create or update a route filter within a specified resource group.
              Severity: Minor
              Found in salt/modules/azurearm_network.py - About 25 mins 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_table_create_or_update has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def route_table_create_or_update(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Create or update a route table within a specified resource group.
              Severity: Minor
              Found in salt/modules/azurearm_network.py - About 25 mins 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

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

              def route_table_create_or_update(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Create or update a route table within a specified resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 2 days to fix
              salt/modules/azurearm_network.py on lines 483..536
              salt/modules/azurearm_network.py on lines 1900..1953
              salt/modules/azurearm_network.py on lines 2275..2328

              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 258.

              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

              def network_security_group_create_or_update(name, resource_group, **kwargs):  # pylint: disable=invalid-name
                  '''
                  .. versionadded:: 2019.2.0
              
                  Create or update a network security group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 2 days to fix
              salt/modules/azurearm_network.py on lines 1900..1953
              salt/modules/azurearm_network.py on lines 2275..2328
              salt/modules/azurearm_network.py on lines 2634..2687

              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 258.

              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

              def public_ip_address_create_or_update(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Create or update a public IP address within a specified resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 2 days to fix
              salt/modules/azurearm_network.py on lines 483..536
              salt/modules/azurearm_network.py on lines 2275..2328
              salt/modules/azurearm_network.py on lines 2634..2687

              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 258.

              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

              def route_filter_create_or_update(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Create or update a route filter within a specified resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 2 days to fix
              salt/modules/azurearm_network.py on lines 483..536
              salt/modules/azurearm_network.py on lines 1900..1953
              salt/modules/azurearm_network.py on lines 2634..2687

              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 258.

              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 6 locations. Consider refactoring.
              Open

              def route_filter_rules_list(route_filter, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all routes within a route filter.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 5 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 248..284
              salt/modules/azurearm_compute.py on lines 540..574
              salt/modules/azurearm_network.py on lines 665..699
              salt/modules/azurearm_network.py on lines 1751..1785
              salt/modules/azurearm_network.py on lines 2528..2562

              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 128.

              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 6 locations. Consider refactoring.
              Open

              def subnets_list(virtual_network, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all subnets within a virtual network.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 5 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 248..284
              salt/modules/azurearm_compute.py on lines 540..574
              salt/modules/azurearm_network.py on lines 1751..1785
              salt/modules/azurearm_network.py on lines 2169..2203
              salt/modules/azurearm_network.py on lines 2528..2562

              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 128.

              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 6 locations. Consider refactoring.
              Open

              def list_virtual_machine_scale_set_network_interfaces(scale_set, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get information about all network interfaces within a scale set.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 5 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 248..284
              salt/modules/azurearm_compute.py on lines 540..574
              salt/modules/azurearm_network.py on lines 665..699
              salt/modules/azurearm_network.py on lines 2169..2203
              salt/modules/azurearm_network.py on lines 2528..2562

              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 128.

              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 6 locations. Consider refactoring.
              Open

              def routes_list(route_table, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all routes within a route table.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 5 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 248..284
              salt/modules/azurearm_compute.py on lines 540..574
              salt/modules/azurearm_network.py on lines 665..699
              salt/modules/azurearm_network.py on lines 1751..1785
              salt/modules/azurearm_network.py on lines 2169..2203

              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 128.

              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

              def network_interface_list_effective_network_security_groups(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get all network security groups applied to a specific network interface.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 1 other location - About 7 hrs to fix
              salt/modules/azurearm_network.py on lines 1635..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 126.

              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

              def network_interface_get_effective_route_table(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get all route tables for a specific network interface.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 1 other location - About 7 hrs to fix
              salt/modules/azurearm_network.py on lines 1671..1703

              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 126.

              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

              def list_virtual_machine_scale_set_vm_network_interfaces(scale_set,
                                                                       vm_index,
                                                                       resource_group,
                                                                       **kwargs):
                  '''
              Severity: Major
              Found in salt/modules/azurearm_network.py and 1 other location - About 7 hrs to fix
              salt/modules/azurearm_resource.py on lines 260..298

              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 125.

              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 10 locations. Consider refactoring.
              Open

              def virtual_networks_list(resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all virtual networks within a resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 9 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 214..245
              salt/modules/azurearm_compute.py on lines 479..509
              salt/modules/azurearm_network.py on lines 604..634
              salt/modules/azurearm_network.py on lines 1086..1117
              salt/modules/azurearm_network.py on lines 1600..1631
              salt/modules/azurearm_network.py on lines 1983..2014
              salt/modules/azurearm_network.py on lines 2331..2362
              salt/modules/azurearm_network.py on lines 2690..2721
              salt/modules/azurearm_resource.py on lines 675..703

              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 124.

              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 10 locations. Consider refactoring.
              Open

              def network_interfaces_list(resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all network interfaces within a resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 9 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 214..245
              salt/modules/azurearm_compute.py on lines 479..509
              salt/modules/azurearm_network.py on lines 604..634
              salt/modules/azurearm_network.py on lines 880..911
              salt/modules/azurearm_network.py on lines 1086..1117
              salt/modules/azurearm_network.py on lines 1983..2014
              salt/modules/azurearm_network.py on lines 2331..2362
              salt/modules/azurearm_network.py on lines 2690..2721
              salt/modules/azurearm_resource.py on lines 675..703

              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 124.

              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 10 locations. Consider refactoring.
              Open

              def public_ip_addresses_list(resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all public IP addresses within a resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 9 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 214..245
              salt/modules/azurearm_compute.py on lines 479..509
              salt/modules/azurearm_network.py on lines 604..634
              salt/modules/azurearm_network.py on lines 880..911
              salt/modules/azurearm_network.py on lines 1086..1117
              salt/modules/azurearm_network.py on lines 1600..1631
              salt/modules/azurearm_network.py on lines 2331..2362
              salt/modules/azurearm_network.py on lines 2690..2721
              salt/modules/azurearm_resource.py on lines 675..703

              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 124.

              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 10 locations. Consider refactoring.
              Open

              def route_filters_list(resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all route filters within a resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 9 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 214..245
              salt/modules/azurearm_compute.py on lines 479..509
              salt/modules/azurearm_network.py on lines 604..634
              salt/modules/azurearm_network.py on lines 880..911
              salt/modules/azurearm_network.py on lines 1086..1117
              salt/modules/azurearm_network.py on lines 1600..1631
              salt/modules/azurearm_network.py on lines 1983..2014
              salt/modules/azurearm_network.py on lines 2690..2721
              salt/modules/azurearm_resource.py on lines 675..703

              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 124.

              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 10 locations. Consider refactoring.
              Open

              def network_security_groups_list(resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all network security groups within a resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 9 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 214..245
              salt/modules/azurearm_compute.py on lines 479..509
              salt/modules/azurearm_network.py on lines 880..911
              salt/modules/azurearm_network.py on lines 1086..1117
              salt/modules/azurearm_network.py on lines 1600..1631
              salt/modules/azurearm_network.py on lines 1983..2014
              salt/modules/azurearm_network.py on lines 2331..2362
              salt/modules/azurearm_network.py on lines 2690..2721
              salt/modules/azurearm_resource.py on lines 675..703

              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 124.

              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 10 locations. Consider refactoring.
              Open

              def route_tables_list(resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all route tables within a resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 9 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 214..245
              salt/modules/azurearm_compute.py on lines 479..509
              salt/modules/azurearm_network.py on lines 604..634
              salt/modules/azurearm_network.py on lines 880..911
              salt/modules/azurearm_network.py on lines 1086..1117
              salt/modules/azurearm_network.py on lines 1600..1631
              salt/modules/azurearm_network.py on lines 1983..2014
              salt/modules/azurearm_network.py on lines 2331..2362
              salt/modules/azurearm_resource.py on lines 675..703

              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 124.

              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 10 locations. Consider refactoring.
              Open

              def load_balancers_list(resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all load balancers within a resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 9 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 214..245
              salt/modules/azurearm_compute.py on lines 479..509
              salt/modules/azurearm_network.py on lines 604..634
              salt/modules/azurearm_network.py on lines 880..911
              salt/modules/azurearm_network.py on lines 1600..1631
              salt/modules/azurearm_network.py on lines 1983..2014
              salt/modules/azurearm_network.py on lines 2331..2362
              salt/modules/azurearm_network.py on lines 2690..2721
              salt/modules/azurearm_resource.py on lines 675..703

              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 124.

              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 isinstance(kwargs.get('inbound_nat_rules'), list):
                      for idx in six_range(0, len(kwargs['inbound_nat_rules'])):
                          # Link to sub-objects which might be created at the same time as the load balancer
                          if 'frontend_ip_configuration' in kwargs['inbound_nat_rules'][idx]:
                              kwargs['inbound_nat_rules'][idx]['frontend_ip_configuration'] = {
              Severity: Major
              Found in salt/modules/azurearm_network.py and 1 other location - About 7 hrs to fix
              salt/modules/azurearm_network.py on lines 1264..1274

              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 119.

              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 isinstance(kwargs.get('inbound_nat_pools'), list):
                      for idx in six_range(0, len(kwargs['inbound_nat_pools'])):
                          # Link to sub-objects which might be created at the same time as the load balancer
                          if 'frontend_ip_configuration' in kwargs['inbound_nat_pools'][idx]:
                              kwargs['inbound_nat_pools'][idx]['frontend_ip_configuration'] = {
              Severity: Major
              Found in salt/modules/azurearm_network.py and 1 other location - About 7 hrs to fix
              salt/modules/azurearm_network.py on lines 1250..1260

              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 119.

              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 12 locations. Consider refactoring.
              Open

              def network_interfaces_list_all(**kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all network interfaces within a subscription.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 11 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 512..537
              salt/modules/azurearm_network.py on lines 637..662
              salt/modules/azurearm_network.py on lines 853..877
              salt/modules/azurearm_network.py on lines 1059..1083
              salt/modules/azurearm_network.py on lines 1956..1980
              salt/modules/azurearm_network.py on lines 2365..2389
              salt/modules/azurearm_network.py on lines 2724..2748
              salt/modules/azurearm_resource.py on lines 81..105
              salt/modules/azurearm_resource.py on lines 781..805
              salt/modules/azurearm_resource.py on lines 808..832
              salt/modules/azurearm_resource.py on lines 1012..1036

              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 118.

              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 12 locations. Consider refactoring.
              Open

              def route_filters_list_all(**kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all route filters within a subscription.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 11 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 512..537
              salt/modules/azurearm_network.py on lines 637..662
              salt/modules/azurearm_network.py on lines 853..877
              salt/modules/azurearm_network.py on lines 1059..1083
              salt/modules/azurearm_network.py on lines 1573..1597
              salt/modules/azurearm_network.py on lines 1956..1980
              salt/modules/azurearm_network.py on lines 2724..2748
              salt/modules/azurearm_resource.py on lines 81..105
              salt/modules/azurearm_resource.py on lines 781..805
              salt/modules/azurearm_resource.py on lines 808..832
              salt/modules/azurearm_resource.py on lines 1012..1036

              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 118.

              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 12 locations. Consider refactoring.
              Open

              def load_balancers_list_all(**kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all load balancers within a subscription.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 11 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 512..537
              salt/modules/azurearm_network.py on lines 637..662
              salt/modules/azurearm_network.py on lines 853..877
              salt/modules/azurearm_network.py on lines 1573..1597
              salt/modules/azurearm_network.py on lines 1956..1980
              salt/modules/azurearm_network.py on lines 2365..2389
              salt/modules/azurearm_network.py on lines 2724..2748
              salt/modules/azurearm_resource.py on lines 81..105
              salt/modules/azurearm_resource.py on lines 781..805
              salt/modules/azurearm_resource.py on lines 808..832
              salt/modules/azurearm_resource.py on lines 1012..1036

              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 118.

              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 12 locations. Consider refactoring.
              Open

              def virtual_networks_list_all(**kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all virtual networks within a subscription.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 11 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 512..537
              salt/modules/azurearm_network.py on lines 637..662
              salt/modules/azurearm_network.py on lines 1059..1083
              salt/modules/azurearm_network.py on lines 1573..1597
              salt/modules/azurearm_network.py on lines 1956..1980
              salt/modules/azurearm_network.py on lines 2365..2389
              salt/modules/azurearm_network.py on lines 2724..2748
              salt/modules/azurearm_resource.py on lines 81..105
              salt/modules/azurearm_resource.py on lines 781..805
              salt/modules/azurearm_resource.py on lines 808..832
              salt/modules/azurearm_resource.py on lines 1012..1036

              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 118.

              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 12 locations. Consider refactoring.
              Open

              def network_security_groups_list_all(**kwargs):  # pylint: disable=invalid-name
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all network security groups within a subscription.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 11 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 512..537
              salt/modules/azurearm_network.py on lines 853..877
              salt/modules/azurearm_network.py on lines 1059..1083
              salt/modules/azurearm_network.py on lines 1573..1597
              salt/modules/azurearm_network.py on lines 1956..1980
              salt/modules/azurearm_network.py on lines 2365..2389
              salt/modules/azurearm_network.py on lines 2724..2748
              salt/modules/azurearm_resource.py on lines 81..105
              salt/modules/azurearm_resource.py on lines 781..805
              salt/modules/azurearm_resource.py on lines 808..832
              salt/modules/azurearm_resource.py on lines 1012..1036

              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 118.

              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 12 locations. Consider refactoring.
              Open

              def public_ip_addresses_list_all(**kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all public IP addresses within a subscription.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 11 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 512..537
              salt/modules/azurearm_network.py on lines 637..662
              salt/modules/azurearm_network.py on lines 853..877
              salt/modules/azurearm_network.py on lines 1059..1083
              salt/modules/azurearm_network.py on lines 1573..1597
              salt/modules/azurearm_network.py on lines 2365..2389
              salt/modules/azurearm_network.py on lines 2724..2748
              salt/modules/azurearm_resource.py on lines 81..105
              salt/modules/azurearm_resource.py on lines 781..805
              salt/modules/azurearm_resource.py on lines 808..832
              salt/modules/azurearm_resource.py on lines 1012..1036

              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 118.

              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 12 locations. Consider refactoring.
              Open

              def route_tables_list_all(**kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  List all route tables within a subscription.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 11 other locations - About 7 hrs to fix
              salt/modules/azurearm_compute.py on lines 512..537
              salt/modules/azurearm_network.py on lines 637..662
              salt/modules/azurearm_network.py on lines 853..877
              salt/modules/azurearm_network.py on lines 1059..1083
              salt/modules/azurearm_network.py on lines 1573..1597
              salt/modules/azurearm_network.py on lines 1956..1980
              salt/modules/azurearm_network.py on lines 2365..2389
              salt/modules/azurearm_resource.py on lines 81..105
              salt/modules/azurearm_resource.py on lines 781..805
              salt/modules/azurearm_resource.py on lines 808..832
              salt/modules/azurearm_resource.py on lines 1012..1036

              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 118.

              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

                  try:
                      subnet = netconn.subnets.create_or_update(
                          resource_group_name=resource_group,
                          virtual_network_name=virtual_network,
                          subnet_name=name,
              Severity: Major
              Found in salt/modules/azurearm_network.py and 2 other locations - About 6 hrs to fix
              salt/modules/azurearm_network.py on lines 390..404
              salt/modules/azurearm_network.py on lines 2509..2523

              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 116.

              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

                  try:
                      secrule = netconn.security_rules.create_or_update(
                          resource_group_name=resource_group,
                          network_security_group_name=security_group,
                          security_rule_name=name,
              Severity: Major
              Found in salt/modules/azurearm_network.py and 2 other locations - About 6 hrs to fix
              salt/modules/azurearm_network.py on lines 797..811
              salt/modules/azurearm_network.py on lines 2509..2523

              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 116.

              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

                  try:
                      route = netconn.routes.create_or_update(
                          resource_group_name=resource_group,
                          route_table_name=route_table,
                          route_name=name,
              Severity: Major
              Found in salt/modules/azurearm_network.py and 2 other locations - About 6 hrs to fix
              salt/modules/azurearm_network.py on lines 390..404
              salt/modules/azurearm_network.py on lines 797..811

              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 116.

              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

              def public_ip_address_get(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a specific public IP address.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 6 hrs to fix
              salt/modules/azurearm_compute.py on lines 339..373
              salt/modules/azurearm_network.py on lines 2239..2272
              salt/modules/azurearm_network.py on lines 2598..2631

              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 113.

              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

              def route_table_get(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a specific route table.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 6 hrs to fix
              salt/modules/azurearm_compute.py on lines 339..373
              salt/modules/azurearm_network.py on lines 1864..1897
              salt/modules/azurearm_network.py on lines 2239..2272

              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 113.

              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

              def route_filter_get(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a specific route filter.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 6 hrs to fix
              salt/modules/azurearm_compute.py on lines 339..373
              salt/modules/azurearm_network.py on lines 1864..1897
              salt/modules/azurearm_network.py on lines 2598..2631

              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 113.

              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

              def route_filter_rule_get(name, route_filter, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a specific route filter rule.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 1 other location - About 6 hrs to fix
              salt/modules/azurearm_network.py on lines 2428..2462

              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 108.

              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

              def route_get(name, route_table, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a specific route.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 1 other location - About 6 hrs to fix
              salt/modules/azurearm_network.py on lines 2053..2087

              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 108.

              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

              def check_ip_address_availability(ip_address, virtual_network, resource_group,
                                                **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
              
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 447..480
              salt/modules/azurearm_network.py on lines 702..736
              salt/modules/azurearm_resource.py on lines 224..257

              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 103.

              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

              def subnet_get(name, virtual_network, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a specific subnet.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 118..152
              salt/modules/azurearm_network.py on lines 447..480
              salt/modules/azurearm_resource.py on lines 224..257

              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 103.

              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

              def security_rule_get(security_rule, security_group, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get a security rule within a specified network security group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 118..152
              salt/modules/azurearm_network.py on lines 702..736
              salt/modules/azurearm_resource.py on lines 224..257

              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 103.

              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_get(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a specific virtual network.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 8 other locations - About 5 hrs to fix
              salt/modules/azurearm_compute.py on lines 181..211
              salt/modules/azurearm_dns.py on lines 403..433
              salt/modules/azurearm_network.py on lines 572..601
              salt/modules/azurearm_network.py on lines 1120..1149
              salt/modules/azurearm_network.py on lines 1418..1447
              salt/modules/azurearm_resource.py on lines 473..502
              salt/modules/azurearm_resource.py on lines 643..672
              salt/modules/azurearm_resource.py on lines 946..975

              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 9 locations. Consider refactoring.
              Open

              def network_security_group_get(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a network security group within a resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 8 other locations - About 5 hrs to fix
              salt/modules/azurearm_compute.py on lines 181..211
              salt/modules/azurearm_dns.py on lines 403..433
              salt/modules/azurearm_network.py on lines 1027..1056
              salt/modules/azurearm_network.py on lines 1120..1149
              salt/modules/azurearm_network.py on lines 1418..1447
              salt/modules/azurearm_resource.py on lines 473..502
              salt/modules/azurearm_resource.py on lines 643..672
              salt/modules/azurearm_resource.py on lines 946..975

              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 9 locations. Consider refactoring.
              Open

              def network_interface_get(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a specific network interface.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 8 other locations - About 5 hrs to fix
              salt/modules/azurearm_compute.py on lines 181..211
              salt/modules/azurearm_dns.py on lines 403..433
              salt/modules/azurearm_network.py on lines 572..601
              salt/modules/azurearm_network.py on lines 1027..1056
              salt/modules/azurearm_network.py on lines 1120..1149
              salt/modules/azurearm_resource.py on lines 473..502
              salt/modules/azurearm_resource.py on lines 643..672
              salt/modules/azurearm_resource.py on lines 946..975

              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 9 locations. Consider refactoring.
              Open

              def load_balancer_get(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Get details about a specific load balancer.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 8 other locations - About 5 hrs to fix
              salt/modules/azurearm_compute.py on lines 181..211
              salt/modules/azurearm_dns.py on lines 403..433
              salt/modules/azurearm_network.py on lines 572..601
              salt/modules/azurearm_network.py on lines 1027..1056
              salt/modules/azurearm_network.py on lines 1418..1447
              salt/modules/azurearm_resource.py on lines 473..502
              salt/modules/azurearm_resource.py on lines 643..672
              salt/modules/azurearm_resource.py on lines 946..975

              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

              def route_filter_rule_delete(name, route_filter, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a route filter rule.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 409..444
              salt/modules/azurearm_network.py on lines 816..850
              salt/modules/azurearm_network.py on lines 2392..2425

              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 98.

              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

              def security_rule_delete(security_rule, security_group, resource_group,
                                       **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
              
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 816..850
              salt/modules/azurearm_network.py on lines 2017..2050
              salt/modules/azurearm_network.py on lines 2392..2425

              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 98.

              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

              def route_delete(name, route_table, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a route from a route table.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 409..444
              salt/modules/azurearm_network.py on lines 816..850
              salt/modules/azurearm_network.py on lines 2017..2050

              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 98.

              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

              def subnet_delete(name, virtual_network, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a subnet.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 409..444
              salt/modules/azurearm_network.py on lines 2017..2050
              salt/modules/azurearm_network.py on lines 2392..2425

              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 98.

              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 8 locations. Consider refactoring.
              Open

              def load_balancer_delete(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a load balancer.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 7 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 539..569
              salt/modules/azurearm_network.py on lines 994..1024
              salt/modules/azurearm_network.py on lines 1384..1415
              salt/modules/azurearm_network.py on lines 1831..1861
              salt/modules/azurearm_network.py on lines 2206..2236
              salt/modules/azurearm_network.py on lines 2565..2595
              salt/modules/azurearm_resource.py on lines 301..331

              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 94.

              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 8 locations. Consider refactoring.
              Open

              def public_ip_address_delete(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a public IP address.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 7 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 539..569
              salt/modules/azurearm_network.py on lines 994..1024
              salt/modules/azurearm_network.py on lines 1326..1356
              salt/modules/azurearm_network.py on lines 1384..1415
              salt/modules/azurearm_network.py on lines 2206..2236
              salt/modules/azurearm_network.py on lines 2565..2595
              salt/modules/azurearm_resource.py on lines 301..331

              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 94.

              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 8 locations. Consider refactoring.
              Open

              def virtual_network_delete(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a virtual network.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 7 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 539..569
              salt/modules/azurearm_network.py on lines 1326..1356
              salt/modules/azurearm_network.py on lines 1384..1415
              salt/modules/azurearm_network.py on lines 1831..1861
              salt/modules/azurearm_network.py on lines 2206..2236
              salt/modules/azurearm_network.py on lines 2565..2595
              salt/modules/azurearm_resource.py on lines 301..331

              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 94.

              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 8 locations. Consider refactoring.
              Open

              def network_security_group_delete(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a network security group within a resource group.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 7 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 994..1024
              salt/modules/azurearm_network.py on lines 1326..1356
              salt/modules/azurearm_network.py on lines 1384..1415
              salt/modules/azurearm_network.py on lines 1831..1861
              salt/modules/azurearm_network.py on lines 2206..2236
              salt/modules/azurearm_network.py on lines 2565..2595
              salt/modules/azurearm_resource.py on lines 301..331

              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 94.

              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 8 locations. Consider refactoring.
              Open

              def route_table_delete(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a route table.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 7 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 539..569
              salt/modules/azurearm_network.py on lines 994..1024
              salt/modules/azurearm_network.py on lines 1326..1356
              salt/modules/azurearm_network.py on lines 1384..1415
              salt/modules/azurearm_network.py on lines 1831..1861
              salt/modules/azurearm_network.py on lines 2206..2236
              salt/modules/azurearm_resource.py on lines 301..331

              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 94.

              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 8 locations. Consider refactoring.
              Open

              def route_filter_delete(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a route filter.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 7 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 539..569
              salt/modules/azurearm_network.py on lines 994..1024
              salt/modules/azurearm_network.py on lines 1326..1356
              salt/modules/azurearm_network.py on lines 1384..1415
              salt/modules/azurearm_network.py on lines 1831..1861
              salt/modules/azurearm_network.py on lines 2565..2595
              salt/modules/azurearm_resource.py on lines 301..331

              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 94.

              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 8 locations. Consider refactoring.
              Open

              def network_interface_delete(name, resource_group, **kwargs):
                  '''
                  .. versionadded:: 2019.2.0
              
                  Delete a network interface.
              Severity: Major
              Found in salt/modules/azurearm_network.py and 7 other locations - About 5 hrs to fix
              salt/modules/azurearm_network.py on lines 539..569
              salt/modules/azurearm_network.py on lines 994..1024
              salt/modules/azurearm_network.py on lines 1326..1356
              salt/modules/azurearm_network.py on lines 1831..1861
              salt/modules/azurearm_network.py on lines 2206..2236
              salt/modules/azurearm_network.py on lines 2565..2595
              salt/modules/azurearm_resource.py on lines 301..331

              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 94.

              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 kwargs.get('network_security_group'):
                      nsg = network_security_group_get(
                          name=kwargs['network_security_group'],
                          resource_group=resource_group,
                          **kwargs
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 2 hrs to fix
              salt/modules/azurearm_network.py on lines 776..783
              salt/modules/azurearm_network.py on lines 1494..1501
              salt/modules/azurearm_network.py on lines 1535..1542

              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 67.

              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 kwargs.get('route_table'):
                      rt_table = route_table_get(
                          name=kwargs['route_table'],
                          resource_group=resource_group,
                          **kwargs
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 2 hrs to fix
              salt/modules/azurearm_network.py on lines 766..773
              salt/modules/azurearm_network.py on lines 1494..1501
              salt/modules/azurearm_network.py on lines 1535..1542

              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 67.

              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 kwargs.get('network_security_group'):
                      nsg = network_security_group_get(
                          name=kwargs['network_security_group'],
                          resource_group=resource_group,
                          **kwargs
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 2 hrs to fix
              salt/modules/azurearm_network.py on lines 766..773
              salt/modules/azurearm_network.py on lines 776..783
              salt/modules/azurearm_network.py on lines 1535..1542

              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 67.

              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 ipconfig.get('public_ip_address'):
                                      pub_ip = public_ip_address_get(
                                          name=ipconfig['public_ip_address'],
                                          resource_group=resource_group,
                                          **kwargs
              Severity: Major
              Found in salt/modules/azurearm_network.py and 3 other locations - About 2 hrs to fix
              salt/modules/azurearm_network.py on lines 766..773
              salt/modules/azurearm_network.py on lines 776..783
              salt/modules/azurearm_network.py on lines 1494..1501

              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 67.

              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

                  try:
                      snetmodel = __utils__['azurearm.create_object_model'](
                          'network',
                          'Subnet',
                          address_prefix=address_prefix,
              Severity: Major
              Found in salt/modules/azurearm_network.py and 2 other locations - About 1 hr to fix
              salt/modules/azurearm_network.py on lines 964..974
              salt/modules/azurearm_network.py on lines 2135..2145

              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 56.

              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

                  try:
                      vnetmodel = __utils__['azurearm.create_object_model'](
                          'network',
                          'VirtualNetwork',
                          address_space=address_space,
              Severity: Major
              Found in salt/modules/azurearm_network.py and 2 other locations - About 1 hr to fix
              salt/modules/azurearm_network.py on lines 785..795
              salt/modules/azurearm_network.py on lines 2135..2145

              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 56.

              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

                  try:
                      rule_model = __utils__['azurearm.create_object_model'](
                          'network',
                          'RouteFilterRule',
                          access=access,
              Severity: Major
              Found in salt/modules/azurearm_network.py and 2 other locations - About 1 hr to fix
              salt/modules/azurearm_network.py on lines 785..795
              salt/modules/azurearm_network.py on lines 964..974

              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 56.

              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