diff --git a/.rubocop.yml b/.rubocop.yml index 2c2b8b48..eacaebc9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,10 +4,10 @@ AllCops: - metadata.rb - attributes/** - spec/** + - recipes/** Excludes: - files/** - - recipes/** - templates/** # UTF-8 headers not generally in these files diff --git a/recipes/common.rb b/recipes/common.rb index 1d1c4d52..cec666c2 100644 --- a/recipes/common.rb +++ b/recipes/common.rb @@ -107,11 +107,11 @@ identity_admin_endpoint = endpoint 'identity-admin' auth_uri = ::URI.decode identity_endpoint.to_s db_user = node['openstack']['db']['network']['username'] -db_pass = get_password "db", 'neutron' +db_pass = get_password 'db', 'neutron' sql_connection = db_uri('network', db_user, db_pass) api_endpoint = endpoint 'network-api' -service_pass = get_password "service", 'openstack-network' +service_pass = get_password 'service', 'openstack-network' if node['openstack']['network']['api']['bind_interface'].nil? bind_address = api_endpoint.host diff --git a/recipes/l3_agent.rb b/recipes/l3_agent.rb index 846071d4..ead052dc 100644 --- a/recipes/l3_agent.rb +++ b/recipes/l3_agent.rb @@ -57,7 +57,7 @@ template '/etc/neutron/l3_agent.ini' do notifies :restart, 'service[neutron-l3-agent]', :immediately end -unless ['nicira', 'plumgrid', 'bigswitch', 'linuxbridge'].include?(main_plugin) +unless %w(nicira plumgrid bigswitch linuxbridge).include?(main_plugin) # See http://docs.openstack.org/trunk/openstack-network/admin/content/install_neutron-l3.html ext_bridge = node['openstack']['network']['l3']['external_network_bridge'] ext_bridge_iface = node['openstack']['network']['l3']['external_network_bridge_interface'] diff --git a/recipes/server.rb b/recipes/server.rb index f66d3dfc..c6d6739c 100644 --- a/recipes/server.rb +++ b/recipes/server.rb @@ -43,7 +43,7 @@ end # Migrate network database # If the database has never migrated, make the current version of alembic_version to havana, # else migrate the database to latest version. -bash "migrate network database" do +bash 'migrate network database' do plugin_config_file = node['openstack']['network']['plugin_config_file'] migrate_command = "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file #{plugin_config_file}" code <<-EOF