Declare multiple queues for reading events
[aquarium] / src / test / resources / policy.yaml
1 aquariumpolicy:
2   resources:
3     - resource:
4       name: bandwidthup
5       unit: MB/hr
6       complex: false
7       costpolicy: continuous
8     - resource:
9       name: bandwidthdown
10       unit: MB/hr
11       complex: false
12       costpolicy: continuous
13     - resource:
14       name: vmtime
15       unit: Hour
16       complex: true
17       costpolicy: onoff
18       descriminatorfield: vmid
19     - resource:
20       name: diskspace
21       unit: MB/hr
22       complex: false
23       costpolicy: continuous
24     - resource:
25       name: bookpages
26       unit: pages
27       complex: false
28       costpolicy: discrete
29
30   implicitvars:
31     - price
32     - volume
33
34   algorithms:
35     - algorithm:
36       name: default
37       bandwidthup: $price times $volume
38       bandwidthdown: $price times $volume
39       vmtime: $price times $volume
40       diskspace: $price times $volume
41       bookpages: $price times $volume
42       effective:
43         from: 0
44     - algorithm:
45       name: freedisk
46       overrides: default
47       diskspace: 0
48       effective:
49         repeat:
50           - start: "00 00 12 * *"
51             end:   "00 00 14 * *"
52           - start: "00 00 18 * *"
53             end:   "00 00 20 * *"
54         from: 0
55         to: 1424442196 # Fri, 20 Feb 2015 14:23:16 GMT
56
57   pricelists:
58     - pricelist: 
59       name: default
60       bandwidthup: 0.01
61       bandwidthdown: 0.02
62       vmtime: 0.1
63       diskspace: 0.05
64       bookpages: 0.1
65       effective:
66         from: 0
67     - pricelist: 
68       name: everyTue2
69       overrides: default
70       bandwidthup: 0.01
71       bandwidthdown: 0.02
72       vmtime: 0.1
73       diskspace: 0.05
74       effective:
75         repeat:
76           - start: "00 02 * * Tue"
77             end:   "00 02 * * Wed"
78         from: 0
79     - pricelist:
80       name: foobar
81       overrides: default
82       bandwidthup: 0.04
83       bandwidthdown: 0.04
84       vmtime: 0.6
85       diskspace: 0.05
86       effective:
87         repeat:
88           - start: "00 12 * * *"
89             end:   "00 14 * * *"
90           - start: "00 18 * * *"
91             end:   "00 20 * * *"
92         from: 0
93
94   creditplans:
95     - creditplan:
96       name: default
97       credits: 100
98       at: "00 00 1 * *"
99       effective:
100         from: 0
101     - creditplan:
102       name: every10days
103       at: "00 00 1,10,20,30 * *"
104       credits: 20
105       effective:
106         from: 0
107
108   agreements:
109     - agreement:
110       name: default
111       algorithm: default
112       pricelist: default
113       creditplan: default
114
115     - agreement:
116       overrides: default
117       name: scaledbandwidth
118       pricelist: foobar
119       algorithm:
120         bandwidthup: |
121                 if $volume gt 15 then
122                   $volume times $price
123                 elsif $volume gt 15 and volume lt 30 then
124                   $volume times $price times 1.2
125                 else
126                   $volume times price times 1.4
127                 end
128
129     - agreement:
130       overrides: default
131       name: onemonthexperiment
132       creditplan:
133         at: "00 00 * * *"
134         credits: 100
135         effective:
136           from: 1322061528 #Wed 23 Nov 2011 17:18
137           to: 1324661839 #Fri, 23 Dec 2011 17:37
138
139     - agreement:
140       overrides: default
141       name: complextimeslots
142       creditplan: every10days
143       pricelist: foobar
144       algorithm: freedisk
145