This is an ongoing list of items which need to be extracted out of core repos (manageiq, manageiq-api, manageiq-ui) and into plugins.
A continuation of https://github.com/ManageIQ/manageiq/issues/14840
vm_or_template](https://github.com/ManageIQ/manageiq/blob/master/spec/factories/vm_or_template.rb)host](https://github.com/ManageIQ/manageiq/blob/master/spec/factories/host.rb)raw_* methods for most of the VM Operations call run_command_via_parent and execute a method on the ExtManagementSystem. This pattern was initially for VMware where the connection logic was in the InfraManager and was copied to a lot of other providers. The raw_* methods in core should raise NotImplementedError and each provider should define how the methods are run.[x] ExtManagementSystem spec has a test that expects to know every single plugin [ref]
https://github.com/ManageIQ/manageiq/pull/20595
[x] Worker definitions https://github.com/ManageIQ/manageiq/pull/19536 + https://github.com/ManageIQ/manageiq-schema/pull/437
cc @Fryguy @chessbyte
One thing @agrare is removing the need to check node_types (in core, I guess) i.e. "nodes" (openstack) or "hosts" (non-openstack) for instance here https://github.com/ManageIQ/manageiq/blob/master/app/models/host.rb#L1722-L1744
That's a good one @juliancheal, we can probably just drop the title_for_host and title_for_clusters methods in the UI then those methods aren't needed at all
I had spoken to @chessbyte about that with respect to his EmsCluster changes (see here), and we came up with 2 possibilities
preferred_display_name is, and then the base method just combines them together with .join(" / "). Then the plugin owns the name as well as the i18n for it. Then, in the ui code, this, this, and this effectively go away.Created https://github.com/ManageIQ/manageiq/issues/19469 for refactoring VmScan code.
@agrare Does https://github.com/ManageIQ/manageiq/pull/19536 solve the worker definitions bullet or is that more complicated?
@carbonin that absolutely covers that case
@agrare This exists, which I am currently working on:
https://github.com/ManageIQ/manageiq-gems-pending/issues/403
Not sure where it fits into what you have at the moment. Sorry it took me so long to figure the git-stuff out for that...
Awesome thanks @NickLaMuro, added to the list and linked to your issue.
For what it is worth, for the end goal of that ticket item:
Move provider specifics from MiqFileStorage into their respective provider repos e.g. miq_s3_storage.rb/miq_swift_storage.rb (ManageIQ/manageiq-gems-pending#403) @NickLaMuro
That PR doesn't complete that, but just moves it back into the main repo via:
https://github.com/ManageIQ/manageiq/pull/19547
Moving the swift and s3 parts to their respective provide repos is a different step all together, and figuring out how we make those "pluggable" is something I haven't quite figured out yet, and might require a bit of discussion. I might try tackling that once the two above are merged though.
Moving the
swiftands3parts to their respective provide repos is a different step all together, and figuring out how we make those "pluggable" is something I haven't quite figured out yet, and might require a bit of discussion. I might try tackling that once the two above are merged though.
This is one of those weird cases where even though it's S3, it's been argued that it doesn't belong in the amazon provider. The reasoning is that someone could use S3 as a File Depot, without requiring an Amazon provider and vice versa. This is sort of an independent pluggable thing. I didn't think this way previously, but now I'm leaning more towards that way.
I got a green light from @Fryguy to move decorators, we might introduce external tests from the decorator library repo for providers using a similar approach to https://github.com/ManageIQ/manageiq/blob/master/lib/tasks/test_providers_common.rake
https://github.com/ManageIQ/manageiq/blob/master/spec/models/event_stream_spec.rb
I added a "Decorators" bullet to the checklist in the OP. @skateman Be sure that if there are any patterned changes that all providers need to implement, that they are first implemented in the provider generator and then blasted out to all existing providers.
Merged #20595, but wasn't sure which checklist item above to check off
@Fryguy linked the pr and checked it off