saltstack/salt

View on GitHub
salt/ext/vsan/vsanmgmtObjects.py

Summary

Maintainability
F
1 wk
Test Coverage

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

CreateDataType('vim.host.VsanProactiveRebalanceInfoEx', 'VsanProactiveRebalanceInfoEx', 'vmodl.DynamicData', 'vim.version.version9', [('running', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL), ('startTs', 'vmodl.DateTime', 'vim.version.version9', 0 | F_OPTIONAL), ('stopTs', 'vmodl.DateTime', 'vim.version.version9', 0 | F_OPTIONAL), ('varianceThreshold', 'float', 'vim.version.version9', 0 | F_OPTIONAL), ('timeThreshold', 'int', 'vim.version.version9', 0 | F_OPTIONAL), ('rateThreshold', 'int', 'vim.version.version9', 0 | F_OPTIONAL), ('hostname', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('error', 'vmodl.MethodFault', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 6 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 52..52

Duplicated Code

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

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

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

Tuning

This issue has a mass of 108.

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.host.VsanNetworkPeerHealthResult', 'VsanNetworkPeerHealthResult', 'vmodl.DynamicData', 'vim.version.version9', [('peer', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('peerHostname', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('peerVmknicName', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('smallPingTestSuccessPct', 'int', 'vim.version.version9', 0 | F_OPTIONAL), ('largePingTestSuccessPct', 'int', 'vim.version.version9', 0 | F_OPTIONAL), ('maxLatencyUs', 'long', 'vim.version.version9', 0 | F_OPTIONAL), ('onSameIpSubnet', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL), ('sourceVmknicName', 'string', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 6 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 115..115

Duplicated Code

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

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

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

Tuning

This issue has a mass of 108.

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.host.VsanNetworkHealthResult', 'VsanNetworkHealthResult', 'vmodl.DynamicData', 'vim.version.version9', [('host', 'vim.HostSystem', 'vim.version.version9', 0 | F_OPTIONAL), ('hostname', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('vsanVmknicPresent', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL), ('ipSubnets', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL), ('issueFound', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL), ('peerHealth', 'vim.host.VsanNetworkPeerHealthResult[]', 'vim.version.version9', 0 | F_OPTIONAL), ('multicastConfig', 'string', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 2 other locations - About 5 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 29..29
salt/ext/vsan/vsanmgmtObjects.py on lines 104..104

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

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

CreateDataType('vim.cluster.VsanClusterHealthTest', 'VsanClusterHealthTest', 'vmodl.DynamicData', 'vim.version.version9', [('testId', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('testName', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('testDescription', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('testShortDescription', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('testHealth', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('testDetails', 'vim.cluster.VsanClusterHealthResultBase[]', 'vim.version.version9', 0 | F_OPTIONAL), ('testActions', 'vim.cluster.VsanClusterHealthAction[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 2 other locations - About 5 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 89..89
salt/ext/vsan/vsanmgmtObjects.py on lines 104..104

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

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

CreateDataType('vim.cluster.VsanObjectInformation', 'VsanObjectInformation', 'vmodl.DynamicData', 'vim.version.version9', [('directoryName', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('vsanObjectUuid', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('vsanHealth', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('policyAttributes', 'vim.KeyValue[]', 'vim.version.version9', 0 | F_OPTIONAL), ('spbmProfileUuid', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('spbmProfileGenerationId', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('spbmComplianceResult', 'vim.cluster.StorageComplianceResult', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 2 other locations - About 5 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 29..29
salt/ext/vsan/vsanmgmtObjects.py on lines 89..89

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

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

CreateManagedType('vim.cluster.VsanVcClusterHealthSystem', 'VsanVcClusterHealthSystem', 'vmodl.ManagedObject', 'vim.version.version9', [], [('queryClusterCreateVmHealthHistoryTest', 'VsanQueryVcClusterCreateVmHealthHistoryTest', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('count', 'int', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0 | F_OPTIONAL, 'vim.cluster.VsanClusterCreateVmHealthTestResult[]', 'vim.cluster.VsanClusterCreateVmHealthTestResult[]'), 'System.Read', None), ('setLogLevel', 'VsanHealthSetLogLevel', 'vim.version.version9', (('level', 'vim.cluster.VsanHealthLogLevelEnum', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'void', 'void'), 'System.Read', None), ('testVsanClusterTelemetryProxy', 'VsanHealthTestVsanClusterTelemetryProxy', 'vim.version.version9', (('proxyConfig', 'vim.cluster.VsanClusterTelemetryProxyConfig', 'vim.version.version9', 0, None), ), (0, 'boolean', 'boolean'), 'System.Read', None), ('uploadHclDb', 'VsanVcUploadHclDb', 'vim.version.version9', (('db', 'string', 'vim.version.version9', 0, None), ), (0, 'boolean', 'boolean'), 'System.Read', None), ('updateHclDbFromWeb', 'VsanVcUpdateHclDbFromWeb', 'vim.version.version9', (('url', 'string', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'boolean', 'boolean'), 'System.Read', None), ('repairClusterObjectsImmediate', 'VsanHealthRepairClusterObjectsImmediate', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('uuids', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('queryClusterNetworkPerfTest', 'VsanQueryVcClusterNetworkPerfTest', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('multicast', 'boolean', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterNetworkLoadTestResult', 'vim.cluster.VsanClusterNetworkLoadTestResult'), 'System.Read', None), ('queryClusterVmdkLoadHistoryTest', 'VsanQueryVcClusterVmdkLoadHistoryTest', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('count', 'int', 'vim.version.version9', 0 | F_OPTIONAL, None), ('taskId', 'string', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0 | F_OPTIONAL, 'vim.cluster.VsanClusterVmdkLoadTestResult[]', 'vim.cluster.VsanClusterVmdkLoadTestResult[]'), 'System.Read', None), ('queryVsanClusterHealthCheckInterval', 'VsanHealthQueryVsanClusterHealthCheckInterval', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ), (0, 'int', 'int'), 'System.Read', None), ('queryClusterCreateVmHealthTest', 'VsanQueryVcClusterCreateVmHealthTest', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('timeout', 'int', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterCreateVmHealthTestResult', 'vim.cluster.VsanClusterCreateVmHealthTestResult'), 'System.Read', None), ('getClusterHclInfo', 'VsanVcClusterGetHclInfo', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('includeHostsResult', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.cluster.VsanClusterHclInfo', 'vim.cluster.VsanClusterHclInfo'), 'System.Read', None), ('queryAttachToSrHistory', 'VsanQueryAttachToSrHistory', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('count', 'int', 'vim.version.version9', 0 | F_OPTIONAL, None), ('taskId', 'string', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0 | F_OPTIONAL, 'vim.cluster.VsanAttachToSrOperation[]', 'vim.cluster.VsanAttachToSrOperation[]'), 'System.Read', None), ('rebalanceCluster', 'VsanRebalanceCluster', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('targetHosts', 'vim.HostSystem[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('runVmdkLoadTest', 'VsanVcClusterRunVmdkLoadTest', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('runname', 'string', 'vim.version.version9', 0, None), ('durationSec', 'int', 'vim.version.version9', 0 | F_OPTIONAL, None), ('specs', 'vim.host.VsanVmdkLoadTestSpec[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ('action', 'string', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('sendVsanTelemetry', 'VsanHealthSendVsanTelemetry', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ), (0, 'void', 'void'), 'System.Read', None), ('queryClusterNetworkPerfHistoryTest', 'VsanQueryVcClusterNetworkPerfHistoryTest', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('count', 'int', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0 | F_OPTIONAL, 'vim.cluster.VsanClusterNetworkLoadTestResult[]', 'vim.cluster.VsanClusterNetworkLoadTestResult[]'), 'System.Read', None), ('queryClusterHealthSummary', 'VsanQueryVcClusterHealthSummary', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('vmCreateTimeout', 'int', 'vim.version.version9', 0 | F_OPTIONAL, None), ('objUuids', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ('includeObjUuids', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL, None), ('fields', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ('fetchFromCache', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.cluster.VsanClusterHealthSummary', 'vim.cluster.VsanClusterHealthSummary'), 'System.Read', None), ('stopRebalanceCluster', 'VsanStopRebalanceCluster', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('targetHosts', 'vim.HostSystem[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('queryVsanClusterHealthConfig', 'VsanHealthQueryVsanClusterHealthConfig', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterHealthConfigs', 'vim.cluster.VsanClusterHealthConfigs'), 'System.Read', None), ('attachVsanSupportBundleToSr', 'VsanAttachVsanSupportBundleToSr', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('srNumber', 'string', 'vim.version.version9', 0, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('queryClusterVmdkWorkloadTypes', 'VsanQueryVcClusterVmdkWorkloadTypes', 'vim.version.version9', tuple(), (0, 'vim.cluster.VsanStorageWorkloadType[]', 'vim.cluster.VsanStorageWorkloadType[]'), 'System.Read', None), ('queryVerifyClusterHealthSystemVersions', 'VsanVcClusterQueryVerifyHealthSystemVersions', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterHealthSystemVersionResult', 'vim.cluster.VsanClusterHealthSystemVersionResult'), 'System.Read', None), ('isRebalanceRunning', 'VsanHealthIsRebalanceRunning', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('targetHosts', 'vim.HostSystem[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'boolean', 'boolean'), 'System.Read', None), ('setVsanClusterHealthCheckInterval', 'VsanHealthSetVsanClusterHealthCheckInterval', 'vim.version.version9', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version9', 0, None), ('vsanClusterHealthCheckInterval', 'int', 'vim.version.version9', 0, None), ), (0, 'void', 'void'), 'System.Read', None), ])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 4 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 8..8

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

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

CreateManagedType('vim.VsanUpgradeSystemEx', 'VsanUpgradeSystemEx', 'vmodl.ManagedObject', 'vim.version.version10', [], [('performUpgrade', 'PerformVsanUpgradeEx', 'vim.version.version10', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version10', 0, None), ('performObjectUpgrade', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL, None), ('downgradeFormat', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL, None), ('allowReducedRedundancy', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL, None), ('excludeHosts', 'vim.HostSystem[]', 'vim.version.version10', 0 | F_OPTIONAL, None), ('spec', 'vim.cluster.VsanDiskFormatConversionSpec', 'vim.version.version10', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('performUpgradePreflightCheck', 'PerformVsanUpgradePreflightCheckEx', 'vim.version.version10', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version10', 0, None), ('downgradeFormat', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL, None), ('spec', 'vim.cluster.VsanDiskFormatConversionSpec', 'vim.version.version10', 0 | F_OPTIONAL, None), ), (0, 'vim.cluster.VsanDiskFormatConversionCheckResult', 'vim.cluster.VsanDiskFormatConversionCheckResult'), 'System.Read', None), ('retrieveSupportedFormatVersion', 'RetrieveSupportedVsanFormatVersion', 'vim.version.version10', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version10', 0, None), ), (0, 'int', 'int'), 'System.Read', None), ])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 4 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 13..13

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

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

CreateDataType('vim.cluster.VSANWitnessHostInfo', 'VimClusterVSANWitnessHostInfo', 'vmodl.DynamicData', 'vim.version.version10', [('nodeUuid', 'string', 'vim.version.version10', 0), ('faultDomainName', 'string', 'vim.version.version10', 0 | F_OPTIONAL), ('preferredFdName', 'string', 'vim.version.version10', 0 | F_OPTIONAL), ('preferredFdUuid', 'string', 'vim.version.version10', 0 | F_OPTIONAL), ('unicastAgentAddr', 'string', 'vim.version.version10', 0 | F_OPTIONAL), ('host', 'vim.HostSystem', 'vim.version.version10', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 3 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 37..37

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

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

CreateDataType('vim.cluster.VsanPerfQuerySpec', 'VsanPerfQuerySpec', 'vmodl.DynamicData', 'vim.version.version9', [('entityRefId', 'string', 'vim.version.version9', 0), ('startTime', 'vmodl.DateTime', 'vim.version.version9', 0 | F_OPTIONAL), ('endTime', 'vmodl.DateTime', 'vim.version.version9', 0 | F_OPTIONAL), ('group', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('labels', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL), ('interval', 'int', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 3 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 33..33

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

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

CreateDataType('vim.cluster.VsanClusterHealthConfigs', 'VsanClusterHealthConfigs', 'vmodl.DynamicData', 'vim.version.version9', [('enableVsanTelemetry', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL), ('vsanTelemetryInterval', 'int', 'vim.version.version9', 0 | F_OPTIONAL), ('vsanTelemetryProxy', 'vim.cluster.VsanClusterTelemetryProxyConfig', 'vim.version.version9', 0 | F_OPTIONAL), ('configs', 'vim.cluster.VsanClusterHealthResultKeyValuePair[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 4 other locations - About 2 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 42..42
salt/ext/vsan/vsanmgmtObjects.py on lines 80..80
salt/ext/vsan/vsanmgmtObjects.py on lines 83..83
salt/ext/vsan/vsanmgmtObjects.py on lines 97..97

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

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

CreateDataType('vim.cluster.StorageOperationalStatus', 'VsanStorageOperationalStatus', 'vmodl.DynamicData', 'vim.version.version9', [('healthy', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL), ('operationETA', 'vmodl.DateTime', 'vim.version.version9', 0 | F_OPTIONAL), ('operationProgress', 'long', 'vim.version.version9', 0 | F_OPTIONAL), ('transitional', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 4 other locations - About 2 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 42..42
salt/ext/vsan/vsanmgmtObjects.py on lines 78..78
salt/ext/vsan/vsanmgmtObjects.py on lines 80..80
salt/ext/vsan/vsanmgmtObjects.py on lines 97..97

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

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

CreateDataType('vim.cluster.VsanVsanClusterPcapResult', 'VsanVsanClusterPcapResult', 'vmodl.DynamicData', 'vim.version.version9', [('pkts', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL), ('groups', 'vim.cluster.VsanVsanClusterPcapGroup[]', 'vim.version.version9', 0 | F_OPTIONAL), ('issues', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL), ('hostResults', 'vim.host.VsanVsanPcapResult[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 4 other locations - About 2 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 78..78
salt/ext/vsan/vsanmgmtObjects.py on lines 80..80
salt/ext/vsan/vsanmgmtObjects.py on lines 83..83
salt/ext/vsan/vsanmgmtObjects.py on lines 97..97

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

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

CreateDataType('vim.host.VsanVmdkLoadTestSpec', 'VsanVmdkLoadTestSpec', 'vmodl.DynamicData', 'vim.version.version9', [('vmdkCreateSpec', 'vim.VirtualDiskManager.FileBackedVirtualDiskSpec', 'vim.version.version9', 0 | F_OPTIONAL), ('vmdkIOSpec', 'vim.host.VsanVmdkIOLoadSpec', 'vim.version.version9', 0 | F_OPTIONAL), ('vmdkIOSpecSequence', 'vim.host.VsanVmdkIOLoadSpec[]', 'vim.version.version9', 0 | F_OPTIONAL), ('stepDurationSec', 'long', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 4 other locations - About 2 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 42..42
salt/ext/vsan/vsanmgmtObjects.py on lines 78..78
salt/ext/vsan/vsanmgmtObjects.py on lines 80..80
salt/ext/vsan/vsanmgmtObjects.py on lines 83..83

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

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

CreateDataType('vim.cluster.VsanObjectIdentityAndHealth', 'VsanObjectIdentityAndHealth', 'vmodl.DynamicData', 'vim.version.version9', [('identities', 'vim.cluster.VsanObjectIdentity[]', 'vim.version.version9', 0 | F_OPTIONAL), ('health', 'vim.host.VsanObjectOverallHealth', 'vim.version.version9', 0 | F_OPTIONAL), ('spaceSummary', 'vim.cluster.VsanObjectSpaceSummary[]', 'vim.version.version9', 0 | F_OPTIONAL), ('rawData', 'string', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 4 other locations - About 2 hrs to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 42..42
salt/ext/vsan/vsanmgmtObjects.py on lines 78..78
salt/ext/vsan/vsanmgmtObjects.py on lines 83..83
salt/ext/vsan/vsanmgmtObjects.py on lines 97..97

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

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

CreateDataType('vim.cluster.VSANStretchedClusterCapability', 'VimClusterVSANStretchedClusterCapability', 'vmodl.DynamicData', 'vim.version.version10', [('hostMoId', 'string', 'vim.version.version10', 0), ('connStatus', 'string', 'vim.version.version10', 0 | F_OPTIONAL), ('isSupported', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL), ('hostCapability', 'vim.host.VSANStretchedClusterHostCapability', 'vim.version.version10', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 84..84

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

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

CreateDataType('vim.cluster.VsanSpaceUsage', 'VsanSpaceUsage', 'vmodl.DynamicData', 'vim.version.version9', [('totalCapacityB', 'long', 'vim.version.version9', 0), ('freeCapacityB', 'long', 'vim.version.version9', 0 | F_OPTIONAL), ('spaceOverview', 'vim.cluster.VsanObjectSpaceSummary', 'vim.version.version9', 0 | F_OPTIONAL), ('spaceDetail', 'vim.cluster.VsanSpaceUsageDetailResult', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 48..48

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

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.cluster.VsanClusterHclInfo', 'VsanClusterHclInfo', 'vmodl.DynamicData', 'vim.version.version9', [('hclDbLastUpdate', 'vmodl.DateTime', 'vim.version.version9', 0 | F_OPTIONAL), ('hclDbAgeHealth', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('hostResults', 'vim.host.VsanHostHclInfo[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 5 other locations - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 30..30
salt/ext/vsan/vsanmgmtObjects.py on lines 38..38
salt/ext/vsan/vsanmgmtObjects.py on lines 95..95
salt/ext/vsan/vsanmgmtObjects.py on lines 103..103
salt/ext/vsan/vsanmgmtObjects.py on lines 120..120

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

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.cluster.VsanClusterVmdkLoadTestResult', 'VsanClusterVmdkLoadTestResult', 'vmodl.DynamicData', 'vim.version.version9', [('task', 'vim.Task', 'vim.version.version9', 0 | F_OPTIONAL), ('clusterResult', 'vim.cluster.VsanClusterProactiveTestResult', 'vim.version.version9', 0 | F_OPTIONAL), ('hostResults', 'vim.host.VsanHostVmdkLoadTestResult[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 5 other locations - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 24..24
salt/ext/vsan/vsanmgmtObjects.py on lines 30..30
salt/ext/vsan/vsanmgmtObjects.py on lines 38..38
salt/ext/vsan/vsanmgmtObjects.py on lines 95..95
salt/ext/vsan/vsanmgmtObjects.py on lines 103..103

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

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.host.VsanRepairObjectsResult', 'VsanRepairObjectsResult', 'vmodl.DynamicData', 'vim.version.version9', [('inQueueObjects', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL), ('failedRepairObjects', 'vim.host.VsanFailedRepairObjectResult[]', 'vim.version.version9', 0 | F_OPTIONAL), ('notInQueueObjects', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 5 other locations - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 24..24
salt/ext/vsan/vsanmgmtObjects.py on lines 30..30
salt/ext/vsan/vsanmgmtObjects.py on lines 95..95
salt/ext/vsan/vsanmgmtObjects.py on lines 103..103
salt/ext/vsan/vsanmgmtObjects.py on lines 120..120

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

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.host.VsanQueryResultHostInfo', 'VsanQueryResultHostInfo', 'vmodl.DynamicData', 'vim.version.version9', [('uuid', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('hostnameInCmmds', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('vsanIpv4Addresses', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 5 other locations - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 24..24
salt/ext/vsan/vsanmgmtObjects.py on lines 30..30
salt/ext/vsan/vsanmgmtObjects.py on lines 38..38
salt/ext/vsan/vsanmgmtObjects.py on lines 103..103
salt/ext/vsan/vsanmgmtObjects.py on lines 120..120

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

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.host.VsanHostCimProviderInfo', 'VsanHostCimProviderInfo', 'vmodl.DynamicData', 'vim.version.version9', [('cimProviderSupported', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL), ('installedCIMProvider', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('cimProviderOnHcl', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 5 other locations - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 24..24
salt/ext/vsan/vsanmgmtObjects.py on lines 30..30
salt/ext/vsan/vsanmgmtObjects.py on lines 38..38
salt/ext/vsan/vsanmgmtObjects.py on lines 95..95
salt/ext/vsan/vsanmgmtObjects.py on lines 120..120

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

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.cluster.StoragePolicyStatus', 'VsanStoragePolicyStatus', 'vmodl.DynamicData', 'vim.version.version9', [('id', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('expectedValue', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('currentValue', 'string', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 5 other locations - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 24..24
salt/ext/vsan/vsanmgmtObjects.py on lines 38..38
salt/ext/vsan/vsanmgmtObjects.py on lines 95..95
salt/ext/vsan/vsanmgmtObjects.py on lines 103..103
salt/ext/vsan/vsanmgmtObjects.py on lines 120..120

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

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

CreateDataType('vim.cluster.VsanClusterHealthSystemStatusResult', 'VsanClusterHealthSystemStatusResult', 'vmodl.DynamicData', 'vim.version.version9', [('status', 'string', 'vim.version.version9', 0), ('goalState', 'string', 'vim.version.version9', 0), ('untrackedHosts', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL), ('trackedHostsStatus', 'vim.host.VsanHostHealthSystemStatusResult[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 50..50

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

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

CreateDataType('vim.host.VsanHostVmdkLoadTestResult', 'VsanHostVmdkLoadTestResult', 'vmodl.DynamicData', 'vim.version.version9', [('hostname', 'string', 'vim.version.version9', 0), ('issueFound', 'boolean', 'vim.version.version9', 0), ('faultMessage', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('vmdkResults', 'vim.host.VsanVmdkLoadTestResult[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 70..70

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

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

CreateManagedType('vim.host.VsanStretchedClusterSystem', 'VimHostVsanStretchedClusterSystem', 'vmodl.ManagedObject', 'vim.version.version10', [], [('getStretchedClusterInfoFromCmmds', 'VSANHostGetStretchedClusterInfoFromCmmds', 'vim.version.version10', tuple(), (0 | F_OPTIONAL, 'vim.host.VSANStretchedClusterHostInfo[]', 'vim.host.VSANStretchedClusterHostInfo[]'), 'System.Read', None), ('witnessJoinVsanCluster', 'VSANWitnessJoinVsanCluster', 'vim.version.version10', (('clusterUuid', 'string', 'vim.version.version10', 0, None), ('preferredFd', 'string', 'vim.version.version10', 0, None), ('disableVsanAllowed', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL, None), ), (0, 'void', 'void'), 'System.Read', None), ('witnessSetPreferredFaultDomain', 'VSANWitnessSetPreferredFaultDomain', 'vim.version.version10', (('preferredFd', 'string', 'vim.version.version10', 0, None), ), (0, 'void', 'void'), 'System.Read', None), ('addUnicastAgent', 'VSANHostAddUnicastAgent', 'vim.version.version10', (('witnessAddress', 'string', 'vim.version.version10', 0, None), ('witnessPort', 'int', 'vim.version.version10', 0 | F_OPTIONAL, None), ('overwrite', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL, None), ), (0, 'void', 'void'), 'System.Read', None), ('clusterGetPreferredFaultDomain', 'VSANClusterGetPreferredFaultDomain', 'vim.version.version10', tuple(), (0 | F_OPTIONAL, 'vim.host.VSANCmmdsPreferredFaultDomainInfo', 'vim.host.VSANCmmdsPreferredFaultDomainInfo'), 'System.Read', None), ('witnessLeaveVsanCluster', 'VSANWitnessLeaveVsanCluster', 'vim.version.version10', tuple(), (0, 'void', 'void'), 'System.Read', None), ('getStretchedClusterCapability', 'VSANHostGetStretchedClusterCapability', 'vim.version.version10', tuple(), (0, 'vim.host.VSANStretchedClusterHostCapability', 'vim.host.VSANStretchedClusterHostCapability'), 'System.Read', None), ('removeUnicastAgent', 'VSANHostRemoveUnicastAgent', 'vim.version.version10', (('witnessAddress', 'string', 'vim.version.version10', 0, None), ('ignoreExistence', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL, None), ), (0, 'void', 'void'), 'System.Read', None), ('listUnicastAgent', 'VSANHostListUnicastAgent', 'vim.version.version10', tuple(), (0, 'string', 'string'), 'System.Read', None), ])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 2 other locations - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 8..8
salt/ext/vsan/vsanmgmtObjects.py on lines 14..14

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

CreateManagedType('vim.cluster.VsanVcStretchedClusterSystem', 'VimClusterVsanVcStretchedClusterSystem', 'vmodl.ManagedObject', 'vim.version.version10', [], [('isWitnessHost', 'VSANVcIsWitnessHost', 'vim.version.version10', (('host', 'vim.HostSystem', 'vim.version.version10', 0, None), ), (0, 'boolean', 'boolean'), 'System.Read', None), ('setPreferredFaultDomain', 'VSANVcSetPreferredFaultDomain', 'vim.version.version10', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version10', 0, None), ('preferredFd', 'string', 'vim.version.version10', 0, None), ('witnessHost', 'vim.HostSystem', 'vim.version.version10', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('getPreferredFaultDomain', 'VSANVcGetPreferredFaultDomain', 'vim.version.version10', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version10', 0, None), ), (0 | F_OPTIONAL, 'vim.cluster.VSANPreferredFaultDomainInfo', 'vim.cluster.VSANPreferredFaultDomainInfo'), 'System.Read', None), ('getWitnessHosts', 'VSANVcGetWitnessHosts', 'vim.version.version10', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version10', 0, None), ), (0 | F_OPTIONAL, 'vim.cluster.VSANWitnessHostInfo[]', 'vim.cluster.VSANWitnessHostInfo[]'), 'System.Read', None), ('retrieveStretchedClusterVcCapability', 'VSANVcRetrieveStretchedClusterVcCapability', 'vim.version.version10', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version10', 0, None), ('verifyAllConnected', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL, None), ), (0 | F_OPTIONAL, 'vim.cluster.VSANStretchedClusterCapability[]', 'vim.cluster.VSANStretchedClusterCapability[]'), 'System.Read', None), ('convertToStretchedCluster', 'VSANVcConvertToStretchedCluster', 'vim.version.version10', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version10', 0, None), ('faultDomainConfig', 'vim.cluster.VSANStretchedClusterFaultDomainConfig', 'vim.version.version10', 0, None), ('witnessHost', 'vim.HostSystem', 'vim.version.version10', 0, None), ('preferredFd', 'string', 'vim.version.version10', 0, None), ('diskMapping', 'vim.vsan.host.DiskMapping', 'vim.version.version10', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ('removeWitnessHost', 'VSANVcRemoveWitnessHost', 'vim.version.version10', (('cluster', 'vim.ClusterComputeResource', 'vim.version.version10', 0, None), ('witnessHost', 'vim.HostSystem', 'vim.version.version10', 0 | F_OPTIONAL, None), ('witnessAddress', 'string', 'vim.version.version10', 0 | F_OPTIONAL, None), ), (0, 'vim.Task', 'vim.Task'), 'System.Read', None), ])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 2 other locations - About 1 hr to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 7..7
salt/ext/vsan/vsanmgmtObjects.py on lines 8..8

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

CreateDataType('vim.cluster.VsanHostHealthSystemVersionResult', 'VsanHostHealthSystemVersionResult', 'vmodl.DynamicData', 'vim.version.version9', [('hostname', 'string', 'vim.version.version9', 0), ('version', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('error', 'vmodl.MethodFault', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 3 other locations - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 62..62
salt/ext/vsan/vsanmgmtObjects.py on lines 73..73
salt/ext/vsan/vsanmgmtObjects.py on lines 88..88

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

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.cluster.VsanPerfThreshold', 'VsanPerfThreshold', 'vmodl.DynamicData', 'vim.version.version9', [('direction', 'vim.cluster.VsanPerfThresholdDirectionType', 'vim.version.version9', 0), ('yellow', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('red', 'string', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 3 other locations - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 62..62
salt/ext/vsan/vsanmgmtObjects.py on lines 73..73
salt/ext/vsan/vsanmgmtObjects.py on lines 77..77

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

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.cluster.VsanPerfEntityMetricCSV', 'VsanPerfEntityMetricCSV', 'vmodl.DynamicData', 'vim.version.version9', [('entityRefId', 'string', 'vim.version.version9', 0), ('sampleInfo', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('value', 'vim.cluster.VsanPerfMetricSeriesCSV[]', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 3 other locations - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 73..73
salt/ext/vsan/vsanmgmtObjects.py on lines 77..77
salt/ext/vsan/vsanmgmtObjects.py on lines 88..88

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

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

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

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

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

Refactorings

Further Reading

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

CreateDataType('vim.host.VSANStretchedClusterHostInfo', 'VimHostVSANStretchedClusterHostInfo', 'vmodl.DynamicData', 'vim.version.version10', [('nodeInfo', 'vim.host.VSANCmmdsNodeInfo', 'vim.version.version10', 0), ('faultDomainInfo', 'vim.host.VSANCmmdsFaultDomainInfo', 'vim.version.version10', 0 | F_OPTIONAL), ('preferredFaultDomainInfo', 'vim.host.VSANCmmdsPreferredFaultDomainInfo', 'vim.version.version10', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 3 other locations - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 62..62
salt/ext/vsan/vsanmgmtObjects.py on lines 77..77
salt/ext/vsan/vsanmgmtObjects.py on lines 88..88

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

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

CreateDataType('vim.cluster.VsanClusterProactiveTestResult', 'VsanClusterProactiveTestResult', 'vmodl.DynamicData', 'vim.version.version9', [('overallStatus', 'string', 'vim.version.version9', 0), ('overallStatusDescription', 'string', 'vim.version.version9', 0), ('timestamp', 'vmodl.DateTime', 'vim.version.version9', 0), ('healthTest', 'vim.cluster.VsanClusterHealthTest', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 2 other locations - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 96..96
salt/ext/vsan/vsanmgmtObjects.py on lines 99..99

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

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

CreateDataType('vim.vsan.host.DiskMapInfoEx', 'VimVsanHostDiskMapInfoEx', 'vmodl.DynamicData', 'vim.version.version10', [('mapping', 'vim.vsan.host.DiskMapping', 'vim.version.version10', 0), ('isMounted', 'boolean', 'vim.version.version10', 0), ('isAllFlash', 'boolean', 'vim.version.version10', 0), ('isDataEfficiency', 'boolean', 'vim.version.version10', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 2 other locations - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 99..99
salt/ext/vsan/vsanmgmtObjects.py on lines 116..116

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

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

CreateDataType('vim.cluster.VsanPerfEntityType', 'VsanPerfEntityType', 'vmodl.DynamicData', 'vim.version.version9', [('name', 'string', 'vim.version.version9', 0), ('id', 'string', 'vim.version.version9', 0), ('graphs', 'vim.cluster.VsanPerfGraph[]', 'vim.version.version9', 0), ('description', 'string', 'vim.version.version9', 0 | F_OPTIONAL)])
Severity: Major
Found in salt/ext/vsan/vsanmgmtObjects.py and 2 other locations - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 96..96
salt/ext/vsan/vsanmgmtObjects.py on lines 116..116

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

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

CreateDataType('vim.cluster.VsanClusterHealthSystemObjectsRepairResult', 'VsanClusterHealthSystemObjectsRepairResult', 'vmodl.DynamicData', 'vim.version.version9', [('inRepairingQueueObjects', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL), ('failedRepairObjects', 'vim.host.VsanFailedRepairObjectResult[]', 'vim.version.version9', 0 | F_OPTIONAL), ('issueFound', 'boolean', 'vim.version.version9', 0)])
Severity: Minor
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 68..68

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

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

CreateDataType('vim.cluster.VsanClusterHealthSystemVersionResult', 'VsanClusterHealthSystemVersionResult', 'vmodl.DynamicData', 'vim.version.version9', [('hostResults', 'vim.cluster.VsanHostHealthSystemVersionResult[]', 'vim.version.version9', 0 | F_OPTIONAL), ('vcVersion', 'string', 'vim.version.version9', 0 | F_OPTIONAL), ('issueFound', 'boolean', 'vim.version.version9', 0)])
Severity: Minor
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 46..46

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

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

CreateDataType('vim.vsan.host.DiskMappingCreationSpec', 'VimVsanHostDiskMappingCreationSpec', 'vmodl.DynamicData', 'vim.version.version10', [('host', 'vim.HostSystem', 'vim.version.version10', 0), ('cacheDisks', 'vim.host.ScsiDisk[]', 'vim.version.version10', 0 | F_OPTIONAL), ('capacityDisks', 'vim.host.ScsiDisk[]', 'vim.version.version10', 0), ('creationType', 'vim.vsan.host.DiskMappingCreationType', 'vim.version.version10', 0)])
Severity: Minor
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 71..71

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

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

CreateDataType('vim.cluster.VsanHostDiskMapping', 'VimClusterVsanHostDiskMapping', 'vmodl.DynamicData', 'vim.version.version10', [('host', 'vim.HostSystem', 'vim.version.version10', 0), ('cacheDisks', 'vim.host.ScsiDisk[]', 'vim.version.version10', 0 | F_OPTIONAL), ('capacityDisks', 'vim.host.ScsiDisk[]', 'vim.version.version10', 0), ('type', 'vim.cluster.VsanDiskGroupCreationType', 'vim.version.version10', 0)])
Severity: Minor
Found in salt/ext/vsan/vsanmgmtObjects.py and 1 other location - About 40 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 54..54

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

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

CreateManagedType('vim.cluster.VsanClusterHealthSystem', 'VsanClusterHealthSystem', 'vmodl.ManagedObject', 'vim.version.version9', [], [('queryPhysicalDiskHealthSummary', 'VsanQueryClusterPhysicalDiskHealthSummary', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ), (0, 'vim.host.VsanPhysicalDiskHealthSummary[]', 'vim.host.VsanPhysicalDiskHealthSummary[]'), 'System.Read', None), ('queryClusterNetworkPerfTest', 'VsanQueryClusterNetworkPerfTest', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ('multicast', 'boolean', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterNetworkLoadTestResult', 'vim.cluster.VsanClusterNetworkLoadTestResult'), 'System.Read', None), ('queryAdvCfgSync', 'VsanQueryClusterAdvCfgSync', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterAdvCfgSyncResult[]', 'vim.cluster.VsanClusterAdvCfgSyncResult[]'), 'System.Read', None), ('repairClusterImmediateObjects', 'VsanRepairClusterImmediateObjects', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ('uuids', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.cluster.VsanClusterHealthSystemObjectsRepairResult', 'vim.cluster.VsanClusterHealthSystemObjectsRepairResult'), 'System.Read', None), ('queryVerifyClusterNetworkSettings', 'VsanQueryVerifyClusterNetworkSettings', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterNetworkHealthResult', 'vim.cluster.VsanClusterNetworkHealthResult'), 'System.Read', None), ('queryClusterCreateVmHealthTest', 'VsanQueryClusterCreateVmHealthTest', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ('timeout', 'int', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterCreateVmHealthTestResult', 'vim.cluster.VsanClusterCreateVmHealthTestResult'), 'System.Read', None), ('queryClusterHealthSystemVersions', 'VsanQueryClusterHealthSystemVersions', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterHealthSystemVersionResult', 'vim.cluster.VsanClusterHealthSystemVersionResult'), 'System.Read', None), ('getClusterHclInfo', 'VsanClusterGetHclInfo', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterHclInfo', 'vim.cluster.VsanClusterHclInfo'), 'System.Read', None), ('queryCheckLimits', 'VsanQueryClusterCheckLimits', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterLimitHealthResult', 'vim.cluster.VsanClusterLimitHealthResult'), 'System.Read', None), ('queryCaptureVsanPcap', 'VsanQueryClusterCaptureVsanPcap', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ('duration', 'int', 'vim.version.version9', 0, None), ('vmknic', 'vim.cluster.VsanClusterHostVmknicMapping[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ('includeRawPcap', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL, None), ('includeIgmp', 'boolean', 'vim.version.version9', 0 | F_OPTIONAL, None), ('cmmdsMsgTypeFilter', 'string[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ('cmmdsPorts', 'int[]', 'vim.version.version9', 0 | F_OPTIONAL, None), ('clusterUuid', 'string', 'vim.version.version9', 0 | F_OPTIONAL, None), ), (0, 'vim.cluster.VsanVsanClusterPcapResult', 'vim.cluster.VsanVsanClusterPcapResult'), 'System.Read', None), ('checkClusterClomdLiveness', 'VsanCheckClusterClomdLiveness', 'vim.version.version9', (('hosts', 'string[]', 'vim.version.version9', 0, None), ('esxRootPassword', 'string', 'vim.version.version9', 0, None), ), (0, 'vim.cluster.VsanClusterClomdLivenessResult', 'vim.cluster.VsanClusterClomdLivenessResult'), 'System.Read', None), ])
Severity: Minor
Found in salt/ext/vsan/vsanmgmtObjects.py and 2 other locations - About 30 mins to fix
salt/ext/vsan/vsanmgmtObjects.py on lines 7..7
salt/ext/vsan/vsanmgmtObjects.py on lines 14..14

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

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

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

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

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

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status