crowbar/crowbar-openstack

View on GitHub
chef/cookbooks/octavia/recipes/keystone.rb

Summary

Maintainability
C
7 hrs
Test Coverage

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

keystone_register "register octavia endpoint" 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/octavia/recipes/keystone.rb and 11 other locations - About 1 hr to fix
chef/cookbooks/cinder/recipes/api.rb on lines 101..116
chef/cookbooks/cinder/recipes/api.rb on lines 132..147
chef/cookbooks/cinder/recipes/api.rb on lines 163..178
chef/cookbooks/designate/recipes/api.rb on lines 98..110
chef/cookbooks/magnum/recipes/api.rb on lines 86..101
chef/cookbooks/manila/recipes/api.rb on lines 93..108
chef/cookbooks/manila/recipes/api.rb on lines 125..140
chef/cookbooks/neutron/recipes/api_register.rb on lines 81..93
chef/cookbooks/nova/recipes/api.rb on lines 109..124
chef/cookbooks/nova/recipes/api.rb on lines 127..142
chef/cookbooks/sahara/recipes/api.rb on lines 86..98

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

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

keystone_register "register octavia user" 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/octavia/recipes/keystone.rb and 13 other locations - About 55 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 103..113
chef/cookbooks/cinder/recipes/api.rb on lines 62..72
chef/cookbooks/designate/recipes/api.rb on lines 59..69
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 96..106
chef/cookbooks/glance/recipes/common.rb on lines 94..104
chef/cookbooks/heat/recipes/server.rb on lines 135..145
chef/cookbooks/magnum/recipes/api.rb on lines 48..58
chef/cookbooks/manila/recipes/api.rb on lines 54..64
chef/cookbooks/neutron/recipes/api_register.rb on lines 42..52
chef/cookbooks/nova/recipes/api.rb on lines 57..67
chef/cookbooks/sahara/recipes/api.rb on lines 47..57
chef/cookbooks/swift/recipes/proxy.rb on lines 205..215
chef/cookbooks/watcher/recipes/common.rb on lines 93..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 44.

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 octavia 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/octavia/recipes/keystone.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/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 19 locations. Consider refactoring.
Open

keystone_register "register octavia service" 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/octavia/recipes/keystone.rb and 18 other locations - About 40 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 74..84
chef/cookbooks/cinder/recipes/api.rb on lines 88..98
chef/cookbooks/cinder/recipes/api.rb on lines 119..129
chef/cookbooks/cinder/recipes/api.rb on lines 150..160
chef/cookbooks/designate/recipes/api.rb on lines 85..95
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 123..133
chef/cookbooks/ec2-api/recipes/ec2api.rb on lines 152..162
chef/cookbooks/glance/recipes/api.rb on lines 148..158
chef/cookbooks/heat/recipes/server.rb on lines 245..255
chef/cookbooks/heat/recipes/server.rb on lines 274..284
chef/cookbooks/manila/recipes/api.rb on lines 80..90
chef/cookbooks/manila/recipes/api.rb on lines 112..122
chef/cookbooks/neutron/recipes/api_register.rb on lines 68..78
chef/cookbooks/nova/recipes/api.rb on lines 83..93
chef/cookbooks/nova/recipes/api.rb on lines 96..106
chef/cookbooks/nova/recipes/placement_api.rb on lines 69..79
chef/cookbooks/sahara/recipes/api.rb on lines 73..83
chef/cookbooks/watcher/recipes/server.rb on lines 74..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 38.

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

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

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

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

Refactorings

Further Reading

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

keystone_register "add load-balancer_member role for octavia" 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/octavia/recipes/keystone.rb and 9 other locations - About 35 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 129..137
chef/cookbooks/barbican/recipes/api.rb on lines 153..161
chef/cookbooks/barbican/recipes/api.rb on lines 177..185
chef/cookbooks/barbican/recipes/api.rb on lines 201..209
chef/cookbooks/heat/recipes/server.rb on lines 161..169
chef/cookbooks/octavia/recipes/keystone.rb on lines 97..105
chef/cookbooks/octavia/recipes/keystone.rb on lines 108..116
chef/cookbooks/octavia/recipes/keystone.rb on lines 130..138
chef/cookbooks/octavia/recipes/keystone.rb on lines 141..149

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

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

