cloudfoundry-community/bosh-cloudstack-cpi

View on GitHub

Showing 548 of 1,705 total issues

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

    create_data_type("vim.fault.OvfUnsupportedDeviceBackingInfo", "OvfUnsupportedDeviceBackingInfo", "vim.fault.OvfSystemFault", "vim.version.version5", [["elementName", "string", "vim.version.version5", {:optional => true}], ["instanceId", "string", "vim.version.version5", {:optional => true}], ["deviceName", "string", "vim.version.version5"], ["backingName", "string", "vim.version.version5", {:optional => true}]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 2 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1337..1337
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2100..2100

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

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

    create_data_type("vim.cluster.HostPowerAction", "ClusterHostPowerAction", "vim.cluster.Action", "vim.version.version2", [["operationType", "vim.cluster.HostPowerAction.OperationType", "vim.version.version2"], ["powerConsumptionWatt", "int", "vim.version.version2", {:optional => true}], ["cpuCapacityMHz", "int", "vim.version.version2", {:optional => true}], ["memCapacityMB", "int", "vim.version.version2", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 14 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 242..242
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 300..300
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 305..305
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 364..364
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 493..493
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 505..505
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1045..1045
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1100..1100
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1150..1150
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1350..1350
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1418..1418
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1518..1518
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1567..1567
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2289..2289

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

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

    create_data_type("vim.host.IpConfig", "HostIpConfig", "vmodl.DynamicData", "vim.version.version1", [["dhcp", "boolean", "vim.version.version1"], ["ipAddress", "string", "vim.version.version1", {:optional => true}], ["subnetMask", "string", "vim.version.version1", {:optional => true}], ["ipV6Config", "vim.host.IpConfig.IpV6AddressConfiguration", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 14 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 242..242
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 300..300
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 305..305
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 364..364
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 455..455
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 493..493
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 505..505
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1045..1045
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1100..1100
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1350..1350
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1418..1418
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1518..1518
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1567..1567
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2289..2289

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

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

    create_data_type("vim.dvs.HostMember.PnicSpec", "DistributedVirtualSwitchHostMemberPnicSpec", "vmodl.DynamicData", "vim.version.version5", [["pnicDevice", "string", "vim.version.version5"], ["uplinkPortKey", "string", "vim.version.version5", {:optional => true}], ["uplinkPortgroupKey", "string", "vim.version.version5", {:optional => true}], ["connectionCookie", "int", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 14 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 242..242
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 300..300
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 305..305
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 364..364
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 455..455
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 505..505
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1045..1045
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1100..1100
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1150..1150
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1350..1350
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1418..1418
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1518..1518
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1567..1567
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2289..2289

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

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

    create_data_type("vim.DistributedVirtualSwitch.OverlayInstanceConfigSpec", "DVSOverlayInstanceConfigSpec", "vmodl.DynamicData", "vim.version.dev", [["key", "string", "vim.version.dev", {:optional => true}], ["overlayClassName", "string", "vim.version.dev", {:optional => true}], ["depth", "int", "vim.version.dev", {:optional => true}], ["operation", "string", "vim.version.dev"]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1578..1578

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

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

    create_data_type("vim.host.FcoeConfig.FcoeSpecification", "FcoeConfigFcoeSpecification", "vmodl.DynamicData", "vim.version.version7", [["underlyingPnic", "string", "vim.version.version7"], ["priorityClass", "int", "vim.version.version7", {:optional => true}], ["sourceMac", "string", "vim.version.version7", {:optional => true}], ["vlanRange", "vim.host.FcoeConfig.VlanRange[]", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 14 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 242..242
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 300..300
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 305..305
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 364..364
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 455..455
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 493..493
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 505..505
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1045..1045
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1150..1150
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1350..1350
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1418..1418
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1518..1518
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1567..1567
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2289..2289

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

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

    create_data_type("vim.storageDrs.PodSelectionSpec.VmPodConfig", "VmPodConfigForPlacement", "vmodl.DynamicData", "vim.version.version7", [["storagePod", "vim.StoragePod", "vim.version.version7"], ["disk", "vim.storageDrs.PodSelectionSpec.DiskLocator[]", "vim.version.version7", {:optional => true}], ["vmConfig", "vim.storageDrs.VmConfigInfo", "vim.version.version7", {:optional => true}], ["interVmRule", "vim.cluster.RuleInfo[]", "vim.version.version7", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 14 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 242..242
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 300..300
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 305..305
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 364..364
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 455..455
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 493..493
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 505..505
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1045..1045
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1100..1100
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1150..1150
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1350..1350
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1418..1418
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1518..1518
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1567..1567

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

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

    create_data_type("vim.fault.OvfUnsupportedDeviceBackingOption", "OvfUnsupportedDeviceBackingOption", "vim.fault.OvfSystemFault", "vim.version.version5", [["elementName", "string", "vim.version.version5", {:optional => true}], ["instanceId", "string", "vim.version.version5", {:optional => true}], ["deviceName", "string", "vim.version.version5"], ["backingName", "string", "vim.version.version5", {:optional => true}]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 2 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1337..1337
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2099..2099

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

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

    create_data_type("vim.host.VirtualNic.Config", "HostVirtualNicConfig", "vmodl.DynamicData", "vim.version.version1", [["changeOperation", "string", "vim.version.version1", {:optional => true}], ["device", "string", "vim.version.version1", {:optional => true}], ["portgroup", "string", "vim.version.version1"], ["spec", "vim.host.VirtualNic.Specification", "vim.version.version1", {:optional => true}]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 2 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2099..2099
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2100..2100

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

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

      unless @options.has_key?('registry') &&
          @options['registry'].is_a?(Hash) &&
          @options['registry']['endpoint'] &&
          @options['registry']['user'] &&
          @options['registry']['password']
Severity: Minor
Found in bosh_openstack_cpi/lib/cloud/openstack/cloud.rb and 1 other location - About 25 mins to fix
bosh_cloudstack_cpi/lib/cloud/cloudstack/cloud.rb on lines 865..871

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

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

      unless @options.has_key?("registry") &&
          @options["registry"].is_a?(Hash) &&
          @options["registry"]["endpoint"] &&
          @options["registry"]["user"] &&
          @options["registry"]["password"]
Severity: Minor
Found in bosh_cloudstack_cpi/lib/cloud/cloudstack/cloud.rb and 1 other location - About 25 mins to fix
bosh_openstack_cpi/lib/cloud/openstack/cloud.rb on lines 909..915

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

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

    create_managed_type("vim.DiagnosticManager", "DiagnosticManager", "vmodl.ManagedObject", "vim.version.version1", nil, [["queryDescriptions", "QueryDescriptions", "vim.version.version1", [["host", "vim.HostSystem", "vim.version.version1", {:optional => true}, nil]], [{:optional => true}, "vim.DiagnosticManager.LogDescriptor[]", "vim.DiagnosticManager.LogDescriptor[]"], "Global.Diagnostics", nil], ["browse", "BrowseDiagnosticLog", "vim.version.version1", [["host", "vim.HostSystem", "vim.version.version1", {:optional => true}, nil], ["key", "string", "vim.version.version1", {}, nil], ["start", "int", "vim.version.version1", {:optional => true}, nil], ["lines", "int", "vim.version.version1", {:optional => true}, nil]], [{}, "vim.DiagnosticManager.LogHeader", "vim.DiagnosticManager.LogHeader"], "Global.Diagnostics", ["vim.fault.CannotAccessFile"]], ["generateLogBundles", "GenerateLogBundles_Task", "vim.version.version1", [["includeDefault", "boolean", "vim.version.version1", {}, nil], ["host", "vim.HostSystem[]", "vim.version.version1", {:optional => true}, nil], ["supportOptions", "vim.KeyValue[]", "vim.version.dev", {:optional => true}, nil]], [{:optional => true}, "vim.Task", "vim.DiagnosticManager.BundleInfo[]"], "Global.Diagnostics", ["vim.fault.LogBundlingFailed", "vim.fault.TaskInProgress"]]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2672..2672

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

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

    create_data_type("vim.host.MountInfo", "HostMountInfo", "vmodl.DynamicData", "vim.version.version1", [["path", "string", "vim.version.version1", {:optional => true}], ["accessMode", "string", "vim.version.version1"], ["mounted", "boolean", "vim.version.version7", {:optional => true}], ["accessible", "boolean", "vim.version.version2", {:optional => true}]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2294..2294

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

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

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

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

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

Refactorings

Further Reading

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

    def compare_security_groups(server, specified_sg_names)
      actual_sg_names = with_compute { server.security_groups }.collect { |sg| sg.name }

      unless actual_sg_names.sort == specified_sg_names.sort
        raise Bosh::Clouds::NotSupported,
Severity: Minor
Found in bosh_cloudstack_cpi/lib/cloud/cloudstack/cloud.rb and 1 other location - About 25 mins to fix
bosh_openstack_cpi/lib/cloud/openstack/cloud.rb on lines 828..834

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

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

    create_data_type("vim.vApp.VAppConfigInfo", "VAppConfigInfo", "vim.vApp.VmConfigInfo", "vim.version.version5", [["entityConfig", "vim.vApp.EntityConfigInfo[]", "vim.version.version5", {:optional => true}], ["annotation", "string", "vim.version.version5"], ["instanceUuid", "string", "vim.version.version6", {:optional => true}], ["managedBy", "vim.ext.ManagedByInfo", "vim.version.version7", {:optional => true}]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1201..1201

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

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

    create_data_type("vim.vm.FileLayoutEx", "VirtualMachineFileLayoutEx", "vmodl.DynamicData", "vim.version.version5", [["file", "vim.vm.FileLayoutEx.FileInfo[]", "vim.version.version5", {:optional => true}], ["disk", "vim.vm.FileLayoutEx.DiskLayout[]", "vim.version.version5", {:optional => true}], ["snapshot", "vim.vm.FileLayoutEx.SnapshotLayout[]", "vim.version.version5", {:optional => true}], ["timestamp", "vmodl.DateTime", "vim.version.version5"]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2399..2399

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

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

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

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

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

Refactorings

Further Reading

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

    def compare_security_groups(server, specified_sg_names)
      actual_sg_names = with_openstack { server.security_groups }.collect { |sg| sg.name }

      unless actual_sg_names.sort == specified_sg_names.sort
        raise Bosh::Clouds::NotSupported,
Severity: Minor
Found in bosh_openstack_cpi/lib/cloud/openstack/cloud.rb and 1 other location - About 25 mins to fix
bosh_cloudstack_cpi/lib/cloud/cloudstack/cloud.rb on lines 801..807

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

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

    create_data_type("vim.ResourcePool.ResourceUsage", "ResourcePoolResourceUsage", "vmodl.DynamicData", "vim.version.version1", [["reservationUsed", "long", "vim.version.version1"], ["reservationUsedForVm", "long", "vim.version.version1"], ["unreservedForPool", "long", "vim.version.version1"], ["unreservedForVm", "long", "vim.version.version1"], ["overallUsage", "long", "vim.version.version1"], ["maxUsage", "long", "vim.version.version1"]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 5 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 217..217
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1718..1718
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1721..1721
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1874..1874
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2480..2480

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

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

    create_data_type("vim.vm.device.VirtualDiskOption.SeSparseBackingOption", "VirtualDiskSeSparseBackingOption", "vim.vm.device.VirtualDeviceOption.FileBackingOption", "vim.version.dev", [["diskMode", "vim.option.ChoiceOption", "vim.version.dev"], ["writeThrough", "vim.option.BoolOption", "vim.version.dev"], ["growable", "boolean", "vim.version.dev"], ["hotGrowable", "boolean", "vim.version.dev"], ["uuid", "boolean", "vim.version.dev"], ["deltaDiskFormat", "vim.option.ChoiceOption", "vim.version.dev"]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 5 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 217..217
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1718..1718
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1833..1833
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1874..1874
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2480..2480

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

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

    create_data_type("vim.DiagnosticManager.LogDescriptor", "DiagnosticManagerLogDescriptor", "vmodl.DynamicData", "vim.version.version1", [["key", "string", "vim.version.version1"], ["fileName", "string", "vim.version.version1"], ["creator", "string", "vim.version.version1"], ["format", "string", "vim.version.version1"], ["mimeType", "string", "vim.version.version1"], ["info", "vim.Description", "vim.version.version1"]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 5 other locations - About 25 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1718..1718
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1721..1721
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1833..1833
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1874..1874
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2480..2480

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

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