kontron/python-ipmi

View on GitHub

Showing 253 of 341 total issues

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

@register_message_class
class VitaGetPayloadModeCapabilitiesReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_GET_PAYLOAD_MODE_CAPABILITIES
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505

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

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

@register_message_class
class GetFanSpeedPropertiesReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_FAN_SPEED_PROPERTIES
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

@register_message_class
class VitaGetMandatorySensorNumbersReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_GET_MANDATORY_SENSOR_NUMBERS
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

@register_message_class
class GetFruControlCapabilitiesReq(PicmgMessage):
    __cmdid__ = constants.CMDID_FRU_CONTROL_CAPABILITIES
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

@register_message_class
class GetFruActivationPolicyReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_FRU_ACTIVATION_POLICY
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

@register_message_class
class VitaGetFruLedPropertiesReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_GET_FRU_LED_PROPERTIES
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

@register_message_class
class VitaFruControlCapabilitiesReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_FRU_CONTROL_CAPABILITIES
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

@register_message_class
class GetFanLevelReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_FAN_LEVEL
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

functions = (
        ('SENSOR', 'Sensor Device'),
        ('SDR_REPOSITORY', 'SDR Repository Device'),
        ('SEL', 'SEL Device'),
        ('FRU_INVENTORY', 'FRU Inventory Device'),
Severity: Major
Found in examples/interface_aardvark.py and 2 other locations - About 1 hr to fix
examples/interface_rmcp.py on lines 34..42
pyipmi/ipmitool.py on lines 66..74

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

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

        Bitfield('timer_actions', 1,
                 Bitfield.Bit('timeout_action', 3),
                 Bitfield.ReservedBit(1, 0),
                 Bitfield.Bit('pre_timeout_interrupt', 3),
                 Bitfield.ReservedBit(1, 0),),
Severity: Major
Found in pyipmi/msgs/bmc.py and 1 other location - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 252..256

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

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

@register_message_class
class DeleteSelEntryReq(Message):
    __cmdid__ = constants.CMDID_DELETE_SEL_ENTRY
    __netfn__ = constants.NETFN_STORAGE
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/sel.py and 1 other location - About 1 hr to fix
pyipmi/msgs/sdr.py on lines 161..167

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

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

@register_message_class
class GetTelcoAlarmCapabilityReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_TELCO_ALARM_CAPABILITY
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

functions = (
        ('SENSOR', 'Sensor Device'),
        ('SDR_REPOSITORY', 'SDR Repository Device'),
        ('SEL', 'SEL Device'),
        ('FRU_INVENTORY', 'FRU Inventory Device'),
Severity: Major
Found in examples/interface_rmcp.py and 2 other locations - About 1 hr to fix
examples/interface_aardvark.py on lines 27..35
pyipmi/ipmitool.py on lines 66..74

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

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

        Bitfield('timer_actions', 1,
                 Bitfield.Bit('timeout_action', 3),
                 Bitfield.ReservedBit(1, 0),
                 Bitfield.Bit('pre_timeout_interrupt', 3),
                 Bitfield.ReservedBit(1, 0),),
Severity: Major
Found in pyipmi/msgs/bmc.py and 1 other location - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 215..219

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

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

@register_message_class
class GetDcmiCapabilitiesReq(DcmiMessage):
    __cmdid__ = constants.CMDID_GET_DCMI_CAPABILITIES_INFO
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/dcmi.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

    functions = (
            ('SENSOR', 'Sensor Device'),
            ('SDR_REPOSITORY', 'SDR Repository Device'),
            ('SEL', 'SEL Device'),
            ('FRU_INVENTORY', 'FRU Inventory Device'),
Severity: Major
Found in pyipmi/ipmitool.py and 2 other locations - About 1 hr to fix
examples/interface_aardvark.py on lines 27..35
examples/interface_rmcp.py on lines 34..42

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

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

@register_message_class
class DeleteSdrReq(Message):
    __cmdid__ = constants.CMDID_DELETE_SDR
    __netfn__ = constants.NETFN_STORAGE
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/sdr.py and 1 other location - About 1 hr to fix
pyipmi/msgs/sel.py on lines 134..140

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

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

@register_message_class
class VitaGetFruAddressInfoReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_GET_FRU_ADDRESS_INFO
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

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

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

@register_message_class
class VitaGetFruHashReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_GET_FRU_HASH
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 520..526

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

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

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

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

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

Refactorings

Further Reading

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

        if cls.__name__.endswith('Req') and cls.__netfn__ & 1 != 0:
            raise DescriptionError('LSB of NetFN of a Request must be 0')
Severity: Major
Found in pyipmi/msgs/registry.py and 1 other location - About 1 hr to fix
pyipmi/msgs/registry.py on lines 41..42

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

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