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

Rbvmomi inventory collector #72

Merged
merged 6 commits into from
Jul 20, 2017

Conversation

agrare
Copy link
Member

@agrare agrare commented Jul 11, 2017

Add an inventory collection strategy that uses WaitForUpdates instead of events and RetrieveProperties through the broker. This uses the RbVmomi gem from VMware.

@miq-bot miq-bot added the wip label Jul 11, 2017
@agrare agrare force-pushed the rbvmomi_inventory_collector branch 12 times, most recently from 47d03c7 to 5fe5f57 Compare July 13, 2017 18:04
@agrare agrare force-pushed the rbvmomi_inventory_collector branch 3 times, most recently from 70a85ae to eea5c77 Compare July 13, 2017 20:42
@agrare agrare force-pushed the rbvmomi_inventory_collector branch 3 times, most recently from e642bfc to ea32453 Compare July 18, 2017 14:04
@agrare agrare changed the title [WIP] Rbvmomi inventory collector Rbvmomi inventory collector Jul 18, 2017
@agrare agrare removed the wip label Jul 18, 2017
@agrare agrare requested review from blomquisg and Fryguy July 18, 2017 14:52
@agrare
Copy link
Member Author

agrare commented Jul 18, 2017

This keeps the property names as they are send from VMware, so e.g. props["summary.config.name"] instead of the broker which currently splits that up into props["summary"]["config"]["name"].

I'd like to keep it as close to what VMware sends if possible since what the broker does will be a little tricky without everything cached. This just means the parsers will have to be able to handle updates to arrays e.g.: config.hardware.device[\"1000\"].device = [2000, 2001]

@@ -0,0 +1,174 @@
require 'rbvmomi/vim'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delay load this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can, done

vim = RbVmomi::VIM.new(vim_opts)

vim.rev = vim.serviceContent.about.apiVersion
vim.serviceContent.sessionManager.Login(:userName => username, :password => password)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capital L. ewww 😦

@agrare agrare force-pushed the rbvmomi_inventory_collector branch from ea32453 to ad4cdf3 Compare July 20, 2017 17:18
@miq-bot
Copy link
Member

miq-bot commented Jul 20, 2017

Checked commits agrare/manageiq-providers-vmware@c0787ff~...4b07676 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
6 files checked, 4 offenses detected

app/models/manageiq/providers/vmware/infra_manager/inventory/collector/inventory_cache.rb

app/models/manageiq/providers/vmware/infra_manager/inventory/collector/property_collector.rb

@Fryguy Fryguy merged commit 6dc45ec into ManageIQ:master Jul 20, 2017
@Fryguy Fryguy added this to the Sprint 65 Ending Jul 24, 2017 milestone Jul 20, 2017
@agrare agrare deleted the rbvmomi_inventory_collector branch July 21, 2017 15:02
agrare pushed a commit to agrare/manageiq-providers-vmware that referenced this pull request Apr 15, 2019
…ent_instances

Generic Service State Machine - new retirement instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants