CiscoUcs/ucsmsdk

View on GitHub

Showing 127 of 492 total issues

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

        out_str += str("min_version").ljust(ts * 4) + ':' + str(
            self.min_version) + "\n"
Severity: Major
Found in ucsmsdk/ucscoreutils.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("file_description").ljust(tab_size * 4) + ':' + str(
            self.file_description) + "\n"
Severity: Major
Found in ucsmsdk/utils/ccoimage.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("xml_attribute").ljust(ts * 4) + ':' + str(
            self.xml_attribute) + "\n"
Severity: Major
Found in ucsmsdk/ucscoremeta.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("field_type").ljust(ts * 4) + ':' + str(
            self.field_type) + "\n"
Severity: Major
Found in ucsmsdk/ucscoremeta.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("min_version").ljust(ts * 4) + ':' + str(
            self.version) + "\n"
Severity: Major
Found in ucsmsdk/ucscoremeta.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("ip_url").ljust(tab_size * 4) + ':' + str(
            self.ip_url) + "\n"
Severity: Major
Found in ucsmsdk/utils/ccoimage.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("proxy").ljust(tab_size * 4) + ':' + str(
            self.proxy) + "\n"
Severity: Major
Found in ucsmsdk/utils/ccoimage.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("image_name").ljust(tab_size * 4) + ':' + str(
            self.image_name) + "\n"
Severity: Major
Found in ucsmsdk/utils/ccoimage.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("xml_attribute").ljust(ts * 4) + ':' + str(
            self.xml_attribute) + "\n"
Severity: Major
Found in ucsmsdk/ucscoreutils.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("parents").ljust(ts * 4) + ':' + str(self.parents) + \
Severity: Major
Found in ucsmsdk/ucscoreutils.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552

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

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

        out_str += str("size").ljust(tab_size * 4) + ':' + str(
            self.size) + "\n"
Severity: Major
Found in ucsmsdk/utils/ccoimage.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("url").ljust(tab_size * 4) + ':' + str(self.url) + "\n"
Severity: Major
Found in ucsmsdk/utils/ccoimage.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        out_str += str("access_privilege").ljust(ts * 4) + ':' + str(
            self.access_privilege) + "\n"
Severity: Major
Found in ucsmsdk/ucscoreutils.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 553..553

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

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

        if response.error_code == 0:
            for mgmt_if in response.out_configs.child:
                if mgmt_if.subject == MgmtIfConsts.SUBJECT_BLADE and \
                   mgmt_if.admin_state == MgmtIfConsts.ADMIN_STATE_ENABLE:
                    ip_address = mgmt_if.ext_ip
Severity: Major
Found in ucsmsdk/utils/ucskvmlaunch.py and 1 other location - About 1 hr to fix
ucsmsdk/utils/ucskvmlaunch.py on lines 189..193

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

        if response.error_code == 0:
            for mgmt_if in response.out_configs.child:
                if mgmt_if.subject == MgmtIfConsts.SUBJECT_BLADE and \
                   mgmt_if.admin_state == MgmtIfConsts.ADMIN_STATE_ENABLE:
                    ip_address = mgmt_if.ext_ip
Severity: Major
Found in ucsmsdk/utils/ucskvmlaunch.py and 1 other location - About 1 hr to fix
ucsmsdk/utils/ucskvmlaunch.py on lines 122..126

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

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

        print("--".ljust(tab_size * 10), "-----------".ljust(tab_size * 4),
              "-------------".ljust(tab_size * 3), "------------")
Severity: Major
Found in ucsmsdk/utils/comparesyncmo.py and 1 other location - About 1 hr to fix
ucsmsdk/utils/comparesyncmo.py on lines 539..540

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

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

        print("dn".ljust(tab_size * 10), "input_object".ljust(tab_size * 4),
              "side_indicator".ljust(tab_size * 3), "diff_property")
Severity: Major
Found in ucsmsdk/utils/comparesyncmo.py and 1 other location - About 1 hr to fix
ucsmsdk/utils/comparesyncmo.py on lines 541..542

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

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

        for prop, prop_value in ucsgenutils.iteritems(self.__json__()):
            out_str += str(prop).ljust(ts * 4) + ':' + str(
                prop_value) + "\n"
Severity: Major
Found in ucsmsdk/ucsmo.py and 2 other locations - About 1 hr to fix
ucsmsdk/ucsmethod.py on lines 171..172
ucsmsdk/ucsmo.py on lines 715..715

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

                out_str += str(prop).ljust(ts * 4) + ':' + str(prop_val) + "\n"
Severity: Major
Found in ucsmsdk/ucsmo.py and 2 other locations - About 1 hr to fix
ucsmsdk/ucsmethod.py on lines 171..172
ucsmsdk/ucsmo.py on lines 257..259

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

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

    def _thread_dequeue_start(self):
        """
        Internal method to start dequeue thread.
        """

Severity: Major
Found in ucsmsdk/ucseventhandler.py and 1 other location - About 1 hr to fix
ucsmsdk/ucseventhandler.py on lines 195..204

Duplicated Code

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

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

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

Tuning

This issue has a mass of 45.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language