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