keystone_register "add load-balancer_admin role for octavia" 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/octavia/recipes/keystone.rb and 9 other locations - About 35 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 129..137
chef/cookbooks/barbican/recipes/api.rb on lines 153..161
chef/cookbooks/barbican/recipes/api.rb on lines 177..185
chef/cookbooks/barbican/recipes/api.rb on lines 201..209
chef/cookbooks/heat/recipes/server.rb on lines 161..169
chef/cookbooks/octavia/recipes/keystone.rb on lines 97..105
chef/cookbooks/octavia/recipes/keystone.rb on lines 108..116
chef/cookbooks/octavia/recipes/keystone.rb on lines 119..127
chef/cookbooks/octavia/recipes/keystone.rb on lines 130..138

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

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

keystone_register "add load-balancer_global_observer role for octavia" 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/octavia/recipes/keystone.rb and 9 other locations - About 35 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 129..137
chef/cookbooks/barbican/recipes/api.rb on lines 153..161
chef/cookbooks/barbican/recipes/api.rb on lines 177..185
chef/cookbooks/barbican/recipes/api.rb on lines 201..209
chef/cookbooks/heat/recipes/server.rb on lines 161..169
chef/cookbooks/octavia/recipes/keystone.rb on lines 97..105
chef/cookbooks/octavia/recipes/keystone.rb on lines 119..127
chef/cookbooks/octavia/recipes/keystone.rb on lines 130..138
chef/cookbooks/octavia/recipes/keystone.rb on lines 141..149

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

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

keystone_register "add load-balancer_observer role for octavia" 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/octavia/recipes/keystone.rb and 9 other locations - About 35 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 129..137
chef/cookbooks/barbican/recipes/api.rb on lines 153..161
chef/cookbooks/barbican/recipes/api.rb on lines 177..185
chef/cookbooks/barbican/recipes/api.rb on lines 201..209
chef/cookbooks/heat/recipes/server.rb on lines 161..169
chef/cookbooks/octavia/recipes/keystone.rb on lines 108..116
chef/cookbooks/octavia/recipes/keystone.rb on lines 119..127
chef/cookbooks/octavia/recipes/keystone.rb on lines 130..138
chef/cookbooks/octavia/recipes/keystone.rb on lines 141..149

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

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

keystone_register "add load-balancer_quota_admin role for octavia" 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/octavia/recipes/keystone.rb and 9 other locations - About 35 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 129..137
chef/cookbooks/barbican/recipes/api.rb on lines 153..161
chef/cookbooks/barbican/recipes/api.rb on lines 177..185
chef/cookbooks/barbican/recipes/api.rb on lines 201..209
chef/cookbooks/heat/recipes/server.rb on lines 161..169
chef/cookbooks/octavia/recipes/keystone.rb on lines 97..105
chef/cookbooks/octavia/recipes/keystone.rb on lines 108..116
chef/cookbooks/octavia/recipes/keystone.rb on lines 119..127
chef/cookbooks/octavia/recipes/keystone.rb on lines 141..149

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

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

keystone_register "octavia api wakeup keystone" 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/octavia/recipes/keystone.rb and 13 other locations - About 30 mins to fix
chef/cookbooks/barbican/recipes/api.rb on lines 63..70
chef/cookbooks/ceilometer/recipes/server.rb on lines 114..121
chef/cookbooks/cinder/recipes/api.rb on lines 52..59
chef/cookbooks/designate/recipes/api.rb on lines 49..56
chef/cookbooks/glance/recipes/common.rb on lines 84..91
chef/cookbooks/heat/recipes/server.rb on lines 125..132
chef/cookbooks/magnum/recipes/api.rb on lines 38..45
chef/cookbooks/manila/recipes/api.rb on lines 44..51
chef/cookbooks/neutron/recipes/api_register.rb on lines 32..39
chef/cookbooks/nova/recipes/api.rb on lines 47..54
chef/cookbooks/sahara/recipes/api.rb on lines 37..44
chef/cookbooks/swift/recipes/proxy.rb on lines 182..189
chef/cookbooks/watcher/recipes/common.rb on lines 83..90

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

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