saltstack/salt

View on GitHub

Showing 7,542 of 17,590 total issues

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

def alf_services(attrs=None, where=None):
    '''
    Return alf_services information from osquery

    CLI Example:
Severity: Major
Found in salt/modules/osquery.py and 22 other locations - About 1 hr to fix
salt/modules/osquery.py on lines 657..669
salt/modules/osquery.py on lines 672..684
salt/modules/osquery.py on lines 687..699
salt/modules/osquery.py on lines 717..729
salt/modules/osquery.py on lines 732..744
salt/modules/osquery.py on lines 747..759
salt/modules/osquery.py on lines 762..774
salt/modules/osquery.py on lines 777..789
salt/modules/osquery.py on lines 792..804
salt/modules/osquery.py on lines 807..819
salt/modules/osquery.py on lines 822..834
salt/modules/osquery.py on lines 837..849
salt/modules/osquery.py on lines 852..864
salt/modules/osquery.py on lines 867..879
salt/modules/osquery.py on lines 882..894
salt/modules/osquery.py on lines 897..909
salt/modules/osquery.py on lines 912..924
salt/modules/osquery.py on lines 927..939
salt/modules/osquery.py on lines 942..954
salt/modules/osquery.py on lines 957..969
salt/modules/osquery.py on lines 972..984
salt/modules/osquery.py on lines 987..999

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

      this.timeout = setTimeout(function() {
        if (self.hoverState == 'out') self.hide()
      }, self.options.delay.hide)
Severity: Major
Found in doc/_themes/saltstack/static/js/vendor/bootstrap.js and 1 other location - About 1 hr to fix
doc/_themes/saltstack/static/js/vendor/bootstrap.js on lines 1134..1136

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

def homebrew_packages(attrs=None, where=None):
    '''
    Return homebrew_packages information from osquery

    CLI Example:
Severity: Major
Found in salt/modules/osquery.py and 22 other locations - About 1 hr to fix
salt/modules/osquery.py on lines 657..669
salt/modules/osquery.py on lines 672..684
salt/modules/osquery.py on lines 687..699
salt/modules/osquery.py on lines 702..714
salt/modules/osquery.py on lines 717..729
salt/modules/osquery.py on lines 732..744
salt/modules/osquery.py on lines 747..759
salt/modules/osquery.py on lines 762..774
salt/modules/osquery.py on lines 792..804
salt/modules/osquery.py on lines 807..819
salt/modules/osquery.py on lines 822..834
salt/modules/osquery.py on lines 837..849
salt/modules/osquery.py on lines 852..864
salt/modules/osquery.py on lines 867..879
salt/modules/osquery.py on lines 882..894
salt/modules/osquery.py on lines 897..909
salt/modules/osquery.py on lines 912..924
salt/modules/osquery.py on lines 927..939
salt/modules/osquery.py on lines 942..954
salt/modules/osquery.py on lines 957..969
salt/modules/osquery.py on lines 972..984
salt/modules/osquery.py on lines 987..999

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def safari_extensions(attrs=None, where=None):
    '''
    Return safari_extensions information from osquery

    CLI Example:
Severity: Major
Found in salt/modules/osquery.py and 22 other locations - About 1 hr to fix
salt/modules/osquery.py on lines 657..669
salt/modules/osquery.py on lines 672..684
salt/modules/osquery.py on lines 687..699
salt/modules/osquery.py on lines 702..714
salt/modules/osquery.py on lines 717..729
salt/modules/osquery.py on lines 732..744
salt/modules/osquery.py on lines 747..759
salt/modules/osquery.py on lines 762..774
salt/modules/osquery.py on lines 777..789
salt/modules/osquery.py on lines 792..804
salt/modules/osquery.py on lines 807..819
salt/modules/osquery.py on lines 822..834
salt/modules/osquery.py on lines 837..849
salt/modules/osquery.py on lines 852..864
salt/modules/osquery.py on lines 867..879
salt/modules/osquery.py on lines 882..894
salt/modules/osquery.py on lines 897..909
salt/modules/osquery.py on lines 912..924
salt/modules/osquery.py on lines 942..954
salt/modules/osquery.py on lines 957..969
salt/modules/osquery.py on lines 972..984
salt/modules/osquery.py on lines 987..999

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

      this.timeout = setTimeout(function() {
        if (self.hoverState == 'in') self.show()
      }, self.options.delay.show)
Severity: Major
Found in doc/_themes/saltstack/static/js/vendor/bootstrap.js and 1 other location - About 1 hr to fix
doc/_themes/saltstack/static/js/vendor/bootstrap.js on lines 1146..1148

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

def chrome_extensions(attrs=None, where=None):
    '''
    Return chrome_extensions information from osquery

    CLI Example:
