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 When Loading Dynamic Sites #83

Closed
crypticgeek opened this issue Sep 30, 2014 · 7 comments
Closed

Error When Loading Dynamic Sites #83

crypticgeek opened this issue Sep 30, 2014 · 7 comments

Comments

@crypticgeek
Copy link

If I attempt to Site.load a Dynamic site my script crashes with
C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.4/lib/nexpose/filter.rb:302:in initialize': undefined methodupcase' for nil:NilClass (NoMethodError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.4/lib/nexpose/filte
r.rb:332:in new' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.4/lib/nexpose/filte r.rb:332:inparse'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.4/lib/nexpose/site.
rb:323:in load_dynamic_attributes' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.4/lib/nexpose/site. rb:221:inload'

mdaines-r7 added a commit that referenced this issue Oct 2, 2014
This should address issues #71 and #83
The underlying calls were changed.
This currently is only set to work for vSphere.
@mdaines-r7
Copy link
Contributor

I just pushed a change that I think fixes it (but I haven't released a new gem version, yet).

I'm not sure that this will fix the problem if you are using something besides vSphere (vCenter discovery connections), though. I have to do some more testing before pushing a 0.8.5 release.

@mdaines-r7
Copy link
Contributor

Should be fixed in 0.8.5 release.

@crypticgeek
Copy link
Author

I'm still getting an error in my script when calling Site.load with a site id of a dynamic site. It is a dynamic site using the vCenter discovery connection.

C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.5/lib/nexpose/filter.rb:302:in ' initialize': undefined method 'upcase' for nil:NilClass (NoMethodError) from C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.5/lib/nexpose/filte r.rb:332:in 'new' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.5/lib/nexpose/filte r.rb:332:in 'parse' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.5/lib/nexpose/site. rb:378:in 'load_dynamic_attributes' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/nexpose-0.8.5/lib/nexpose/site. rb:262:in 'load' <snip>

@mdaines-r7
Copy link
Contributor

Hmm, I'll try to look into it some more. I was getting the same error originally, but the changes fixed it for me.

Are you on the most recent version of Nexpose?

@mdaines-r7 mdaines-r7 reopened this Oct 10, 2014
@crypticgeek
Copy link
Author

I'm on 5.10.14. Not sure if that's latest.

mdaines-r7 added a commit that referenced this issue Oct 13, 2014
When a dynamic site has not filtering criteria, the AJAX call not
returns an empty criteria array, whereas before it contained a minimal
frame. Handle this by defaulting the operator to 'AND', which allows the
site to load and to be saved as is.
@mdaines-r7
Copy link
Contributor

I was testing with sites that contained filter parameters before and missed the base case. D'oh!

@crypticgeek
Copy link
Author

Working. Thank you.

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