Revision 6e8091f9 test/ganeti.ovf_unittest.py
b/test/ganeti.ovf_unittest.py | ||
---|---|---|
1 | 1 |
#!/usr/bin/python |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2011 Google Inc. |
|
4 |
# Copyright (C) 2011, 2012 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
59 | 59 |
"nic0_ip": "none", |
60 | 60 |
"nic0_mac": "aa:00:00:d8:2c:1e", |
61 | 61 |
"nic0_link": "xen-br0", |
62 |
"nic0_network": "auto", |
|
62 | 63 |
} |
63 | 64 |
GANETI_HYPERVISOR = { |
64 | 65 |
"hypervisor_name": "xen-pvm", |
... | ... | |
91 | 92 |
"nic0_ip": "none", |
92 | 93 |
"nic0_link": "auto", |
93 | 94 |
"nic0_mac": "auto", |
95 |
"nic0_network": "auto", |
|
94 | 96 |
} |
95 | 97 |
VIRTUALBOX_HYPERVISOR = {"hypervisor_name": "auto"} |
96 | 98 |
VIRTUALBOX_OS = {"os_name": None} |
... | ... | |
130 | 132 |
"nic0_ip": "none", |
131 | 133 |
"nic0_mac": "auto", |
132 | 134 |
"nic_count": "1", |
135 |
"nic0_network": "auto", |
|
133 | 136 |
} |
134 | 137 |
CMDARGS_HYPERVISOR = { |
135 | 138 |
"hypervisor_name": "xen-pvm" |
... | ... | |
207 | 210 |
}, |
208 | 211 |
] |
209 | 212 |
EXP_NETWORKS_LIST = [ |
210 |
{"mac": "aa:00:00:d8:2c:1e", "ip":"None", "link":"br0","mode":"routed"}, |
|
213 |
{"mac": "aa:00:00:d8:2c:1e", "ip":"None", "link":"br0", |
|
214 |
"mode":"routed", "network": "test"}, |
|
211 | 215 |
] |
212 | 216 |
EXP_PARTIAL_GANETI_DICT = { |
213 | 217 |
"hypervisor": {"name": "xen-kvm"}, |
... | ... | |
263 | 267 |
"Nic ovf:name=\"routed0\"><gnt:Mode>routed</gnt:" |
264 | 268 |
"Mode><gnt:MACAddress>aa:00:00:d8:2c:1e</gnt:" |
265 | 269 |
"MACAddress><gnt:IPAddress>None</gnt:IPAddress>" |
266 |
"<gnt:Link>br0</gnt:Link></gnt:Nic></gnt:Network>"
|
|
267 |
"</gnt:GanetiSection>") |
|
270 |
"<gnt:Link>br0</gnt:Link><gnt:Net>test</gnt:Net>"
|
|
271 |
"</gnt:Nic></gnt:Network></gnt:GanetiSection>")
|
|
268 | 272 |
EXPORT_GANETI = ("<gnt:GanetiSection><gnt:Version>0</gnt:Version><gnt:" |
269 | 273 |
"AutoBalance>False</gnt:AutoBalance><gnt:OperatingSystem>" |
270 | 274 |
"<gnt:Name>lenny-image</gnt:Name><gnt:Parameters /></gnt:" |
... | ... | |
274 | 278 |
"Hypervisor><gnt:Network><gnt:Nic ovf:name=\"routed0\"><gnt:" |
275 | 279 |
"Mode>routed</gnt:Mode><gnt:MACAddress>aa:00:00:d8:2c:1e</gnt:" |
276 | 280 |
"MACAddress><gnt:IPAddress>None</gnt:IPAddress><gnt:Link>br0" |
277 |
"</gnt:Link></gnt:Nic></gnt:Network></gnt:GanetiSection>") |
|
281 |
"</gnt:Link><gnt:Net>test</gnt:Net></gnt:Nic></gnt:Network>" |
|
282 |
"</gnt:GanetiSection>") |
|
278 | 283 |
EXPORT_SYSTEM = ("<References><File ovf:compression=\"gzip\" ovf:href=\"new_" |
279 | 284 |
"disk.cow.gz\" ovf:id=\"file0\" ovf:size=\"203\" /><File ovf:" |
280 | 285 |
"href=\"new_disk.cow\" ovf:id=\"file1\" ovf:size=\"15\" />" |
Also available in: Unified diff