Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Fix for "Permission was denied" issue in datacenter connection #39

Closed
wants to merge 1 commit into from
Closed

Fix for "Permission was denied" issue in datacenter connection #39

wants to merge 1 commit into from

Conversation

mkuzmin
Copy link

@mkuzmin mkuzmin commented May 5, 2014

My account doesn't have administrative permissions on vCenter. And because of that find_datacenter method fails with the next error:

C:/Ruby/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:61:in `parse_response': NoPermission: Permission to perform this operation was denied. (RbVmomi::Fault)
        from C:/Ruby/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:90:in `call'
        from C:/Ruby/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:205:in `_call'
        from C:/Ruby/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:74:in `block (2
levels) in init'
        from C:/Ruby/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.1/lib/rbvmomi/vim/Folder.rb:7:in `find'
        from C:/Ruby/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.1/lib/rbvmomi/vim/Folder.rb:93:in `traverse'
        from C:/Ruby/lib/ruby/gems/2.0.0/gems/rbvmomi-1.8.1/lib/rbvmomi/vim/ServiceInstance.rb:8:in `find_datacenter'
        from dc.rb:3:in `<main>'

This pull request updates the method to work with less privileges.

traverse method required administrative permissions.
@mkuzmin mkuzmin changed the title Fix fer "Permission was denied" issue in datacenter connection Fix for "Permission was denied" issue in datacenter connection May 5, 2014
@mkuzmin
Copy link
Author

mkuzmin commented May 7, 2014

I'm going to rewrite the fix in a more robust way

@mkuzmin mkuzmin closed this May 7, 2014
@mkuzmin
Copy link
Author

mkuzmin commented May 8, 2014

I've explained a solution in #37 (comment)

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

Successfully merging this pull request may close these issues.

1 participant