Statistics
| Branch: | Tag: | Revision:

root / vocabs.py @ be7b8d37

History | View | Annotate | Download (13.8 kB)

1
# Virtual machine instance states
2
STATES = (
3
            ('PE_VM_STOPPED', 'Stop'),
4
            ('PE_VM_RUNNING', 'Running'),
5
            ('PE_VM_SUSPENDED', 'Suspended'),
6
            ('PE_VM_MIGRATING', 'Migrating'),
7
         )
8

    
9
IMAGE_TAGS = {
10
                1: 'archlinux',
11
                2: 'centos',
12
                3: 'debian',
13
                4: 'freebsd',
14
                5: 'gentoo',
15
                6: 'netbsd',
16
                7: 'openbsd',
17
                8: 'redhat',
18
                9: 'slackware',
19
                10: 'suse',
20
                11: 'ubuntu',
21
                12: 'windows',
22
             }
23

    
24
MOCK_IMAGES = [
25
                {
26
                    "id" : 2,
27
                    "name" : "CentOS 5.2",
28
                    "updated" : "2010-10-10T12:00:00Z",
29
                    "created" : "2010-08-10T12:00:00Z",
30
                    "status" : "ACTIVE"
31
                },
32
                {
33
                    "id" : 3,
34
                    "name" : "Debian Lenny",
35
                    "updated" : "2010-10-10T12:00:00Z",
36
                    "created" : "2010-08-10T12:00:00Z",
37
                    "status" : "ACTIVE"
38
                },
39
                {
40
                    "id" : 11,
41
                    "name" : "Ubuntu 10.04 server 64bit",
42
                    "updated" : "2010-10-10T12:00:00Z",
43
                    "created" : "2010-08-10T12:00:00Z",
44
                    "status" : "ACTIVE"
45
                },
46
                {
47
                    "id" : 20,
48
                    "name" : "Ubuntu 10.10 server 64bit",
49
                    "updated" : "2010-10-10T12:00:00Z",
50
                    "created" : "2010-08-10T12:00:00Z",
51
                    "status" : "ACTIVE"
52
                },
53
                {
54
                    "id" : 4,
55
                    "name" : "FreeBSD 8.1 Release i386",
56
                    "updated" : "2010-10-10T12:00:00Z",
57
                    "created" : "2010-08-10T12:00:00Z",
58
                    "status" : "ACTIVE"
59
                },
60
                {
61
                    "id" : 12,
62
                    "name" : "My Server Backup",
63
                    "serverId" : 12,
64
                    "updated" : "2010-10-10T12:00:00Z",
65
                    "created" : "2010-08-10T12:00:00Z",
66
                    "status" : "SAVING",
67
                    "progress" : 80
68
                },
69
              ]
