Harshavardhana
2009-Jul-09 11:41 UTC
[Ovirt-devel] [PATCH 3/5 ovirt-server] Storage views patched for glusterfs drop down as one the Storage Pools
--- src/app/views/storage/_form.rhtml | 2 ++ src/app/views/storage/_list.rhtml | 4 ++++ src/app/views/storage/_list_volumes.rhtml | 4 ++++ src/app/views/storage/show.rhtml | 4 ++++ .../views/storage_volume/_new_volume_form.rhtml | 1 + src/app/views/storage_volume/show.rhtml | 8 ++++++++ 6 files changed, 23 insertions(+), 0 deletions(-) diff --git a/src/app/views/storage/_form.rhtml b/src/app/views/storage/_form.rhtml index ea2b0c4..1e7f22f 100644 --- a/src/app/views/storage/_form.rhtml +++ b/src/app/views/storage/_form.rhtml @@ -12,6 +12,8 @@ <%= text_field_with_label "Export Path:", 'storage_pool', 'export_path' if @storage_pool[:type] == "NfsStoragePool" %> +<%= text_field_with_label "Export Path:", 'storage_pool', 'export_path' if @storage_pool[:type] == "GlusterfsStoragePool" %> + <!--[eoform:storage_pool]--> diff --git a/src/app/views/storage/_list.rhtml b/src/app/views/storage/_list.rhtml index ccb0dbe..32e905a 100644 --- a/src/app/views/storage/_list.rhtml +++ b/src/app/views/storage/_list.rhtml @@ -11,6 +11,8 @@ <th>target</th> <%elsif type == StoragePool::NFS -%> <th>export path</th> +<%elsif type == StoragePool::GLUSTERFS -%> + <th>export path</th> <% end -%> <th class="empty"></th> </tr> @@ -28,6 +30,8 @@ <td><%= storage_pool[:target] %></td> <%elsif type == StoragePool::NFS -%> <td><%= storage_pool[:export_path] %></td> +<%elsif type == StoragePool::GLUSTERFS -%> + <td><%= storage_pool[:export_path] %></td> <% end -%> <%- if defined?(remove_from_pool) && remove_from_pool -%> <td><%= link_to( 'detach', { :controller => "storage", :action => 'remove_from_pool', :id => storage_pool, :hardware_pool_id => hardware_pool }, :confirm => 'Are you sure?', :method => :post, :class => "remove") %></td> diff --git a/src/app/views/storage/_list_volumes.rhtml b/src/app/views/storage/_list_volumes.rhtml index ab4f623..b30e83b 100644 --- a/src/app/views/storage/_list_volumes.rhtml +++ b/src/app/views/storage/_list_volumes.rhtml @@ -12,6 +12,8 @@ <th>LUN</th> <%elsif type == StoragePool::NFS -%> <th>export path</th> +<%elsif type == StoragePool::GLUSTERFS -%> + <th>export path</th> <% end -%> <th>size <span class="unit">(gigs)</span></th> </tr> @@ -30,6 +32,8 @@ <td><%= storage_volume.lun %></td> <%elsif type == StoragePool::NFS -%> <td><%= "#{storage_volume.storage_pool.export_path}/#{storage_volume.filename}" if storage_volume[:type] == "NfsStorageVolume" %></td> +<%elsif type == StoragePool::GLUSTERFS -%> + <td><%= "#{storage_volume.storage_pool.export_path}/#{storage_volume.filename}" if storage_volume[:type] == "GlusterfsStorageVolume" %></td> <% end -%> <td><%= storage_volume.size_in_gb %></td> </tr> diff --git a/src/app/views/storage/show.rhtml b/src/app/views/storage/show.rhtml index b0b1d4e..1366b13 100644 --- a/src/app/views/storage/show.rhtml +++ b/src/app/views/storage/show.rhtml @@ -29,6 +29,8 @@ Target:<br/> <% elsif @storage_pool[:type] == "NfsStoragePool" %> Export path:<br/> + <% elsif @storage_pool[:type] == "GlusterfsStoragePool" %> + Export volume:<br/> <% end %> Type:<br/> State:<br/> @@ -40,6 +42,8 @@ <%=h @storage_pool.target %><br/> <% elsif @storage_pool[:type] == "NfsStoragePool" %> <%=h @storage_pool.export_path %><br/> + <% elsif @storage_pool[:type] == "GlusterfsStoragePool" %> + <%=h @storage_pool.export_path %><br/> <% end %> <%=h @storage_pool.get_type_label %><br/> <%=h @storage_pool.state %><br/> diff --git a/src/app/views/storage_volume/_new_volume_form.rhtml b/src/app/views/storage_volume/_new_volume_form.rhtml index ae65e18..d066ab2 100644 --- a/src/app/views/storage_volume/_new_volume_form.rhtml +++ b/src/app/views/storage_volume/_new_volume_form.rhtml @@ -19,6 +19,7 @@ <%= text_field_with_label "Filename:", 'storage_volume', 'filename' if @storage_volume.get_type_label==StoragePool::NFS %> +<%= text_field_with_label "Filename:", 'storage_volume', 'filename' if @storage_volume.get_type_label==StoragePool::GLUSTERFS %> <!--[eoform:storage_volume]--> diff --git a/src/app/views/storage_volume/show.rhtml b/src/app/views/storage_volume/show.rhtml index cefc51a..e1de593 100644 --- a/src/app/views/storage_volume/show.rhtml +++ b/src/app/views/storage_volume/show.rhtml @@ -27,6 +27,8 @@ Target:<br/> <% elsif @storage_volume.storage_pool[:type] == "NfsStoragePool" %> Export path:<br/> + <% elsif @storage_volume.storage_pool[:type] == "GlusterfsStoragePool" %> + Export volume:<br/> <% end %> Type:<br/> State:<br/> @@ -35,6 +37,8 @@ LUN:<br/> <% elsif @storage_volume[:type] == "NfsStorageVolume" %> Filename:<br/> + <% elsif @storage_volume[:type] == "GlusterfsStorageVolume" %> + Filename:<br/> <% elsif @storage_volume[:type] == "LvmStorageVolume" %> Volume Group:<br/> Logical Volume:<br/> @@ -51,6 +55,8 @@ <%=h @storage_volume.storage_pool[:target] %><br/> <% elsif @storage_volume.storage_pool[:type] == "NfsStoragePool" %> <%=h @storage_volume.storage_pool.export_path %><br/> + <% elsif @storage_volume.storage_pool[:type] == "GlusterfsStoragePool" %> + <%=h @storage_volume.storage_pool.export_path %><br/> <% end %> <%=h @storage_volume.storage_pool.get_type_label %><br/> <%=h @storage_volume.state %><br/> @@ -59,6 +65,8 @@ <%=h @storage_volume.lun %><br/> <% elsif @storage_volume[:type] == "NfsStorageVolume" %> <%=h @storage_volume.filename %><br/> + <% elsif @storage_volume[:type] == "GlusterfsStorageVolume" %> + <%=h @storage_volume.filename %><br/> <% elsif @storage_volume[:type] == "LvmStorageVolume" %> <%=h @storage_volume.storage_pool.vg_name %><br/> <%=h @storage_volume.lv_name %><br/> -- 1.6.0.6
Seemingly Similar Threads
- [PATCH 3/5] Storage views patched for glusterfs drop down as one the Storage Pools
- [PATCH server] split StorageVolumeService.svc_new into two methods.
- [PATCH 1/5 ovirt-server] Add glusterfs to task-omatic API for {task_storage,utils}
- [TAKE-2][PATCH 1/5] Add glusterfs to task-omatic API for task_storage
- [PATCH server] Remove ununsed utils.rb file.