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

Add schema support for LXCA config patterns #61

Merged
merged 3 commits into from
Sep 11, 2017

Conversation

skovic
Copy link

@skovic skovic commented Sep 6, 2017

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.

@skovic
Copy link
Author

skovic commented Sep 6, 2017

@miq-bot add_label wip

@miq-bot miq-bot changed the title Add schema support for LXCA config patterns [WIP] Add schema support for LXCA config patterns Sep 6, 2017
@miq-bot miq-bot added the wip label Sep 6, 2017
def change
create_table :configuration_templates do |t|
t.bigint :ems_id
t.string :external_id
Copy link
Author

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.

Copy link
Member

@Fryguy Fryguy Sep 6, 2017

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"

Copy link
Author

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

Copy link
Member

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]
Copy link
Member

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?

Copy link
Member

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.

@miq-bot
Copy link
Member

miq-bot commented Sep 7, 2017

Checked commits skovic/manageiq-schema@f48ddff~...75deb24 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@skovic
Copy link
Author

skovic commented Sep 8, 2017

@miq-bot remove_label wip

@miq-bot miq-bot changed the title [WIP] Add schema support for LXCA config patterns Add schema support for LXCA config patterns Sep 8, 2017
@miq-bot miq-bot removed the wip label Sep 8, 2017
@skovic
Copy link
Author

skovic commented Sep 11, 2017

@Fryguy @bdunne Can we proceed with this PR or do you want us to come up with another name? I am also unsure about what would be a better name. Thanks

@Fryguy
Copy link
Member

Fryguy commented Sep 11, 2017

Yeah, we can merge this.

@Fryguy Fryguy merged commit b30c00b into ManageIQ:master Sep 11, 2017
@Fryguy Fryguy added this to the Sprint 69 Ending Sep 18, 2017 milestone Sep 11, 2017
@Fryguy Fryguy self-assigned this Sep 11, 2017
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