get_vm_list in SMT(subfunction of guest_list) report error: out of index

Bug #1832287 reported by cao biao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zVM Cloud Connector
New
Undecided
cao biao

Bug Description

when the item in the database table commented as {'migrated':1}, guest_list will report out of index error.
This is because the operation self._GuestDbOperator.get_migrated_guest_list() is "SELECT userid FROM guests " , but should be "SELECT * FROM guests ".use "SELECT * FROM guests " will fix this.

But this change will result in other problems, guest_register() API will use get_migrated_guest_list operation and expect it works like: "SELECT * FROM guests ":
    guests = self._GuestDbOperator.get_migrated_guest_list()
    if userid in str(guests):
           ...

So a new API need be created or guest_vm_list need to be changed.

cao biao (flytiger)
Changed in python-zvm-sdk:
assignee: nobody → cao biao (flytiger)
cao biao (flytiger)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.