Revision b43064d0
b/src/Ganeti/Objects.hs | ||
---|---|---|
192 | 192 |
, optionalField $ |
193 | 193 |
simpleField "ext_reservations" [t| String |] |
194 | 194 |
] |
195 |
++ uuidFields |
|
195 | 196 |
++ serialFields |
196 | 197 |
++ tagsFields) |
197 | 198 |
|
... | ... | |
201 | 202 |
instance TagsObject Network where |
202 | 203 |
tagsOf = networkTags |
203 | 204 |
|
205 |
instance UuidObject Network where |
|
206 |
uuidOf = networkUuid |
|
207 |
|
|
204 | 208 |
-- * NIC definitions |
205 | 209 |
|
206 | 210 |
$(buildParam "Nic" "nicp" |
... | ... | |
639 | 643 |
, simpleField "nodes" [t| Container Node |] |
640 | 644 |
, simpleField "nodegroups" [t| Container NodeGroup |] |
641 | 645 |
, simpleField "instances" [t| Container Instance |] |
646 |
, simpleField "networks" [t| Container Network |] |
|
642 | 647 |
] |
643 | 648 |
++ serialFields) |
644 | 649 |
|
b/test/hs/Test/Ganeti/Objects.hs | ||
---|---|---|
179 | 179 |
size <- genMaybe genJSValue |
180 | 180 |
res <- liftM Just (genBitString $ netmask2NumHosts netmask) |
181 | 181 |
ext_res <- liftM Just (genBitString $ netmask2NumHosts netmask) |
182 |
uuid <- arbitrary |
|
182 | 183 |
let n = Network name network_type mac_prefix net_family net net6 gateway |
183 |
gateway6 size res ext_res 0 Set.empty |
|
184 |
gateway6 size res ext_res uuid 0 Set.empty
|
|
184 | 185 |
return n |
185 | 186 |
|
186 | 187 |
-- | Generates an arbitrary network type. |
... | ... | |
215 | 216 |
show (map fst nodes')) |
216 | 217 |
else GenericContainer nodemap |
217 | 218 |
continsts = GenericContainer Map.empty |
219 |
networks = GenericContainer Map.empty |
|
218 | 220 |
grp <- arbitrary |
219 | 221 |
let contgroups = GenericContainer $ Map.singleton guuid grp |
220 | 222 |
serial <- arbitrary |
221 | 223 |
cluster <- resize 8 arbitrary |
222 |
let c = ConfigData version cluster contnodes contgroups continsts serial |
|
224 |
let c = ConfigData version cluster contnodes contgroups continsts networks |
|
225 |
serial |
|
223 | 226 |
return c |
224 | 227 |
|
225 | 228 |
-- * Test properties |
Also available in: Unified diff