1 working_directory = "/tmp"
2 cl_release=node['version'].split('.')[0..2].join('.').split('-')[0]
3 printf("\033[33mcl_release=[%s]\n\033[0m", cl_release)
5 cookbook_file "/tmp/sdctool.tar" do
9 bash "extract sdctool.tar" do
10 cwd "#{working_directory}"
12 tar xvf /tmp/sdctool.tar
16 cookbook_file "/tmp/sdctool/config/SDC.zip" do
17 source "SDC-#{cl_release}.zip"
20 bash "import-Comformance" do
21 cwd "#{working_directory}"
23 conf_dir=/tmp/sdctool/config
24 schema_file_name=SDC.zip
26 cl_version=`grep 'toscaConformanceLevel:' $conf_dir/configuration.yaml |awk '{print $2}'`
28 cd /tmp/sdctool/scripts
29 /bin/chmod +x sdcSchemaFileImport.sh
30 echo "execute /tmp/sdctool/scripts/sdcSchemaFileImport.sh $conf_dir/$schema_file_name #{cl_release} ${cl_version} ${conf_dir} "
31 ./sdcSchemaFileImport.sh ${conf_dir}/${schema_file_name} #{cl_release} ${cl_version} ${conf_dir}