crowbar/crowbar-openstack

View on GitHub

Showing 748 of 748 total issues

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

keystone_register "give nova user access" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/nova/recipes/api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give glance user access" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/glance/recipes/common.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give barbican user access as creator" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/barbican/recipes/api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give sahara user access" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/sahara/recipes/api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give barbican user access as audit" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/barbican/recipes/api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give watcher user access" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/watcher/recipes/common.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228

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

keystone_register "give designate user access" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/designate/recipes/api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give ec2 user access" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/ec2-api/recipes/ec2api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give magnum user access" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/magnum/recipes/api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give cinder user access" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/cinder/recipes/api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give barbican user access as key-manager:service-admin" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/barbican/recipes/api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 188..198
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 18 locations. Consider refactoring.
Open

keystone_register "give barbican user access as observer" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Major
Found in chef/cookbooks/barbican/recipes/api.rb and 17 other locations - About 50 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 116..126
chef/cookbooks/barbican/recipes/api.rb on lines 140..150
chef/cookbooks/barbican/recipes/api.rb on lines 164..174
chef/cookbooks/barbican/recipes/api.rb on lines 212..222
chef/cookbooks/cinder/recipes/api.rb on lines 75..85
chef/cookbooks/designate/recipes/api.rb on lines 72..82
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 109..119
chef/cookbooks/glance/recipes/common.rb on lines 107..117
chef/cookbooks/heat/recipes/server.rb on lines 148..158
chef/cookbooks/magnum/recipes/api.rb on lines 61..71
chef/cookbooks/manila/recipes/api.rb on lines 67..77
chef/cookbooks/neutron/recipes/api_register.rb on lines 55..65
chef/cookbooks/nova/recipes/api.rb on lines 70..80
chef/cookbooks/octavia/recipes/keystone.rb on lines 56..66
chef/cookbooks/sahara/recipes/api.rb on lines 60..70
chef/cookbooks/swift/recipes/proxy.rb on lines 218..228
chef/cookbooks/watcher/recipes/common.rb on lines 106..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 4 locations. Consider refactoring.
Open

if node[:cinder][:resource_limits] && node[:cinder][:resource_limits][service]
  limits = node[:cinder][:resource_limits][service]
  action = limits.values.any? ? :create : :delete
  utils_systemd_override_limits "Resource limits for #{service}" do
    service_name service
Severity: Major
Found in chef/cookbooks/cinder/recipes/api.rb and 3 other locations - About 50 mins to fix
chef/cookbooks/cinder/recipes/scheduler.rb on lines 25..33
chef/cookbooks/nova/recipes/api.rb on lines 148..156
chef/cookbooks/nova/recipes/compute.rb on lines 460..468

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

  when node["platform_version"].to_f < 12.0
    default["postgresql"]["version"] = "9.1"
    default["postgresql"]["client"]["packages"] = [
      "postgresql91",
      "ruby2.1-rubygem-pg"
Severity: Major
Found in chef/cookbooks/postgresql/attributes/default.rb and 2 other locations - About 50 mins to fix
chef/cookbooks/postgresql/attributes/default.rb on lines 135..139
chef/cookbooks/postgresql/attributes/default.rb on lines 148..155

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

keystone_register "register monasca api endpoint" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Minor
Found in chef/cookbooks/monasca/recipes/server.rb and 1 other location - About 50 mins to fix
chef/cookbooks/monasca/recipes/server.rb on lines 147..159

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

      iptables -I VNCBLOCK -s #{nova_controller_ip} -j ACCEPT
    EOH
    not_if "iptables -nL VNCBLOCK | grep -q #{nova_controller_ip}"
  end
end
Severity: Major
Found in chef/cookbooks/nova/recipes/compute.rb and 3 other locations - About 50 mins to fix
chef/cookbooks/cinder/recipes/api.rb on lines 186..194
chef/cookbooks/cinder/recipes/scheduler.rb on lines 25..33
chef/cookbooks/nova/recipes/api.rb on lines 148..156

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

if node[:nova][:resource_limits] && node[:nova][:resource_limits][service]
  limits = node[:nova][:resource_limits][service]
  action = limits.values.any? ? :create : :delete
  utils_systemd_override_limits "Resource limits for #{service}" do
    service_name service
Severity: Major
Found in chef/cookbooks/nova/recipes/api.rb and 3 other locations - About 50 mins to fix
chef/cookbooks/cinder/recipes/api.rb on lines 186..194
chef/cookbooks/cinder/recipes/scheduler.rb on lines 25..33
chef/cookbooks/nova/recipes/compute.rb on lines 460..468

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

keystone_register "register logs-search endpoint" do
  protocol keystone_settings["protocol"]
  insecure keystone_settings["insecure"]
  host keystone_settings["internal_url_host"]
  port keystone_settings["admin_port"]
Severity: Minor
Found in chef/cookbooks/monasca/recipes/server.rb and 1 other location - About 50 mins to fix
chef/cookbooks/monasca/recipes/server.rb on lines 69..81

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

if node[:cinder][:resource_limits] && node[:cinder][:resource_limits][service]
  limits = node[:cinder][:resource_limits][service]
  action = limits.values.any? ? :create : :delete
  utils_systemd_override_limits "Resource limits for #{service}" do
    service_name service
Severity: Major
Found in chef/cookbooks/cinder/recipes/scheduler.rb and 3 other locations - About 50 mins to fix
chef/cookbooks/cinder/recipes/api.rb on lines 186..194
chef/cookbooks/nova/recipes/api.rb on lines 148..156
chef/cookbooks/nova/recipes/compute.rb on lines 460..468

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

  when node["platform_version"].to_f == 12.0
    default["postgresql"]["version"] = "9.3"
    default["postgresql"]["client"]["packages"] = [
      "postgresql93",
      "ruby2.1-rubygem-pg"
Severity: Major
Found in chef/cookbooks/postgresql/attributes/default.rb and 2 other locations - About 50 mins to fix
chef/cookbooks/postgresql/attributes/default.rb on lines 135..139
chef/cookbooks/postgresql/attributes/default.rb on lines 140..147

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

Severity
Category
Status
Source
Language