-
Notifications
You must be signed in to change notification settings - Fork 41
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
Google graph refresh #67
Conversation
Switching Refresher as ManagerRefresh subclass, added collector/parser/persister classes.
11d0fca
to
d54cba7
Compare
Name is needed to unique identification
Also enabling network refresh with inventory in settings
Replacing with lazy_find
zone_uid = parse_uid_from_url(instance.zone) | ||
|
||
# TODO(mslemr) if possible, change to lazy_find (now result needed immediately) | ||
flavor = persister.flavors.find(flavor_uid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ladas how to remove this find
? It makes another call to collector on next line, if there is not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is different call to google api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, I would expect we'll collect all custom flavors as a list, not 1 by 1. Lets mark this one for later, since it will need more tweaking.
# TODO(mslemr): can't be better solution? | ||
cloud_volume_ems_ref = @cloud_volume_url_to_id[attached_disk[:source]] | ||
persister_cloud_volume = persister.cloud_volumes.find(cloud_volume_ems_ref) | ||
next if persister_cloud_volume.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ladas Also don' know how to remove this find
. If I replace it with lazy_find, then it will build 'disk' everytime, that is not equal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, so this differs to other providers, there we build all disks. Basically if it doesn't have a volume, it's a local disk and we do store those in other providers.
Again, lets mark this for later, it will need an exception in specs (since graph refresh will have a different result)
|
||
def load_balancer_pool_members(persister_load_balancer_pool, target_pool) | ||
target_pool.instances.to_a.each do |member_link| | ||
persister_lb_pool_member = persister.load_balancer_pool_members.find(Digest::MD5.base64digest(member_link)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ladas same question as above, with lazy_find
, there is no condition when to build lb_pool_member
and when not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets do this as the volumes, just create this everytime and change specs
And collector,parser,persister follows core renaming
f8cbf04
to
ced861d
Compare
dab01b5
to
ed51bfb
Compare
Checked commits slemrmartin/manageiq-providers-google@d54cba7~...ed51bfb with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 app/models/manageiq/providers/google/inventory/parser/cloud_manager.rb
app/models/manageiq/providers/google/inventory/parser/network_manager.rb
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great now 👍
Switching Refresher as ManagerRefresh subclass, added collector/parser/persister classes.
Adding Builder and working with InventoryCollection + InventoryObject