-
Yuto KAWAMURA(kawamuray) authored
When running gnt-instance console for an instance name that doesn't exist, I got the following raw error: ... cl.QueryInstances([instance_name], ["console", "oper_state"], False) ValueError: need more than 0 values to unpack In this case we should raise the OpPrereqError to notify that the instance which having that name doesn't exist. This patch adds a check for the return value of the QueryInstances and raise the OpPrereqError when the result of the query is a blank list. Signed-off-by: Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com> Signed-off-by: Klaus Aehlig <aehlig@google.com> Reviewed-by: Klaus Aehlig <aehlig@google.com>
421ab83e