Yaniv Bronhaim has uploaded a new change for review. Change subject: Adding host bios fields to vdsStatic table ......................................................................
Adding host bios fields to vdsStatic table adding 6 new vars to vdsStatic Feature wiki page: http://wiki.ovirt.org/wiki/Features/Design/HostBiosInfo Change-Id: Id330288a13490475a61625eb0b6076153fec422f Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=867543 Signed-off-by: Yaniv Bronhaim <ybron...@redhat.com> --- M backend/manager/dbscripts/create_views.sql M backend/manager/dbscripts/upgrade/post_upgrade/0010_add_object_column_white_list_table.sql M backend/manager/dbscripts/vds_sp.sql 3 files changed, 60 insertions(+), 39 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/14/10114/1 diff --git a/backend/manager/dbscripts/create_views.sql b/backend/manager/dbscripts/create_views.sql index e7903c4..42f3b92 100644 --- a/backend/manager/dbscripts/create_views.sql +++ b/backend/manager/dbscripts/create_views.sql @@ -621,8 +621,9 @@ vds_groups.selection_algorithm as selection_algorithm, vds_static.vds_id as vds_id, vds_static.vds_name as vds_name, vds_static.ip as ip, vds_static.vds_unique_id as vds_unique_id, vds_static.host_name as host_name, vds_static.port as port, vds_static.vds_strength as vds_strength, vds_static.server_SSL_enabled as server_SSL_enabled, vds_static.vds_type as vds_type, vds_static.pm_type as pm_type, vds_static.pm_user as pm_user, vds_static.pm_password as pm_password, vds_static.pm_port as pm_port, - vds_static.pm_options as pm_options, vds_static.pm_enabled as pm_enabled, vds_static.vds_spm_priority as vds_spm_priority, vds_dynamic.hooks as hooks,vds_dynamic.status as status, vds_dynamic.cpu_cores as cpu_cores, vds_dynamic.cpu_model as cpu_model, - vds_dynamic.cpu_speed_mh as cpu_speed_mh, vds_dynamic.if_total_speed as if_total_speed, vds_dynamic.kvm_enabled as kvm_enabled, vds_dynamic.physical_mem_mb as physical_mem_mb, + vds_static.pm_options as pm_options, vds_static.pm_enabled as pm_enabled, vds_static.vds_spm_priority as vds_spm_priority, vds_dynamic.hooks as hooks,vds_dynamic.status as status, + vds_dynamic.cpu_cores as cpu_cores, + vds_dynamic.cpu_model as cpu_model, vds_dynamic.cpu_speed_mh as cpu_speed_mh, vds_dynamic.if_total_speed as if_total_speed, vds_dynamic.kvm_enabled as kvm_enabled, vds_dynamic.physical_mem_mb as physical_mem_mb, vds_dynamic.pending_vcpus_count as pending_vcpus_count, vds_dynamic.pending_vmem_size as pending_vmem_size,vds_dynamic.mem_commited as mem_commited, vds_dynamic.vm_active as vm_active, vds_dynamic.vm_count as vm_count, vds_dynamic.vm_migrating as vm_migrating, vds_dynamic.vms_cores_count as vms_cores_count, vds_dynamic.cpu_over_commit_time_stamp as cpu_over_commit_time_stamp, vds_dynamic.net_config_dirty as net_config_dirty, vds_groups.high_utilization as high_utilization, vds_groups.low_utilization as low_utilization, @@ -637,7 +638,8 @@ CASE WHEN storage_pool.spm_vds_id = vds_static.vds_id THEN CASE WHEN storage_pool.status = 5 THEN 1 ELSE 2 END ELSE 0 END as spm_status, vds_dynamic.supported_cluster_levels as supported_cluster_levels, vds_dynamic.supported_engines as supported_engines, vds_groups.compatibility_version as vds_group_compatibility_version, vds_dynamic.host_os as host_os, vds_dynamic.kvm_version as kvm_version, vds_dynamic.libvirt_version as libvirt_version, vds_dynamic.spice_version as spice_version, vds_dynamic.kernel_version as kernel_version, vds_dynamic.iscsi_initiator_name as iscsi_initiator_name, vds_dynamic.transparent_hugepages_state as transparent_hugepages_state, vds_dynamic.anonymous_hugepages as anonymous_hugepages, vds_dynamic.non_operational_reason as non_operational_reason, - vds_static.recoverable as recoverable, vds_static.sshKeyFingerprint as sshKeyFingerprint + vds_static.recoverable as recoverable, vds_static.sshKeyFingerprint as sshKeyFingerprint, vds_static.host_manufacturer as host_manufacturer, vds_static.host_product_name as host_product_name, vds_static.host_version as host_version, + vds_static.host_serial_number as host_serial_number, vds_static.host_uuid as host_uuid, vds_static.host_family as host_family FROM vds_groups INNER JOIN vds_static ON vds_groups.vds_group_id = vds_static.vds_group_id INNER JOIN vds_dynamic ON vds_static.vds_id = vds_dynamic.vds_id INNER JOIN diff --git a/backend/manager/dbscripts/upgrade/post_upgrade/0010_add_object_column_white_list_table.sql b/backend/manager/dbscripts/upgrade/post_upgrade/0010_add_object_column_white_list_table.sql index 309b636..01ef6b2 100644 --- a/backend/manager/dbscripts/upgrade/post_upgrade/0010_add_object_column_white_list_table.sql +++ b/backend/manager/dbscripts/upgrade/post_upgrade/0010_add_object_column_white_list_table.sql @@ -41,7 +41,7 @@ 'vds_group_id', 'vds_group_name', 'vds_group_description', 'selection_algorithm', 'vds_id', 'vds_name', 'ip', 'vds_unique_id', 'host_name', 'port', 'vds_strength', 'server_ssl_enabled', 'vds_type', 'pm_type', 'pm_user', 'pm_password', 'pm_port', - 'pm_options', 'pm_enabled', 'vds_spm_priority', 'hooks', 'status', 'cpu_cores', + 'pm_options', 'pm_enabled', 'vds_spm_priority', 'hooks', 'status','cpu_cores', 'cpu_model', 'cpu_speed_mh', 'if_total_speed', 'kvm_enabled', 'physical_mem_mb', 'pending_vcpus_count', 'pending_vmem_size', 'mem_commited', 'vm_active', 'vm_count', 'vm_migrating', 'vms_cores_count', 'cpu_over_commit_time_stamp', 'hypervisor_type', @@ -54,7 +54,8 @@ 'otp_validity', 'spm_status', 'supported_cluster_levels', 'supported_engines', 'vds_group_compatibility_version', 'host_os', 'kvm_version', 'libvirt_version', 'spice_version', 'kernel_version', 'iscsi_initiator_name', 'transparent_hugepages_state', 'anonymous_hugepages', - 'non_operational_reason', 'recoverable', 'sshKeyFingerprint')); + 'non_operational_reason', 'recoverable', 'sshKeyFingerprint', 'host_manufacturer', + 'host_product_name', 'host_version', 'host_serial_number', 'host_uuid', 'host_family')); -- pm_options are missing END; $function$ LANGUAGE plpgsql; diff --git a/backend/manager/dbscripts/vds_sp.sql b/backend/manager/dbscripts/vds_sp.sql index 40ce2c4..0501e06 100644 --- a/backend/manager/dbscripts/vds_sp.sql +++ b/backend/manager/dbscripts/vds_sp.sql @@ -135,7 +135,8 @@ -- -Create or replace FUNCTION InsertVdsDynamic(v_cpu_cores INTEGER , +Create or replace FUNCTION InsertVdsDynamic( + v_cpu_cores INTEGER , v_cpu_model VARCHAR(255) , v_cpu_speed_mh DECIMAL(18,0) , v_if_total_speed VARCHAR(40) , @@ -189,7 +190,8 @@ -Create or replace FUNCTION UpdateVdsDynamic(v_cpu_cores INTEGER , +Create or replace FUNCTION UpdateVdsDynamic( + v_cpu_cores INTEGER , v_cpu_model VARCHAR(255) , v_cpu_speed_mh DECIMAL(18,0) , v_if_total_speed VARCHAR(40) , @@ -235,7 +237,7 @@ BEGIN UPDATE vds_dynamic - SET cpu_cores = v_cpu_cores,cpu_model = v_cpu_model,cpu_speed_mh = v_cpu_speed_mh, + SET cpu_cores = v_cpu_cores, cpu_model = v_cpu_model,cpu_speed_mh = v_cpu_speed_mh, if_total_speed = v_if_total_speed,kvm_enabled = v_kvm_enabled, mem_commited = v_mem_commited,physical_mem_mb = v_physical_mem_mb, status = v_status,vm_active = v_vm_active,vm_count = v_vm_count, @@ -318,31 +320,37 @@ Create or replace FUNCTION InsertVdsStatic( - v_vds_id UUID, - v_host_name VARCHAR(255), - v_ip VARCHAR(255) , - v_vds_unique_id VARCHAR(128) , - v_port INTEGER, - v_vds_group_id UUID, - v_vds_name VARCHAR(255), - v_server_SSL_enabled BOOLEAN , - v_vds_type INTEGER, - v_vds_strength INTEGER, - v_pm_type VARCHAR(20) , - v_pm_user VARCHAR(50) , - v_pm_password VARCHAR(50) , - v_pm_port INTEGER , - v_pm_options VARCHAR(4000) , - v_pm_enabled BOOLEAN, - v_vds_spm_priority INTEGER, - v_sshKeyFingerprint VARCHAR(128)) + v_vds_id UUID, + v_host_name VARCHAR(255), + v_ip VARCHAR(255) , + v_vds_unique_id VARCHAR(128) , + v_port INTEGER, + v_vds_group_id UUID, + v_vds_name VARCHAR(255), + v_server_SSL_enabled BOOLEAN , + v_vds_type INTEGER, + v_vds_strength INTEGER, + v_pm_type VARCHAR(20) , + v_pm_user VARCHAR(50) , + v_pm_password VARCHAR(50) , + v_pm_port INTEGER , + v_pm_options VARCHAR(4000) , + v_pm_enabled BOOLEAN, + v_vds_spm_priority INTEGER, + v_sshKeyFingerprint VARCHAR(128), + v_host_manufacturer VARCHAR(40), + v_host_product_name VARCHAR(40), + v_host_version VARCHAR(40), + v_host_serial_number VARCHAR(40), + v_host_uuid VARCHAR(40), + v_host_family VARCHAR(40)) RETURNS VOID AS $procedure$ BEGIN IF v_vds_unique_id IS NULL OR NOT EXISTS(SELECT vds_name FROM vds_static WHERE vds_unique_id = v_vds_unique_id) then BEGIN - INSERT INTO vds_static(vds_id,host_name, ip, vds_unique_id, port, vds_group_id, vds_name, server_SSL_enabled,vds_type,vds_strength,pm_type,pm_user,pm_password,pm_port,pm_options,pm_enabled, vds_spm_priority, sshKeyFingerprint) - VALUES(v_vds_id,v_host_name, v_ip, v_vds_unique_id, v_port, v_vds_group_id, v_vds_name, v_server_SSL_enabled,v_vds_type,v_vds_strength,v_pm_type,v_pm_user,v_pm_password,v_pm_port,v_pm_options,v_pm_enabled, v_vds_spm_priority, v_sshKeyFingerprint); + INSERT INTO vds_static(vds_id,host_name, ip, vds_unique_id, port, vds_group_id, vds_name, server_SSL_enabled,vds_type,vds_strength,pm_type,pm_user,pm_password,pm_port,pm_options,pm_enabled, vds_spm_priority, sshKeyFingerprint, host_manufacturer, host_product_name, host_version, host_serial_number, host_uuid, host_family) + VALUES(v_vds_id,v_host_name, v_ip, v_vds_unique_id, v_port, v_vds_group_id, v_vds_name, v_server_SSL_enabled,v_vds_type,v_vds_strength,v_pm_type,v_pm_user,v_pm_password,v_pm_port,v_pm_options,v_pm_enabled, v_vds_spm_priority, v_sshKeyFingerprint, v_host_manufacturer, v_host_product_name, v_host_version, v_host_serial_number, v_host_uuid, v_host_family); END; end if; RETURN; @@ -354,24 +362,30 @@ Create or replace FUNCTION UpdateVdsStatic(v_host_name VARCHAR(255), - v_ip VARCHAR(255) , + v_ip VARCHAR(255) , v_vds_unique_id VARCHAR(128), - v_port INTEGER, - v_vds_group_id UUID, - v_vds_id UUID, - v_vds_name VARCHAR(255), - v_server_SSL_enabled BOOLEAN , - v_vds_type INTEGER, - v_vds_strength INTEGER, + v_port INTEGER, + v_vds_group_id UUID, + v_vds_id UUID, + v_vds_name VARCHAR(255), + v_server_SSL_enabled BOOLEAN , + v_vds_type INTEGER, + v_vds_strength INTEGER, v_pm_type VARCHAR(20) , - v_pm_user VARCHAR(50) , + v_pm_user VARCHAR(50) , v_pm_password VARCHAR(50) , v_pm_port INTEGER , v_pm_options VARCHAR(4000) , v_pm_enabled BOOLEAN, v_otp_validity BIGINT, v_vds_spm_priority INTEGER, - v_sshKeyFingerprint VARCHAR(128)) + v_sshKeyFingerprint VARCHAR(128), + v_host_manufacturer VARCHAR(40), + v_host_product_name VARCHAR(40), + v_host_version VARCHAR(40), + v_host_serial_number VARCHAR(40), + v_host_uuid VARCHAR(40), + v_host_family VARCHAR(40)) RETURNS VOID --The [vds_static] table doesn't have a timestamp column. Optimistic concurrency logic cannot be generated @@ -385,7 +399,10 @@ vds_type = v_vds_type, _update_date = LOCALTIMESTAMP,vds_strength = v_vds_strength, pm_type = v_pm_type,pm_user = v_pm_user,pm_password = v_pm_password, - pm_port = v_pm_port,pm_options = v_pm_options,pm_enabled = v_pm_enabled, otp_validity = v_otp_validity, vds_spm_priority = v_vds_spm_priority, sshKeyFingerprint = v_sshKeyFingerprint + pm_port = v_pm_port,pm_options = v_pm_options,pm_enabled = v_pm_enabled, otp_validity = v_otp_validity, vds_spm_priority = v_vds_spm_priority, sshKeyFingerprint = v_sshKeyFingerprint, + host_manufacturer = v_host_manufacturer, host_product_name = v_host_product_name, + host_version = v_host_version, host_serial_number = v_host_serial_number, + host_uuid = v_host_uuid, host_family = v_host_family WHERE vds_id = v_vds_id; END; @@ -888,3 +905,4 @@ END; $procedure$ LANGUAGE plpgsql; + -- To view, visit http://gerrit.ovirt.org/10114 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id330288a13490475a61625eb0b6076153fec422f Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches