From 004fb6486e9f31a2f8398051c77dcd8ce86e20d2 Mon Sep 17 00:00:00 2001 From: "k.kedron" Date: Tue, 9 Jul 2019 13:02:08 +0200 Subject: Corrected typos in chef scripts. Corrected typos and checkstyles. Issue-ID: SDC-2424 Signed-off-by: Krystian Kedron Change-Id: If2464645dad7da3fa7706e35e4ccace3ece6aeb4 --- .../cassandra-actions/recipes/03-schemaCreation.rb | 14 +++++----- .../recipes/04-importComformance.rb | 20 --------------- .../recipes/04-importConformance.rb | 20 +++++++++++++++ .../chef-solo/roles/cassandra-actions.json | 2 +- .../recipes/01-configureCassandra.rb | 30 +++++++++++----------- .../cassandra-actions/recipes/02-changeCSpass.rb | 6 ++--- 6 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importComformance.rb create mode 100644 asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb index 4de50f6492..b046b0da51 100644 --- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb +++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb @@ -18,12 +18,12 @@ template "janusgraph.properties" do source "janusgraph.properties.erb" mode "0755" variables({ - :DC_NAME => node['cassandra']['datacenter_name'], - :cassandra_ip => node['Nodes']['CS'].first, - :cassandra_pwd => node['cassandra'][:cassandra_password], - :cassandra_usr => node['cassandra'][:cassandra_user], + :DC_NAME => node['cassandra']['datacenter_name'], + :cassandra_ip => node['Nodes']['CS'].first, + :cassandra_pwd => node['cassandra'][:cassandra_password], + :cassandra_usr => node['cassandra'][:cassandra_user], :janusgraph_connection_timeout => node['cassandra']['janusgraph_connection_timeout'], - :replication_factor => node['cassandra']['replication_factor'] + :replication_factor => node['cassandra']['replication_factor'] }) end @@ -58,7 +58,7 @@ template "/tmp/sdctool/config/elasticsearch.yml" do }) end -bash "excuting-schema-creation" do +bash "executing-schema-creation" do code <<-EOH cd /tmp chmod +x /tmp/sdctool/scripts/schemaCreation.sh @@ -66,7 +66,7 @@ bash "excuting-schema-creation" do EOH end -bash "excuting-janusGraphSchemaCreation.sh" do +bash "executing-janusGraphSchemaCreation.sh" do code <<-EOH chmod +x /tmp/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/sdctool/config diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importComformance.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importComformance.rb deleted file mode 100644 index 188aa1d031..0000000000 --- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importComformance.rb +++ /dev/null @@ -1,20 +0,0 @@ -working_directory = "/tmp" -cl_release=node['version'].split('.')[0..2].join('.').split('-')[0] -printf("\033[33mcl_release=[%s]\n\033[0m", cl_release) - - - -bash "import-Comformance" do - cwd "#{working_directory}" - code <<-EOH - conf_dir=/tmp/sdctool/config - tosca_dir=/tmp/sdctool/tosca - - cl_version=`grep 'toscaConformanceLevel:' $conf_dir/configuration.yaml |awk '{print $2}'` - - cd /tmp/sdctool/scripts - /bin/chmod +x sdcSchemaFileImport.sh - echo "execute /tmp/sdctool/scripts/sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap" - ./sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap - EOH -end \ No newline at end of file diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb new file mode 100644 index 0000000000..0490c89668 --- /dev/null +++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb @@ -0,0 +1,20 @@ +working_directory = "/tmp" +cl_release=node['version'].split('.')[0..2].join('.').split('-')[0] +printf("\033[33mcl_release=[%s]\n\033[0m", cl_release) + + + +bash "import-Conformance" do + cwd "#{working_directory}" + code <<-EOH + conf_dir=/tmp/sdctool/config + tosca_dir=/tmp/sdctool/tosca + + cl_version=`grep 'toscaConformanceLevel:' $conf_dir/configuration.yaml |awk '{print $2}'` + + cd /tmp/sdctool/scripts + /bin/chmod +x sdcSchemaFileImport.sh + echo "execute /tmp/sdctool/scripts/sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap" + ./sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap + EOH +end \ No newline at end of file diff --git a/asdctool/sdc-cassandra-init/chef-solo/roles/cassandra-actions.json b/asdctool/sdc-cassandra-init/chef-solo/roles/cassandra-actions.json index b06e4872e3..5104d1fcb9 100644 --- a/asdctool/sdc-cassandra-init/chef-solo/roles/cassandra-actions.json +++ b/asdctool/sdc-cassandra-init/chef-solo/roles/cassandra-actions.json @@ -12,7 +12,7 @@ "run_list": [ "recipe[cassandra-actions::01-createCsUser]", "recipe[cassandra-actions::03-schemaCreation]", - "recipe[cassandra-actions::04-importComformance]" + "recipe[cassandra-actions::04-importConformance]" ], "env_run_lists": { diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb index 5b05e9be57..21d43b18ef 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb @@ -20,20 +20,20 @@ template "cassandra-yaml-config" do owner "cassandra" group "cassandra" mode "0755" - variables ({ - :cassandra_port => node['cassandra']['cassandra_port'], - :cassandra_cluster => cluster_name, - :cassandra_data_dir => node['cassandra'][:data_dir], - :cassandra_commitlog_dir => node['cassandra'][:commitlog_dir], - :cassandra_cache_dir => node['cassandra'][:cache_dir], - :seeds_address => cas_ips, - :listen_address => application_host, - :broadcast_address => application_host, - :broadcast_rpc_address => application_host, - :rpc_address => "0.0.0.0", - :num_tokens => node['cassandra'][:num_tokens], - :internode_encryption => "none", - :cassandra_truststore_dir => "/etc/cassandra/cs_trust" + variables({ + :cassandra_port => node['cassandra']['cassandra_port'], + :cassandra_cluster => cluster_name, + :cassandra_data_dir => node['cassandra'][:data_dir], + :cassandra_commitlog_dir => node['cassandra'][:commitlog_dir], + :cassandra_cache_dir => node['cassandra'][:cache_dir], + :seeds_address => cas_ips, + :listen_address => application_host, + :broadcast_address => application_host, + :broadcast_rpc_address => application_host, + :rpc_address => "0.0.0.0", + :num_tokens => node['cassandra'][:num_tokens], + :internode_encryption => "none", + :cassandra_truststore_dir => "/etc/cassandra/cs_trust" }) end @@ -44,7 +44,7 @@ template "cassandra-rackdc.properties" do owner "cassandra" group "cassandra" mode "0755" - variables ({ + variables({ :dc => node['cassandra']['datacenter_name'], :rack => "Rack"+"#{rackNum}" }) diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb index ae582cfe25..8ebdeef7dd 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb @@ -11,9 +11,9 @@ template "/tmp/change_cassandra_pass.sh" do sensitive true mode 0755 variables({ - :cassandra_ip => application_host, - :cassandra_pwd => ENV['CS_PASSWORD'], - :cassandra_port => node['cassandra']['cassandra_port'] + :cassandra_ip => application_host, + :cassandra_pwd => ENV['CS_PASSWORD'], + :cassandra_port => node['cassandra']['cassandra_port'] }) end -- cgit 1.2.3-korg