-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add schema support for LXCA config patterns #61
Conversation
@miq-bot add_label wip |
def change | ||
create_table :configuration_templates do |t| | ||
t.bigint :ems_id | ||
t.string :external_id |
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.
The external_id field is used to represent the unique ID that's generated by LXCA for each configuration pattern.
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.
fields ending in _id
are reserved for ActiveRecord relations. Since this is a unique id, let's use ems_ref
so that it matches all of the other tables, since that is the "native unique id"
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.
@Fryguy So are you suggesting to change external_id to ems_ref? The external_id field is meant to represent the unique ID that is generated by LXCA for each config pattern. We are storing this in the DB, so when the user selects a particular pattern, we can retrieve and send the correct ID to the LXCA REST interface to execute the pattern. Just making sure I understand because I notice that ems_ref is used in other tables and thought it was for MIQ-specific purposes. Thanks
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.
Correct. ems_ref is the native unique identifier, so that sounds exactly like what you are describing.
@@ -0,0 +1,12 @@ | |||
class CreateConfigurationTemplates < ActiveRecord::Migration[5.0] |
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.
@bdunne Can you review here as well. I'm ok with configuration_templates, but could that get confusing with configuration manager based classes?
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.
I agree that it will be confusing, but I don't have any better names for it right now.
Checked commits skovic/manageiq-schema@f48ddff~...75deb24 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@miq-bot remove_label wip |
Yeah, we can merge this. |
This PR adds schema support for Lenovo XClarity Administrator (LXCA) configuration patterns which can be thought of as templates describing the configuration of physical systems. These "templates" are used by LXCA to configure hardware such as servers, switches, and storage.