Commit 0808e9d5 authored by Petr Pudlak's avatar Petr Pudlak Committed by Petr Pudlak

Add NodeGroup to InstanceConsoleInfoParams

Before, calls to `gnt-instance list -o console` with an instance on a
node with a custom SSH port failed because of missing group
configuration. This patch fixes the problem.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent 02911a56
......@@ -741,6 +741,7 @@ getAllConsoleParams :: ConfigData
getAllConsoleParams cfg = mapM $ \i ->
InstanceConsoleInfoParams i
<$> getPrimaryNode cfg i
<*> getPrimaryNodeGroup cfg i
<*> pure (getFilledInstHvParams [] cfg i)
<*> getFilledInstBeParams cfg i
......
......@@ -348,6 +348,7 @@ instance Rpc RpcCallAllInstancesInfo RpcResultAllInstancesInfo where
$(buildObject "InstanceConsoleInfoParams" "instConsInfoParams"
[ simpleField "instance" [t| Instance |]
, simpleField "node" [t| Node |]
, simpleField "group" [t| NodeGroup |]
, simpleField "hvParams" [t| HvParams |]
, simpleField "beParams" [t| FilledBeParams |]
])
......
......@@ -102,7 +102,7 @@ genConsoleInfoCallParams = do
-- object, node object, 'HvParams', and 'FilledBeParams'.
genInstanceConsoleInfoParams :: Gen Rpc.InstanceConsoleInfoParams
genInstanceConsoleInfoParams = Rpc.InstanceConsoleInfoParams <$>
genInst <*> arbitrary <*> genHvParams <*> arbitrary
genInst <*> arbitrary <*> arbitrary <*> genHvParams <*> arbitrary
-- | Monadic check that, for an offline node and a call that does not support
-- offline nodes, we get a OfflineNodeError response.
......
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