Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

unhandled exception in get_vm_by_name method #41

Open
mbizkit76 opened this issue Sep 9, 2014 · 0 comments
Open

unhandled exception in get_vm_by_name method #41

mbizkit76 opened this issue Sep 9, 2014 · 0 comments

Comments

@mbizkit76
Copy link

I'm using knife-vcloud gem in order to check if a vm already exists on vcloud director
but when I execute the command:

knife vc vm show nonexistentVM --org-login foo --vdc vDC_bar --vapp nonexistentVAPP -VV

vcloud-rest fails with the following error:

/opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/vcloud-rest-1.3.0/lib/vcloud-rest/vcloud/vm.rb:394:in `get_vm_by_name': undefined method `[]' for nil:NilClass (NoMethodError)
    from /opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/knife-vcloud-1.3.0/lib/chef/knife/common/vc_vm_common.rb:48:in `get_vm'
    from /opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/knife-vcloud-1.3.0/lib/chef/knife/vm/vc_vm_show.rb:34:in `run'
    from /opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/chef-11.12.4/lib/chef/knife.rb:492:in `run_with_pretty_exceptions'
    from /opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/chef-11.12.4/lib/chef/knife.rb:174:in `run'
    from /opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/chef-11.12.4/lib/chef/application/knife.rb:135:in `run'
    from /opt/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/chef-11.12.4/bin/knife:25:in `<top (required)>'
    from /opt/rbenv/versions/2.1.1/bin/knife:23:in `load'
    from /opt/rbenv/versions/2.1.1/bin/knife:23:in `<main>'

A friedly message such as The requested vm does not exist will be probably better... ;-)

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

No branches or pull requests

1 participant