Sam Su e52a7244a7 add haproxy
Change-Id: I487200a373b4eed7ff36f00b1e0269b008cd19bd
2014-03-21 11:27:10 -07:00

20 lines
781 B
Ruby

actions :create
default_action :create
attribute :name, :kind_of => String, :name_attribute => true
attribute :type, :kind_of => String, :default => 'listen', :equal_to => ['listen', 'backend', 'frontend']
#Defining some attributes, but they can be all nil and defined in params
#if convenient.
attribute :servers, :kind_of => Array, :default => []
attribute :balance, :kind_of => String
attribute :bind, :kind_of => String, :default => nil
attribute :mode, :kind_of => String, :default => nil,
:equal_to => ['http', 'tcp', 'health', nil]
#I can't think of all parameters available in the future so we allow
#arbitrary params. Type can be array or hash because some attributes
#(like server) can set several times
attribute :params, :kind_of => [Array, Hash], :default => []