saltstack/salt

View on GitHub

Showing 7,542 of 17,590 total issues

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/ebuildpkg.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/solarisipspkg.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/mac_brew_pkg.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(
Severity: Major
Found in salt/modules/aixpkg.py and 11 other locations - About 2 hrs to fix
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/solarispkg.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/apkpkg.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/openbsdpkg.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/opkg.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/mac_portspkg.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/pacmanpkg.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pkgin.py on lines 281..287
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/pkgutil.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgin.py on lines 281..287
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

Identical blocks of code found in 12 locations. Consider refactoring.
Open

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
Severity: Major
Found in salt/modules/pkgin.py and 11 other locations - About 2 hrs to fix
salt/modules/aixpkg.py on lines 107..114
salt/modules/apkpkg.py on lines 139..145
salt/modules/ebuildpkg.py on lines 424..430
salt/modules/mac_brew_pkg.py on lines 117..123
salt/modules/mac_portspkg.py on lines 105..111
salt/modules/openbsdpkg.py on lines 75..81
salt/modules/opkg.py on lines 990..996
salt/modules/pacmanpkg.py on lines 211..217
salt/modules/pkgutil.py on lines 149..155
salt/modules/solarisipspkg.py on lines 268..274
salt/modules/solarispkg.py on lines 102..108

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

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

    __utils__['cloud.fire_event'](
        'event',
        'created instance',
        'salt/cloud/{0}/created'.format(vm_['name']),
        args=__utils__['cloud.filter_event']('created', event_data, list(event_data)),
Severity: Major
Found in salt/cloud/clouds/openstack.py and 9 other locations - About 2 hrs to fix
salt/cloud/clouds/aliyun.py on lines 659..665
salt/cloud/clouds/digitalocean.py on lines 448..454
salt/cloud/clouds/dimensiondata.py on lines 256..262
salt/cloud/clouds/ec2.py on lines 2860..2866
salt/cloud/clouds/msazure.py on lines 541..547
salt/cloud/clouds/nova.py on lines 1068..1074
salt/cloud/clouds/virtualbox.py on lines 192..198
salt/cloud/clouds/virtualbox.py on lines 218..224
salt/cloud/clouds/vmware.py on lines 2988..2994

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

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

        __utils__['cloud.fire_event'](
            'event',
            'requesting instance',
            'salt/cloud/{0}/requesting'.format(vm_['name']),
            args=__utils__['cloud.filter_event']('requesting', event_kwargs, list(event_kwargs)),
Severity: Major
Found in salt/cloud/clouds/vmware.py and 9 other locations - About 2 hrs to fix
salt/cloud/clouds/aliyun.py on lines 659..665
salt/cloud/clouds/digitalocean.py on lines 448..454
salt/cloud/clouds/dimensiondata.py on lines 256..262
salt/cloud/clouds/ec2.py on lines 2860..2866
salt/cloud/clouds/msazure.py on lines 541..547
salt/cloud/clouds/nova.py on lines 1068..1074
salt/cloud/clouds/openstack.py on lines 767..773
salt/cloud/clouds/virtualbox.py on lines 192..198
salt/cloud/clouds/virtualbox.py on lines 218..224

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

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

    __utils__['cloud.fire_event'](
        'event',
        'requesting instance',
        'salt/cloud/{0}/requesting'.format(vm_info['name']),
        args=__utils__['cloud.filter_event']('requesting', request_kwargs, list(request_kwargs)),
Severity: Major
Found in salt/cloud/clouds/virtualbox.py and 9 other locations - About 2 hrs to fix
salt/cloud/clouds/aliyun.py on lines 659..665
salt/cloud/clouds/digitalocean.py on lines 448..454
salt/cloud/clouds/dimensiondata.py on lines 256..262
salt/cloud/clouds/ec2.py on lines 2860..2866
salt/cloud/clouds/msazure.py on lines 541..547
salt/cloud/clouds/nova.py on lines 1068..1074
salt/cloud/clouds/openstack.py on lines 767..773
salt/cloud/clouds/virtualbox.py on lines 218..224
salt/cloud/clouds/vmware.py on lines 2988..2994

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

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

    __utils__['cloud.fire_event'](
        'event',
        'created machine',
        'salt/cloud/{0}/created'.format(vm_info['name']),
        args=__utils__['cloud.filter_event']('created', vm_result, list(vm_result)),
Severity: Major
Found in salt/cloud/clouds/virtualbox.py and 9 other locations - About 2 hrs to fix
salt/cloud/clouds/aliyun.py on lines 659..665
salt/cloud/clouds/digitalocean.py on lines 448..454
salt/cloud/clouds/dimensiondata.py on lines 256..262
salt/cloud/clouds/ec2.py on lines 2860..2866
salt/cloud/clouds/msazure.py on lines 541..547
salt/cloud/clouds/nova.py on lines 1068..1074
salt/cloud/clouds/openstack.py on lines 767..773
salt/cloud/clouds/virtualbox.py on lines 192..198
salt/cloud/clouds/vmware.py on lines 2988..2994

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

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

    __utils__['cloud.fire_event'](
        'event',
        'requesting instance',
        'salt/cloud/{0}/requesting'.format(vm_['name']),
        args=__utils__['cloud.filter_event']('requesting', kwargs, list(kwargs)),
Severity: Major
Found in salt/cloud/clouds/digitalocean.py and 9 other locations - About 2 hrs to fix
salt/cloud/clouds/aliyun.py on lines 659..665
salt/cloud/clouds/dimensiondata.py on lines 256..262
salt/cloud/clouds/ec2.py on lines 2860..2866
salt/cloud/clouds/msazure.py on lines 541..547
salt/cloud/clouds/nova.py on lines 1068..1074
salt/cloud/clouds/openstack.py on lines 767..773
salt/cloud/clouds/virtualbox.py on lines 192..198
salt/cloud/clouds/virtualbox.py on lines 218..224
salt/cloud/clouds/vmware.py on lines 2988..2994

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

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

    __utils__['cloud.fire_event'](
        'event',
        'requesting instance',
        'salt/cloud/{0}/requesting'.format(vm_['name']),
        args=__utils__['cloud.filter_event']('requesting', kwargs, list(kwargs)),
Severity: Major
Found in salt/cloud/clouds/aliyun.py and 9 other locations - About 2 hrs to fix
salt/cloud/clouds/digitalocean.py on lines 448..454
salt/cloud/clouds/dimensiondata.py on lines 256..262
salt/cloud/clouds/ec2.py on lines 2860..2866
salt/cloud/clouds/msazure.py on lines 541..547
salt/cloud/clouds/nova.py on lines 1068..1074
salt/cloud/clouds/openstack.py on lines 767..773
salt/cloud/clouds/virtualbox.py on lines 192..198
salt/cloud/clouds/virtualbox.py on lines 218..224
salt/cloud/clouds/vmware.py on lines 2988..2994

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

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

    __utils__['cloud.fire_event'](
        'event',
        'requesting instance',
        'salt/cloud/{0}/requesting'.format(vm_['name']),
        args=__utils__['cloud.filter_event']('requesting', event_data, list(event_data)),
Severity: Major
Found in salt/cloud/clouds/dimensiondata.py and 9 other locations - About 2 hrs to fix
salt/cloud/clouds/aliyun.py on lines 659..665
salt/cloud/clouds/digitalocean.py on lines 448..454
salt/cloud/clouds/ec2.py on lines 2860..2866
salt/cloud/clouds/msazure.py on lines 541..547
salt/cloud/clouds/nova.py on lines 1068..1074
salt/cloud/clouds/openstack.py on lines 767..773
salt/cloud/clouds/virtualbox.py on lines 192..198
salt/cloud/clouds/virtualbox.py on lines 218..224
salt/cloud/clouds/vmware.py on lines 2988..2994

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

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

    __utils__['cloud.fire_event'](
        'event',
        'requesting instance',
        'salt/cloud/{0}/requesting'.format(vm_['name']),
        args=__utils__['cloud.filter_event']('requesting', event_kwargs, list(event_kwargs)),
Severity: Major
Found in salt/cloud/clouds/msazure.py and 9 other locations - About 2 hrs to fix
salt/cloud/clouds/aliyun.py on lines 659..665
salt/cloud/clouds/digitalocean.py on lines 448..454
salt/cloud/clouds/dimensiondata.py on lines 256..262
salt/cloud/clouds/ec2.py on lines 2860..2866
salt/cloud/clouds/nova.py on lines 1068..1074
salt/cloud/clouds/openstack.py on lines 767..773
salt/cloud/clouds/virtualbox.py on lines 192..198
salt/cloud/clouds/virtualbox.py on lines 218..224
salt/cloud/clouds/vmware.py on lines 2988..2994

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

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

Severity
Category
Status
Source
Language