Fix pool ID check when listing instances
We should be looking for the poolIDKey in the extended LXD config. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
fdfcc619ad
commit
234095e456
1 changed files with 1 additions and 1 deletions
|
|
@ -417,7 +417,7 @@ func (l *LXD) ListInstances(ctx context.Context, poolID string) ([]params.Instan
|
|||
for _, instance := range instances {
|
||||
if id, ok := instance.ExpandedConfig[controllerIDKeyName]; ok && id == l.controllerID {
|
||||
if poolID != "" {
|
||||
id := instance.ExpandedConfig[poolID]
|
||||
id := instance.ExpandedConfig[poolIDKey]
|
||||
if id != poolID {
|
||||
// Pool ID was specified. Filter out instances belonging to other pools.
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue