xmlrpc doc fix

This commit is contained in:
Alexey Nayden 2011-04-22 18:22:44 +04:00
parent 738bb2087d
commit 80174c6d3e
2 changed files with 8 additions and 18 deletions

View File

@ -1,25 +1,15 @@
class ProductsController < ApplicationController
before_filter :authenticate_user!, :except => [:product_begin, :product_end]
before_filter :find_product_by_name, :only => [:product_begin, :product_end]
before_filter :find_product, :only => [:show, :edit, :update, :build]
before_filter :find_platform, :except => [:product_begin, :product_end, :build]
before_filter :authenticate_user!, :except => [:product_status]
before_filter :find_product, :only => [:show, :edit, :update, :build, :product_status]
before_filter :find_platform, :except => [:product_status, :build]
def product_begin
@product.build_status = Product::STATUS::BUILDING
@product.build_path = params[:path]
def product_status
@product.build_status = params[:status] == "0" ? Product::BUILD_COMPLETED : Product::BUILD_FAILED
@product.save!
render :nothing => true, :status => 200
end
def product_end
@product.build_status = ((params[:status] == BuildServer::SUCCESS) ? Product::BUILD_COMPLETED : Product::BUILD_FAILED)
@product.build_path = params[:path]
@product.save!
render :nothing => true, :status => 200
end
def new
@product = @platform.products.new
@product.ks = DEFAULT_KS
@ -38,7 +28,7 @@ class ProductsController < ApplicationController
def build
flash[:notice] = t('flash.product.build_started')
ProductBuilder.create_product @product.name, @product.platform.name, [], [], '', '/var/rosa', []
ProductBuilder.create_product @product.id, '/var/rosa', @product.ks, @product.menu, @product.build, @product.counter
redirect_to :action => :show
end

View File

@ -9,7 +9,7 @@ class ProductBuilder
@@client ||= XMLRPC::Client.new3(:host => APP_CONFIG['product_builder_ip'], :port => APP_CONFIG['product_builder_port'], :path => APP_CONFIG['product_builder_path'])
end
def self.create_product name, platform_name, params, packages, post_install, path, repos
self.client.call('create_product', name, platform_name, params, packages, post_install, path, repos)
def self.create_product product_id, path, kstemplate, menuxml, build, counter
self.client.call('create_product', product_id, path, kstemplate, menuxml, build, counter)
end
end