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 comments to the vms table #297

Merged
merged 23 commits into from
Nov 5, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Initial commit.
  • Loading branch information
Daniel Berger committed Oct 25, 2018
commit a84adee85d06af18d688d937343e681c67498f50
81 changes: 81 additions & 0 deletions db/migrate/20181025230931_add_comments_to_vms_table.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
class AddCommentsToVmsTable < ActiveRecord::Migration[5.0]
def change
change_table_comment :vms, "Virtual Machines and Templates"

change_column_comment :vms, :autostart, "Indicates whether or not the VM is set to autostart."
change_column_comment :vms, :availability_zone_id, "ID of the availability zone that the VM is part of."
change_column_comment :vms, :busy, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :boot_time, "The last time the VM was started."
change_column_comment :vms, :cloud, "Indicates whether or not the VM/Template is cloud or infra."
djberg96 marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :cloud_network_id, "ID of the cloud (virtual) network the VM/Template is associated with."
change_column_comment :vms, :cloud_subnet_id, "Subnet ID associated with the VM."
change_column_comment :vms, :cloud_tenant_id, "ID of the cloud tenant associated with the VM."
change_column_comment :vms, :config_xml, "The VM or Template configuration in XML format. Deprecated."
change_column_comment :vms, :connection_state, "[DEFINITION NEEDED]"
djberg96 marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :cpu_affinity, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :cpu_hot_add_enabled, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :cpu_hot_remove_enabled, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :cpu_limit, "[DEFINITION NEEDED]"
change_column_comment :vms, :cpu_reserve, "[DEFINITION NEEDED]"
change_column_comment :vms, :cpu_reserve_expand, "[DEFINITION NEEDED]"
change_column_comment :vms, :cpu_shares, "[DEFINITION NEEDED]"
change_column_comment :vms, :cpu_shares_level, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :created_on, "The date the VM was added to the app inventory."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :deprecated, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :description, "A custom description that users can add within the app."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :ems_created_on, "Date the associated EMS was created."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :ems_id, "ID of the ExtManagementSystem associated with the VM."
change_column_comment :vms, :evm_owner_id, "ID of VM owner from product database."
djberg96 marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :ems_ref_obj, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :ems_cluster_id, "ID of associated cluster."
change_column_comment :vms, :fault_tolerance, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :flavor_id, "ID of associated flavor."
change_column_comment :vms, :format, "The format of the VM's disk, such as VMDK."
djberg96 marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :guid, "A value used to uniquely identify the VM internally."
change_column_comment :vms, :id, "The internal database ID."
change_column_comment :vms, :host_id, "ID of the host that the VM/Template resides on."
change_column_comment :vms, :last_perf_capture_on, "Timestamp for last performance metrics capture."
change_column_comment :vms, :last_scan_on, "Timestamp for last SmartState Analysis."
change_column_comment :vms, :last_scan_attempt_on, "Timestamp for last attempt to perform SmartState Analysis."
change_column_comment :vms, :last_sync_on, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :linked_clone, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :location, "The location or region of the VM."
djberg96 marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :memory_hot_add_enabled, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :memory_hot_add_increment, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :memory_hot_add_limit, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :memory_limit, "[DEFINITION NEEDED]"
change_column_comment :vms, :memory_reserve, "[DEFINITION NEEDED]"
change_column_comment :vms, :memory_reserve_expand, "[DEFINITION NEEDED]"
change_column_comment :vms, :memory_shares, "[DEFINITION NEEDED]"
change_column_comment :vms, :memory_shares_level, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :miq_group_id, "MIQ Group associated with the VM."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :name, "The name of the VM/Template."
change_column_comment :vms, :orchestration_stack_id, "ID of the orchestration stack associated with the VM."
change_column_comment :vms, :power_state, "The current power state, typically 'on' or 'off'."
change_column_comment :vms, :previous_state, "The previous power state change."
change_column_comment :vms, :publicly_available, "Indicates whether the VM is public or private."
change_column_comment :vms, :raw_power_state, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :registered, "Indicates whether the VM registered to a Provider."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a column for this? We have a method VmOrTemplate#registered? which checks template, ems_id, host_id

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I don't see any of the parsers setting this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I mark it deprecated then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

change_column_comment :vms, :resource_group_id, "ID of the resource group that the VM/Template belongs to."
change_column_comment :vms, :retired, "Indicates whether or not the VM is retired."
change_column_comment :vms, :retirement_last_warn, "Date of last retirement warning."
change_column_comment :vms, :retirement_requester, "Userid of the user who requested retirement."
change_column_comment :vms, :retirement_state, "The current retirement state."
change_column_comment :vms, :retirement_warn, "Warning message when VM was put into retirement."
change_column_comment :vms, :retires_on, "Date the VM is to be retired."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :smart, "[DEFINITION NEEDED]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this being set or used anywhere, @Fryguy do you know what this is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I want to say this had something to do with smart proxy. @gmcculloug I think we talked about this a long time ago, but my memory is hazy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct, it is very old and no longer used. It use to indicate that we added a file in with the other VM files to help identify the VM if it moved between systems.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like we should drop the column

change_column_comment :vms, :standby_action, "Action taken when VM is put into standby mode."
change_column_comment :vms, :storage_id, "ID of the storage object associated with the VM."
change_column_comment :vms, :storage_profile_id, "ID of the storage profile associated with the VM."
change_column_comment :vms, :state_changed_on, "The date of the last power state change."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :template, "Indicates if a template was used to provision the VM or not."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :tenant_id, "ID of the tenant associated with the VM."
change_column_comment :vms, :tools_status, "Status of VMWare tools."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :type, "An internal class name that includes the provider type."
change_column_comment :vms, :uid_ems, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :updated_on, "The last date the VM was modified within the app."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :vendor, "The vendor for the VM, e.g. Azure, Amazon, etc."
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :version, "[DEFINITION NEEDED]"
bdunne marked this conversation as resolved.
Show resolved Hide resolved
change_column_comment :vms, :vnc_port, "Port or port range used for VNC connections."
end
end