Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
atwright147 opened this issue Dec 27, 2018 · 1 comment

Comments

@atwright147
Copy link
Contributor

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.

@atwright147
Copy link
Contributor Author

@RamyElkest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant