-
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
Create Canister migration #234
Conversation
f2265ea
to
f6a8f65
Compare
@EsdrasVP can you add to the PR description what a canister is?
Isn't enough for me to understand what is being added |
@EsdrasVP is Canister an industry standard term for this type of object? (A quick google search for "storage canister" yielded a lot of amazon results for air-tight coffee bean containers which might just be my recommended search results 😆) If it has its own controller it almost sounds like a caniter is its own self-contained storage? |
@agrare Other companies might call it by a different name, so I think that's why it's only appearing as coffee bean containers on search results hahaha.
Yes, all the work will be done by the Canisters, which will exist inside of a PhysicalStorage. This distinction is important because a Lenovo PhysicalStorage will contain more than one Canister inside it. |
Okay canister seems like a decent enough name don't want to dwell on that. |
class CreateCanister < ActiveRecord::Migration[5.0] | ||
def change | ||
create_table :canisters do |t| | ||
t.string :serial_number |
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.
2 things here, can you add ems_ref for a unique reference? Even if e.g. position is unique for lenovo we can use ems_ref generally.
Also I assume this belongs to a physical_storage but you don't have a reference to physical_storage here.
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.
@agrare I added now ems_ref
and physical_storage_id
to the migration.
@@ -0,0 +1,5 @@ | |||
class AddPortStatusToPhysicalNetworkPorts < ActiveRecord::Migration[5.0] | |||
def change | |||
add_column :physical_network_ports, :port_status, :string |
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.
This looks unrelated to the rest of this PR
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.
@agrare It is, kinda. Because Canister will have some physical ports in it, and I didn't found any reference to this, so I created one. If you want to, I can put it in another PR.
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.
Yeah lets do this in a new PR since port_status can apply to anything not just canisters. So a canister will have hardware -> guest_devices -> physical_network_ports?
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.
So a canister will have hardware -> guest_devices -> physical_network_ports?
@agrare Exactly, this relationship it's currently on the core PR.
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.
Yeah lets do this in a new PR since port_status can apply to anything not just canisters.
@agrare I've done it and put as dependency on this PR, could you take a look there?
f6a8f65
to
192d169
Compare
192d169
to
2c6bdd2
Compare
Checked commit EsdrasVP@2c6bdd2 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@EsdrasVP should a physical_disk have a canister_id then? |
This PR is able to:
A Canister is a controller inside the Physical Storage (which may have more than one Canister). It contains its own firmware, ports, network, power state, etc.
Depends on:
ManageIQ/manageiq-schema#233 - MergedManageIQ/manageiq#17700 - Merged