def upload_manifest_for(label, id)
@manifests ||= []
return if @manifests.include? label
@manifests << label
filename = option_upload_manifests_from + '/' + label + '.zip'
unless File.exist? filename
error "No manifest #{filename} available."
return
end
info "Uploading manifest #{filename} to org-id #{id}"
manifest_file = File.new(filename, 'rb')
request_headers = {:content_type => 'multipart/form-data', :multipart => true}
rc = api_call :subscriptions, :upload, {:organization_id => id, :content => manifest_file}, request_headers
wait_for_task(rc['id'])
report_summary :uploaded, :manifests
end