Skip to content
Snippets Groups Projects
Commit 6f732ae0 authored by Helga Velroyen's avatar Helga Velroyen
Browse files

Move Network definition ahead of depending definitions


Networks will be properties of NicParams and NodeGroups. Therefore
they need to be defined before those.

Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 45317e3a
No related branches found
No related tags found
No related merge requests found
......@@ -166,6 +166,41 @@ roleDescription NRRegular = "regular"
roleDescription NRCandidate = "master candidate"
roleDescription NRMaster = "master"
-- * Network definitions
-- FIXME: Not all types might be correct here, since they
-- haven't been exhaustively deduced from the python code yet.
$(buildObject "Network" "network" $
[ simpleField "name" [t| NonEmptyString |]
, optionalField $
simpleField "network_type" [t| NetworkType |]
, optionalField $
simpleField "mac_prefix" [t| String |]
, optionalField $
simpleField "family" [t| Int |]
, simpleField "network" [t| NonEmptyString |]
, optionalField $
simpleField "network6" [t| String |]
, optionalField $
simpleField "gateway" [t| String |]
, optionalField $
simpleField "gateway6" [t| String |]
, optionalField $
simpleField "size" [t| J.JSValue |]
, optionalField $
simpleField "reservations" [t| String |]
, optionalField $
simpleField "ext_reservations" [t| String |]
]
++ serialFields
++ tagsFields)
instance SerialNoObject Network where
serialOf = networkSerial
instance TagsObject Network where
tagsOf = networkTags
-- * NIC definitions
$(buildParam "Nic" "nicp"
......@@ -592,39 +627,3 @@ $(buildObject "ConfigData" "config" $
instance SerialNoObject ConfigData where
serialOf = configSerial
-- * Network definitions
-- FIXME: Not all types might be correct here, since they
-- haven't been exhaustively deduced from the python code yet.
$(buildObject "Network" "network" $
[ simpleField "name" [t| NonEmptyString |]
, optionalField $
simpleField "network_type" [t| NetworkType |]
, optionalField $
simpleField "mac_prefix" [t| String |]
, optionalField $
simpleField "family" [t| Int |]
, simpleField "network" [t| NonEmptyString |]
, optionalField $
simpleField "network6" [t| String |]
, optionalField $
simpleField "gateway" [t| String |]
, optionalField $
simpleField "gateway6" [t| String |]
, optionalField $
simpleField "size" [t| J.JSValue |]
, optionalField $
simpleField "reservations" [t| String |]
, optionalField $
simpleField "ext_reservations" [t| String |]
]
++ serialFields
++ tagsFields)
instance SerialNoObject Network where
serialOf = networkSerial
instance TagsObject Network where
tagsOf = networkTags
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment