Statistics
| Branch: | Tag: | Revision:

root / vocabs.py @ d08a5f6f

History | View | Annotate | Download (13.7 kB)

1
# Virtual machine instance states
2
STATES = (
3
            ('ACTIVE', 'Running'),
4
            ('STOPPED', 'Stopped'),
5
         )
6

    
7
IMAGE_TAGS = {
8
                1: 'archlinux',
9
                2: 'centos',
10
                3: 'debian',
11
                4: 'freebsd',
12
                5: 'gentoo',
13
                6: 'netbsd',
14
                7: 'openbsd',
15
                8: 'redhat',
16
                9: 'slackware',
17
                10: 'suse',
18
                11: 'ubuntu',
19
                12: 'windows',
20
             }
21
#not used any more
22
MOCK_IMAGES = [
23
                {
24
                    "id" : 2,
25
                    "name" : "CentOS 5.2",
26
                    "updated" : "2010-10-10T12:00:00Z",
27
                    "created" : "2010-08-10T12:00:00Z",
28
                    "status" : "ACTIVE"
29
                },
30
                {
31
                    "id" : 3,
32
                    "name" : "Debian Lenny",
33
                    "updated" : "2010-10-10T12:00:00Z",
34
                    "created" : "2010-08-10T12:00:00Z",
35
                    "status" : "ACTIVE"
36
                },
37
                {
38
                    "id" : 11,
39
                    "name" : "Ubuntu 10.04 server 64bit",
40
                    "updated" : "2010-10-10T12:00:00Z",
41
                    "created" : "2010-08-10T12:00:00Z",
42
                    "status" : "ACTIVE"
43
                },
44
                {
45
                    "id" : 20,
46
                    "name" : "Ubuntu 10.10 server 64bit",
47
                    "updated" : "2010-10-10T12:00:00Z",
48
                    "created" : "2010-08-10T12:00:00Z",
49
                    "status" : "ACTIVE"
50
                },
51
                {
52
                    "id" : 4,
53
                    "name" : "FreeBSD 8.1 Release i386",
54
                    "updated" : "2010-10-10T12:00:00Z",
55
                    "created" : "2010-08-10T12:00:00Z",
56
                    "status" : "ACTIVE"
57
                },
58
                {
59
                    "id" : 12,
60
                    "name" : "My Server Backup",
61
                    "serverId" : 12,
62
                    "updated" : "2010-10-10T12:00:00Z",
63
                    "created" : "2010-08-10T12:00:00Z",
64
                    "status" : "SAVING",
65
                    "progress" : 80
66
                },
67
              ]
68

    
69

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