Severity: Major
Found in salt/modules/osquery.py and 22 other locations - About 1 hr to fix
salt/modules/osquery.py on lines 657..669
salt/modules/osquery.py on lines 672..684
salt/modules/osquery.py on lines 687..699
salt/modules/osquery.py on lines 702..714
salt/modules/osquery.py on lines 717..729
salt/modules/osquery.py on lines 732..744
salt/modules/osquery.py on lines 762..774
salt/modules/osquery.py on lines 777..789
salt/modules/osquery.py on lines 792..804
salt/modules/osquery.py on lines 807..819
salt/modules/osquery.py on lines 822..834
salt/modules/osquery.py on lines 837..849
salt/modules/osquery.py on lines 852..864
salt/modules/osquery.py on lines 867..879
salt/modules/osquery.py on lines 882..894
salt/modules/osquery.py on lines 897..909
salt/modules/osquery.py on lines 912..924
salt/modules/osquery.py on lines 927..939
salt/modules/osquery.py on lines 942..954
salt/modules/osquery.py on lines 957..969
salt/modules/osquery.py on lines 972..984
salt/modules/osquery.py on lines 987..999

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def keychain_items(attrs=None, where=None):
    '''
    Return keychain_items information from osquery

    CLI Example:
Severity: Major
Found in salt/modules/osquery.py and 22 other locations - About 1 hr to fix
salt/modules/osquery.py on lines 657..669
salt/modules/osquery.py on lines 672..684
salt/modules/osquery.py on lines 687..699
salt/modules/osquery.py on lines 702..714
salt/modules/osquery.py on lines 717..729
salt/modules/osquery.py on lines 732..744
salt/modules/osquery.py on lines 747..759
salt/modules/osquery.py on lines 762..774
salt/modules/osquery.py on lines 777..789
salt/modules/osquery.py on lines 792..804
salt/modules/osquery.py on lines 807..819
salt/modules/osquery.py on lines 822..834
salt/modules/osquery.py on lines 852..864
salt/modules/osquery.py on lines 867..879
salt/modules/osquery.py on lines 882..894
salt/modules/osquery.py on lines 897..909
salt/modules/osquery.py on lines 912..924
salt/modules/osquery.py on lines 927..939
salt/modules/osquery.py on lines 942..954
salt/modules/osquery.py on lines 957..969
salt/modules/osquery.py on lines 972..984
salt/modules/osquery.py on lines 987..999

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def preferences(attrs=None, where=None):
    '''
    Return preferences information from osquery

    CLI Example:
Severity: Major
Found in salt/modules/osquery.py and 22 other locations - About 1 hr to fix
salt/modules/osquery.py on lines 657..669
salt/modules/osquery.py on lines 672..684
salt/modules/osquery.py on lines 687..699
salt/modules/osquery.py on lines 702..714
salt/modules/osquery.py on lines 717..729
salt/modules/osquery.py on lines 732..744
salt/modules/osquery.py on lines 747..759
salt/modules/osquery.py on lines 762..774
salt/modules/osquery.py on lines 777..789
salt/modules/osquery.py on lines 792..804
salt/modules/osquery.py on lines 807..819
salt/modules/osquery.py on lines 822..834
salt/modules/osquery.py on lines 837..849
salt/modules/osquery.py on lines 852..864
salt/modules/osquery.py on lines 867..879
salt/modules/osquery.py on lines 882..894
salt/modules/osquery.py on lines 912..924
salt/modules/osquery.py on lines 927..939
salt/modules/osquery.py on lines 942..954
salt/modules/osquery.py on lines 957..969
salt/modules/osquery.py on lines 972..984
salt/modules/osquery.py on lines 987..999

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def alf_explicit_auths(attrs=None, where=None):
    '''
    Return alf_explicit_auths information from osquery

    CLI Example:
Severity: Major
Found in salt/modules/osquery.py and 22 other locations - About 1 hr to fix
salt/modules/osquery.py on lines 657..669
salt/modules/osquery.py on lines 672..684
salt/modules/osquery.py on lines 702..714
salt/modules/osquery.py on lines 717..729
salt/modules/osquery.py on lines 732..744
salt/modules/osquery.py on lines 747..759
salt/modules/osquery.py on lines 762..774
salt/modules/osquery.py on lines 777..789
salt/modules/osquery.py on lines 792..804
salt/modules/osquery.py on lines 807..819
salt/modules/osquery.py on lines 822..834
salt/modules/osquery.py on lines 837..849
salt/modules/osquery.py on lines 852..864
salt/modules/osquery.py on lines 867..879
salt/modules/osquery.py on lines 882..894
salt/modules/osquery.py on lines 897..909
salt/modules/osquery.py on lines 912..924
salt/modules/osquery.py on lines 927..939
salt/modules/osquery.py on lines 942..954
salt/modules/osquery.py on lines 957..969
salt/modules/osquery.py on lines 972..984
salt/modules/osquery.py on lines 987..999

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def xattr_where_from(attrs=None, where=None):
    '''
    Return xattr_where_from information from osquery

    CLI Example:
