blob: c6ff1487d3e898b12e0c0d9e3b1607956f621e7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
working_directory = "/tmp"
cl_release=node['version'].split('.')[0..2].join('.').split('-')[0]
printf("\033[33mcl_release=[%s]\n\033[0m", cl_release)
cookbook_file "/tmp/sdctool.tar" do
source "sdctool.tar"
end
bash "extract sdctool.tar" do
cwd "#{working_directory}"
code <<-EOH
tar xvf /tmp/sdctool.tar
EOH
end
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} "
./sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir}
EOH
end
|