fog / fog-xenserver

Module for the 'fog' gem to support XENSERVER
MIT License
16 stars 22 forks source link

Destroy VIF - Message method unknown #45

Closed fmbiete closed 9 years ago

fmbiete commented 9 years ago

Hi,

I'm trying to remove a VIF from a VM.

I first unplug it, and then I try to call the destroy method. But it is failing with a method unknown message. API docs doesn't show the destroy operation, but xo-server is using it (https://github.com/vatesfr/xo-server/blob/master/src/api/vif.coffee). Am I missing something?

Thanks

irb(main):003:0> vif = vm.vifs[0]
=>   <Fog::Compute::XenServer::Models::Vif
    reference="OpaqueRef:cce9033e-af37-8d57-6dae-7db4061e746c",
    allowed_operations=["plug", "attach"],
    current_operations={},
    currently_attached=false,
    device="1",
    ipv4_allowed=["10.3.17.232"],
    ipv6_allowed=[],
    locking_mode="network_default",
    mac="02:01:00:01:00:00",
    mac_autogenerated=false,
    mtu="1500",
    other_config={},
    qos_algorithm_params={},
    qos_algorithm_type="ratelimit",
    qos_supported_algorithms=[],
    runtime_properties={},
    status_code="0",
    status_detail="",
    uuid="615110a4-94f2-dc5d-7ae3-3e7c5c83fc07"
  >
irb(main):004:0> vif.destroy
Fog::XenServer::RequestFailed: vif.destroy: ["MESSAGE_METHOD_UNKNOWN", "vif.destroy"]
        from /usr/local/bundle/gems/fog-xenserver-0.1.0/lib/fog/xen_server/connection.rb:36:in `request'
        from /usr/local/bundle/gems/fog-xenserver-0.1.0/lib/fog/compute/xen_server/requests/destroy_record.rb:6:in `destroy_record'
        from /usr/local/bundle/gems/fog-xenserver-0.1.0/lib/fog/compute/xen_server/models/instance_methods.rb:32:in `destroy'
plribeiro3000 commented 9 years ago

Hey @fmbiete. Thank you for the feedback. It is much appreciated.

It should have been fixed at 9e8e5dad87e7550f4010aad09a5c23eed2a69f8c.

EDIT: Try to use the version 0.1.1.

fmbiete commented 9 years ago

Yes, with 0.1.1 it works fine.

Thank you very much!