Severity: Major
Found in salt/modules/osquery.py and 22 other locations - About 1 hr to fix
salt/modules/osquery.py on lines 657..669
salt/modules/osquery.py on lines 672..684
salt/modules/osquery.py on lines 687..699
salt/modules/osquery.py on lines 702..714
salt/modules/osquery.py on lines 717..729
salt/modules/osquery.py on lines 732..744
salt/modules/osquery.py on lines 747..759
salt/modules/osquery.py on lines 762..774
salt/modules/osquery.py on lines 777..789
salt/modules/osquery.py on lines 792..804
salt/modules/osquery.py on lines 807..819
salt/modules/osquery.py on lines 822..834
salt/modules/osquery.py on lines 837..849
salt/modules/osquery.py on lines 852..864
salt/modules/osquery.py on lines 867..879
salt/modules/osquery.py on lines 882..894
salt/modules/osquery.py on lines 897..909
salt/modules/osquery.py on lines 912..924
salt/modules/osquery.py on lines 927..939
salt/modules/osquery.py on lines 942..954
salt/modules/osquery.py on lines 972..984
salt/modules/osquery.py on lines 987..999

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_portgroups(kwargs=None, call=None):
    '''
    List all the distributed virtual portgroups for this VMware environment

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1550..1566
salt/cloud/clouds/vmware.py on lines 1588..1604
salt/cloud/clouds/vmware.py on lines 1607..1623
salt/cloud/clouds/vmware.py on lines 1626..1642
salt/cloud/clouds/vmware.py on lines 1645..1661
salt/cloud/clouds/vmware.py on lines 1691..1707
salt/cloud/clouds/vmware.py on lines 1710..1726
salt/cloud/clouds/vmware.py on lines 1729..1745
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3613..3629
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_dvs(kwargs=None, call=None):
    '''
    List all the distributed virtual switches for this VMware environment

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1550..1566
salt/cloud/clouds/vmware.py on lines 1569..1585
salt/cloud/clouds/vmware.py on lines 1588..1604
salt/cloud/clouds/vmware.py on lines 1607..1623
salt/cloud/clouds/vmware.py on lines 1626..1642
salt/cloud/clouds/vmware.py on lines 1645..1661
salt/cloud/clouds/vmware.py on lines 1691..1707
salt/cloud/clouds/vmware.py on lines 1710..1726
salt/cloud/clouds/vmware.py on lines 1729..1745
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_clusters(kwargs=None, call=None):
    '''
    List all the clusters for this VMware environment

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1550..1566
salt/cloud/clouds/vmware.py on lines 1569..1585
salt/cloud/clouds/vmware.py on lines 1607..1623
salt/cloud/clouds/vmware.py on lines 1626..1642
salt/cloud/clouds/vmware.py on lines 1645..1661
salt/cloud/clouds/vmware.py on lines 1691..1707
salt/cloud/clouds/vmware.py on lines 1710..1726
salt/cloud/clouds/vmware.py on lines 1729..1745
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3613..3629
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_datacenters(kwargs=None, call=None):
    '''
    List all the data centers for this VMware environment

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1569..1585
salt/cloud/clouds/vmware.py on lines 1588..1604
salt/cloud/clouds/vmware.py on lines 1607..1623
salt/cloud/clouds/vmware.py on lines 1626..1642
salt/cloud/clouds/vmware.py on lines 1645..1661
salt/cloud/clouds/vmware.py on lines 1691..1707
salt/cloud/clouds/vmware.py on lines 1710..1726
salt/cloud/clouds/vmware.py on lines 1729..1745
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3613..3629
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_datastores_full(kwargs=None, call=None):
    '''
    List all the datastores for this VMware environment, with extra information

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1550..1566
salt/cloud/clouds/vmware.py on lines 1569..1585
salt/cloud/clouds/vmware.py on lines 1588..1604
salt/cloud/clouds/vmware.py on lines 1607..1623
salt/cloud/clouds/vmware.py on lines 1626..1642
salt/cloud/clouds/vmware.py on lines 1691..1707
salt/cloud/clouds/vmware.py on lines 1710..1726
salt/cloud/clouds/vmware.py on lines 1729..1745
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3613..3629
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_hosts(kwargs=None, call=None):
    '''
    List all the hosts for this VMware environment

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1550..1566
salt/cloud/clouds/vmware.py on lines 1569..1585
salt/cloud/clouds/vmware.py on lines 1588..1604
salt/cloud/clouds/vmware.py on lines 1607..1623
salt/cloud/clouds/vmware.py on lines 1626..1642
salt/cloud/clouds/vmware.py on lines 1645..1661
salt/cloud/clouds/vmware.py on lines 1710..1726
salt/cloud/clouds/vmware.py on lines 1729..1745
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3613..3629
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_networks(kwargs=None, call=None):
    '''
    List all the standard networks for this VMware environment

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1550..1566
salt/cloud/clouds/vmware.py on lines 1569..1585
salt/cloud/clouds/vmware.py on lines 1588..1604
salt/cloud/clouds/vmware.py on lines 1607..1623
salt/cloud/clouds/vmware.py on lines 1626..1642
salt/cloud/clouds/vmware.py on lines 1645..1661
salt/cloud/clouds/vmware.py on lines 1691..1707
salt/cloud/clouds/vmware.py on lines 1710..1726
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3613..3629
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_datastore_clusters(kwargs=None, call=None):
    '''
    List all the datastore clusters for this VMware environment

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1550..1566
salt/cloud/clouds/vmware.py on lines 1569..1585
salt/cloud/clouds/vmware.py on lines 1588..1604
salt/cloud/clouds/vmware.py on lines 1626..1642
salt/cloud/clouds/vmware.py on lines 1645..1661
salt/cloud/clouds/vmware.py on lines 1691..1707
salt/cloud/clouds/vmware.py on lines 1710..1726
salt/cloud/clouds/vmware.py on lines 1729..1745
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3613..3629
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_datastores(kwargs=None, call=None):
    '''
    List all the datastores for this VMware environment

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1550..1566
salt/cloud/clouds/vmware.py on lines 1569..1585
salt/cloud/clouds/vmware.py on lines 1588..1604
salt/cloud/clouds/vmware.py on lines 1607..1623
salt/cloud/clouds/vmware.py on lines 1645..1661
salt/cloud/clouds/vmware.py on lines 1691..1707
salt/cloud/clouds/vmware.py on lines 1710..1726
salt/cloud/clouds/vmware.py on lines 1729..1745
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3613..3629
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def list_resourcepools(kwargs=None, call=None):
    '''
    List all the resource pools for this VMware environment

    CLI Example:
Severity: Major
Found in salt/cloud/clouds/vmware.py and 11 other locations - About 1 hr to fix
salt/cloud/clouds/vmware.py on lines 1550..1566
salt/cloud/clouds/vmware.py on lines 1569..1585
salt/cloud/clouds/vmware.py on lines 1588..1604
salt/cloud/clouds/vmware.py on lines 1607..1623
salt/cloud/clouds/vmware.py on lines 1626..1642
salt/cloud/clouds/vmware.py on lines 1645..1661
salt/cloud/clouds/vmware.py on lines 1691..1707
salt/cloud/clouds/vmware.py on lines 1729..1745
salt/cloud/clouds/vmware.py on lines 2121..2137
salt/cloud/clouds/vmware.py on lines 3613..3629
salt/cloud/clouds/vmware.py on lines 3632..3648

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language