Skip to content

Error due to passing wrong variable to libvirt_native.virStoragePoolListAllVolumes #40

@atwright147

Description

@atwright147

In ./generated/libvirt-storage-pool.js on line 156 (let retList = libvirt_native.virStoragePoolListAllVolumes(this.pool, flags);) the first arg is this.pool but this seems to be wrong as I get the error:

/vagrant/node_modules/libvirt-node/generated/libvirt-storage-pool.js:156
    let retList = libvirt_native.virStoragePoolListAllVolumes(this.pool, flags);
                                 ^

TypeError: Wrong argument type 0
    at module.exports.listAllVolumes (/vagrant/node_modules/libvirt-node/generated/libvirt-storage-pool.js:156:34)

This is the generated code:

  /**
   * Collect the list of storage volumes, and allocate an array to store those
   * objects.
   *
   * TODO: params / returns
   */
  listAllVolumes(flags = 0) {
    let retList = libvirt_native.virStoragePoolListAllVolumes(this.pool, flags);
    if (retList == null)
      throw new Error('virStoragePoolListAllVolumes() failed');

    return retList.map(ret => new virStorageVol(this.conn, ret));
  }

Changing this.pool to this.storagePool fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions