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

undefined method `create_pool' for an instance of Fog::Libvirt::Compute::Real (NoMethodError) #147

Open
davispuh opened this issue Jul 13, 2024 · 1 comment

Comments

@davispuh
Copy link
Contributor

When doing

compute = Fog::Compute.new(provider: :libvirt, libvirt_uri: 'qemu:///session')
compute.pools.create(xml: xml)

It fails with

fog-libvirt-0.12.0/lib/fog/libvirt/models/compute/pool.rb:28:in `save': undefined method `create_pool' for an instance of Fog::Libvirt::Compute::Real (NoMethodError)

          self.uuid = (persistent ? service.define_pool(xml) : service.create_pool(xml)).uuid
                                                                      ^^^^^^^^^^^^
Did you mean?  create_volume
        from fog-core-2.4.0/lib/fog/core/collection.rb:53:in `create'

There is no such method create_pool. See models/compute/pool.rb#L28

@ekohl
Copy link
Contributor

ekohl commented Dec 20, 2024

Did this ever work or is this a regression? In 476c630 I did implement a new to_xml method since in 09b6851 I removed the XML template but I don't see how it would cause this. The specific line was part of 192adc0 but I can't find definition of create_pool in the source code.

How about creating a persistent pool?

compute = Fog::Compute.new(provider: :libvirt, libvirt_uri: 'qemu:///session')
compute.pools.create(xml: xml, persistent: true)

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

2 participants