Commit 0f0d7aba authored by Helga Velroyen's avatar Helga Velroyen
Browse files

Add a network fields to NIC params and node group type



This adds a network field to the NIC params and a list of networks
to the node group type. It adjusts the nodegroup's unit tests accordingly.
Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 6f732ae0
......@@ -131,6 +131,7 @@ $(genArbitrary ''PartialIPolicy)
instance Arbitrary NodeGroup where
arbitrary = NodeGroup <$> genFQDN <*> pure [] <*> arbitrary <*> arbitrary
<*> arbitrary <*> pure (GenericContainer Map.empty)
<*> arbitrary
-- ts
<*> arbitrary <*> arbitrary
-- uuid
......
......@@ -212,6 +212,7 @@ $(buildObject "PartialNic" "nic"
[ simpleField "mac" [t| String |]
, optionalField $ simpleField "ip" [t| String |]
, simpleField "nicparams" [t| PartialNicParams |]
, optionalField $ simpleField "network" [t| Network |]
])
-- * Disk definitions
......@@ -502,11 +503,12 @@ type DiskParams = Container (Container JSValue)
$(buildObject "NodeGroup" "group" $
[ simpleField "name" [t| String |]
, defaultField [| [] |] $ simpleField "members" [t| [String] |]
, defaultField [| [] |] $ simpleField "members" [t| [String] |]
, simpleField "ndparams" [t| PartialNDParams |]
, simpleField "alloc_policy" [t| AllocPolicy |]
, simpleField "ipolicy" [t| PartialIPolicy |]
, simpleField "diskparams" [t| DiskParams |]
, defaultField [| [] |] $ simpleField "networks" [t| [Network] |]
]
++ timeStampFields
++ uuidFields
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment