forked from sous-chefs/haproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlb.rb
More file actions
19 lines (15 loc) · 781 Bytes
/
Copy pathlb.rb
File metadata and controls
19 lines (15 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 => []