70

    
71

    
72
MOCK_SERVERS = [
73
                {
74
                "id" : 1234,
75
                "name" : "sample-server",
76
                "imageId" : 11,
77
                "flavorId" : 1,
78
                "hostId" : "e4d909c290d0fb1ca068ffaddf22cbd0",
79
                "status" : "BUILD",
80
                "progress" : 60,
81
                "addresses" : {
82
                    "public" : [
83
                        "67.23.10.132",
84
                        "67.23.10.131"
85
                        ],
86
                    "private" : [
87
                        "10.176.42.16"
88
                        ]
89
                    },
90
                "metadata" : {
91
                        "Server Label" : "Web Head 1",
92
                        "Image Version" : "2.1"
93
                    }
94
                },
95
                {
96
                    "id" : 5678,
97
                    "name" : "sample-server2",
98
                    "imageId" : 6,
99
                    "flavorId" : 1,
100
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
101
                    "status" : "ACTIVE",
102
                    "addresses" : {
103
                        "public" : [
104
                                "67.23.10.133"
105
                            ],
106
                        "private" : [
107
                                "10.176.42.17"
108
                            ]
109
                        },
110
                    "metadata" : {
111
                            "Server Label" : "DB 1"
112
                        }
113
                },
114
                {
115
                    "id" : 1548,
116
                    "name" : "sample-server9",
117
                    "imageId" : 3,
118
                    "flavorId" : 1,
119
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
120
                    "status" : "ACTIVE",
121
                    "addresses" : {
122
                        "public" : [
123
                                "67.23.10.143"
124
                            ],
125
                        "private" : [
126
                                "10.176.42.21"
127
                            ]
128
                        },
129
                    "metadata" : {
130
                            "Server Label" : "DB 19"
131
                        }
132
                },
133
                {
134
                    "id" : 3678,
135
                    "name" : "sample-server19",
136
                    "imageId" : 3,
137
                    "flavorId" : 1,
138
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
139
                    "status" : "ACTIVE",
140
                    "addresses" : {
141
                        "public" : [
142
                                "67.23.10.118"
143
                            ],
144
                        "private" : [
145
                                "10.176.42.18"
146
                            ]
147
                        },
148
                    "metadata" : {
149
                            "Server Label" : "DB 5"
150
                        }
151
                },
152
                {
153
                    "id" : 890,
154
                    "name" : "sample-server3",
155
                    "imageId" : 12,
156
                    "flavorId" : 2,
157
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
158
                    "status" : "SUSPENDED",
159
                    "addresses" : {
160
                        },
161
                    "metadata" : {
162
                            "Server Label" : "DB 2"
163
                        }
164
                },
165
                {
166
                "id" : 14354,
167
                "name" : "sample-server8",
168
                "imageId" : 3,
169
                "flavorId" : 1,
170
                "hostId" : "e4d909c290d0fb1ca068ffaddf22cbd0",
171
                "status" : "BUILD",
172
                "progress" : 20,
173
                "addresses" : {
174
                    "public" : [
175
                        "67.23.10.140",
176
                        "67.23.10.141"
177
                        ],
178
                    "private" : [
179
                        "10.176.42.24"
180
                        ]
181
                    },
182
                "metadata" : {
183
                        "Server Label" : "Web Head 8",
184
                        "Image Version" : "3.0"
185
                    }
186
                },
187
                {
188
                "id" : 1633,
189
                "name" : "sample-server33",
190
                "imageId" : 5,
191
                "flavorId" : 5,
192
                "hostId" : "e4d909c290d0fb1ca068ffaddf22cbd0",
193
                "status" : "BUILD",
194
                "progress" : 33,
195
                "addresses" : {
196
                    "public" : [
197
                        "67.23.10.133",
198
                        "67.23.10.133"
199
                        ],
200
                    "private" : [
201
                        "10.176.42.33"
202
                        ]
203
                    },
204
                "metadata" : {
205
                        "Server Label" : "My Web Server 33",
206
                        "Image Version" : "3.3"
207
                    }
208
                },
209
                {
210
                "id" : 16,
211
                "name" : "sample-server 66",
212
                "imageId" : 5,
213
                "flavorId" : 5,
214
                "hostId" : "e4d909c290d0fb1ca068ffaddf22cbd0",
215
                "status" : "BUILD",
216
                "progress" : 66,
217
                "addresses" : {
218
                    "public" : [
219
                        "67.23.10.166",
220
                        "67.23.10.166"
221
                        ],
222
                    "private" : [
223
                        "10.176.42.66"
224
                        ]
225
                    },
226
                "metadata" : {
227
                        "Server Label" : "My Web Server 66",
228
                        "Image Version" : "6.6"
229
                    }
230
                },
231
                {
232
                "id" : 1665,
233
                "name" : "sample-server28",
234
                "imageId" : 3,
235
                "flavorId" : 12,
236
                "hostId" : "e4d909c290d0fb1ca068ffaddf22cbd0",
237
                "status" : "BUILD",
238
                "progress" : 66,
239
                "addresses" : {
240
                    "public" : [
241
                        "67.23.10.150",
242
                        "67.23.10.129"
243
                        ],
244
                    "private" : [
245
                        "10.176.42.99"
246
                        ]
247
                    },
248
                "metadata" : {
249
                        "Server Label" : "My Web Server 18",
250
                        "Image Version" : "5.5"
251
                    }
252
                },
253
                {
254
                    "id" : 4758,
255
                    "name" : "my sample-server for mysql",
256
                    "imageId" : 6,
257
                    "flavorId" : 9,
258
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
259
                    "status" : "SUSPENDED",
260
                    "addresses" : {
261
                        },
262
                    "metadata" : {
263
                            "Server Label" : "Mysql DB production"
264
                        }
265
                },
266
                {
267
                    "id" : 1548,
268
                    "name" : "mongodb8",
269
                    "imageId" : 6,
270
                    "flavorId" :6,
271
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
272
                    "status" : "ACTIVE",
273
                    "addresses" : {
274
                        "public" : [
275
                                "67.23.11.55"
276
                            ],
277
                        "private" : [
278
                                "10.176.11.76"
279
                            ]
280
                        },
281
                    "metadata" : {
282
                            "Server Label" : "Mongodb production"
283
                        }
284
                },
285
                {
286
                    "id" : 3678,
287
                    "name" : "sample-server29",
288
                    "imageId" : 6,
289
                    "flavorId" : 6,
290
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
291
                    "status" : "ACTIVE",
292
                    "addresses" : {
293
                        "public" : [
294
                                "67.23.10.56"
295
                            ],
296
                        "private" : [
297
                                "10.176.42.58"
298
                            ]
299
                        },
300
                    "metadata" : {
301
                            "Server Label" : "Sample Server 29"
302
                        }
303
                },
304
                {
305
                    "id" : 156,
306
                    "name" : "sample-server15",
307
                    "imageId" : 3,
308
                    "flavorId" : 3,
309
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
310
                    "status" : "ACTIVE",
311
                    "addresses" : {
312
                        "public" : [
313
                                "67.23.10.96"
314
                            ],
315
                        "private" : [
316
                                "10.176.42.99"
317
                            ]
318
                        },
319
                    "metadata" : {
320
                            "Server Label" : "Sample Server 15"
321
                        }
322
                },
323
                {
324
                    "id" : 5620,
325
                    "name" : "sample-server20",
326
                    "imageId" : 3,
327
                    "flavorId" : 3,
328
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
329
                    "status" : "ACTIVE",
330
                    "addresses" : {
331
                        "public" : [
332
                                "67.23.10.20"
333
                            ],
334
                        "private" : [
335
                                "10.176.42.20"
336
                            ]
337
                        },
338
                    "metadata" : {
339
                            "Server Label" : "Sample Server 20"
340
                        }
341
                },
342
                {
343
                    "id" : 5629,
344
                    "name" : "sample-server29",
345
                    "imageId" : 6,
346
                    "flavorId" : 1,
347
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
348
                    "status" : "ACTIVE",
349
                    "addresses" : {
350
                        "public" : [
351
                                "67.23.10.29"
352
                            ],
353
                        "private" : [
354
                                "10.176.42.29"
355
                            ]
356
                        },
357
                    "metadata" : {
358
                            "Server Label" : "Sample Server 29"
359
                        }
360
                },
361
                {
362
                    "id" : 5673,
363
                    "name" : "sample-server77",
364
                    "imageId" : 6,
365
                    "flavorId" : 7,
366
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
367
                    "status" : "ACTIVE",
368
                    "addresses" : {
369
                        "public" : [
370
                                "67.23.10.77"
371
                            ],
372
                        "private" : [
373
                                "10.176.42.77"
374
                            ]
375
                        },
376
                    "metadata" : {
377
                            "Server Label" : "Sample Server 77"
378
                        }
379
                },
380
                {
381
                    "id" : 5480,
382
                    "name" : "sample-server4",
383
                    "imageId" : 3,
384
                    "flavorId" : 12,
385
                    "hostId" : "9e107d9d372bb6826bd81d3542a419d6",
386
                    "status" : "SUSPENDED",
387
                    "addresses" : {
388
                        "public" : [
389
                                "67.23.11.177"
390
                            ],
391
                        },
392
                    "metadata" : {
393
                            "Server Label" : "DB 3"
394
                        }
395
                }
396
               ]
397