core.rb 668 Bytes
Newer Older
1 2
use_inline_resources

Stefan Galinski's avatar
Stefan Galinski committed
3 4
action :add do
	new_resource.updated_by_last_action(false)
5
	# execute "#{node['typo3_solr']['solr']['solr_home']}/bin/solr create -c #{new_resource.name}"
6
	create_url = "http://localhost:8983/solr/admin/cores?action=CREATE&name=#{new_resource.name}&configSet=#{new_resource.config_directory}&schema=#{new_resource.language}/schema.xml&dataDir=../../data/#{new_resource.name}"
Stefan Galinski's avatar
Stefan Galinski committed
7 8 9 10 11 12
	puts create_url
	Net::HTTP.get_response(URI.parse(create_url))
	new_resource.updated_by_last_action(true)
end

action :remove do
13
	execute "#{node['typo3_solr']['solr']['solr_home']}/bin/solr delete -c #{new_resource.name}"
Stefan Galinski's avatar
Stefan Galinski committed
14 15
	new_resource.updated_by_last_action(true)
end