Closed alescernivec closed 2 years ago
@agrare - we had a discussion regarding this in the last call. I believe that you mentioned VMWare's provider's collections. Could you please point us to these? Are there any collections we could reuse here?
Thanks @alescernivec I'm reviewing the docs that you posted and will update in a bit
Hey @alescernivec sorry for the delay. So a server profile isn't just a "oneshot" configuration during provisioning, but rather stays with the server over its lifetime? (per "Server Profile Drift" section) In that case it doesn't sound like a ConfigurationSpec
which is only using once during initial provisioning.
Creating a new table / model for a PhysicalServerProfile
sounds like the way to go here, this would also allow us to perform the redeploy operation if a server changes away from the profile.
Thank you, @agrare! Correct, it is not just a oneshot configuration, it has its lifecycle and could be in different states, as you have pointed out. We are looking towards extending the table/model but we have some problems with this (e.g. all the needed changes in the models, and how to force the migration, so that the tables are created in the databases with all the needed relations). Any documentation/reference would be much appreciated on this.Thanks again!
Hey @alescernivec
Here is an example of creating a table with some references to other collections https://github.com/ManageIQ/manageiq-schema/pull/537/files#diff-d35730e8bff171e8f82edbc4d2097cb6fe3f70681f951d7b3f3c2f395b508c25R1-R17
https://guides.rubyonrails.org/active_record_migrations.html is good to understand as well.
Once committed migrations are run by doing rails db:migrate
(this is done automatically by bin/update
)
Resolved in #42
As a user I should be able to view a list of server profiles available in the system indicating which all are associated with servers and which are not so that I get a full view of the inventory.
More details on Server Profiles reside here.
For this purpose we should extend miq collections with additional one, e.g.
physical_server_profiles
with a reference on thephysical_server
.Moreover, we should have a list of the available server profiles listed in the physical provider's view (within the ManageIQ).
What is the best approach for this?