Revision 22ff02a7
b/lib/config.py | ||
---|---|---|
2490 | 2490 |
self._EnsureUUID(net, ec_id) |
2491 | 2491 |
|
2492 | 2492 |
net.serial_no = 1 |
2493 |
net.ctime = net.mtime = time.time() |
|
2493 | 2494 |
self._config_data.networks[net.uuid] = net |
2494 | 2495 |
self._config_data.cluster.serial_no += 1 |
2495 | 2496 |
|
b/lib/query.py | ||
---|---|---|
2649 | 2649 |
compat.partial(_GetNetworkStatsField, name, kind)) |
2650 | 2650 |
for (name, (title, kind, _, doc)) in _NETWORK_STATS_FIELDS.items()]) |
2651 | 2651 |
|
2652 |
# Add timestamps |
|
2653 |
fields.extend(_GetItemTimestampFields(IQ_NETWORKS)) |
|
2654 |
|
|
2652 | 2655 |
return _PrepareFieldList(fields, []) |
2653 | 2656 |
|
2654 | 2657 |
#: Fields for cluster information |
b/src/Ganeti/Objects.hs | ||
---|---|---|
186 | 186 |
, optionalField $ |
187 | 187 |
simpleField "ext_reservations" [t| String |] |
188 | 188 |
] |
189 |
++ timeStampFields |
|
189 | 190 |
++ serialFields |
190 | 191 |
++ tagsFields) |
191 | 192 |
|
... | ... | |
195 | 196 |
instance TagsObject Network where |
196 | 197 |
tagsOf = networkTags |
197 | 198 |
|
199 |
instance TimeStampObject Network where |
|
200 |
cTimeOf = networkCtime |
|
201 |
mTimeOf = networkMtime |
|
202 |
|
|
198 | 203 |
-- * NIC definitions |
199 | 204 |
|
200 | 205 |
$(buildParam "Nic" "nicp" |
b/test/hs/Test/Ganeti/Objects.hs | ||
---|---|---|
174 | 174 |
gateway6 <- genMaybe genIp6Addr |
175 | 175 |
res <- liftM Just (genBitString $ netmask2NumHosts netmask) |
176 | 176 |
ext_res <- liftM Just (genBitString $ netmask2NumHosts netmask) |
177 |
ctime <- arbitrary |
|
178 |
mtime <- arbitrary |
|
177 | 179 |
let n = Network name mac_prefix net net6 gateway |
178 |
gateway6 res ext_res 0 Set.empty |
|
180 |
gateway6 res ext_res ctime mtime 0 Set.empty
|
|
179 | 181 |
return n |
180 | 182 |
|
181 | 183 |
-- | Generate an arbitrary string consisting of '0' and '1' of the given length. |
Also available in: Unified diff