Statistics
| Branch: | Tag: | Revision:

root / vocabs.py @ 2cc9d3a5

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