ACK - though there are still some issues - but you could just patch ontop of these?
i tried with mock driver as you suggested on irc - things that didn't work (but work with curl for example): 127.0.0.1 - - [20/Nov/2012 15:10:34] "GET /cimi/machines/inst0/disks HTTP/1.1" 404 461 0.0084 127.0.0.1 - - [20/Nov/2012 15:11:02] "GET /cimi/machines/inst0/volumes HTTP/1.1" 404 463 0.0080 127.0.0.1 - - [20/Nov/2012 15:12:33] "GET /cimi/forwarding_groups/group1 HTTP/1.1" 404 465 0.0168 127.0.0.1 - - [20/Nov/2012 15:26:55] "GET /cimi/network_ports HTTP/1.1" 404 454 0.0077 127.0.0.1 - - [20/Nov/2012 15:28:18] "GET /cimi/network_port_templates HTTP/1.1" 404 463 0.0115 127.0.0.1 - - [20/Nov/2012 15:28:59] "GET /cimi/addresses HTTP/1.1" 404 450 0.0168 127.0.0.1 - - [20/Nov/2012 15:30:29] "GET /cimi/network_port_configurations HTTP/1.1" 404 468 0.0075 also, http://localhost:4001/cimi/volume_configurations/4 - units - probably this is 4 megs, which should be made into kibibytes marios On 20/11/12 15:06, [email protected] wrote: > From: Michal Fojtik <[email protected]> > > > Signed-off-by: Michal fojtik <[email protected]> > --- > clients/cimi/lib/cimi_frontend_helper.rb | 11 ++++-- > clients/cimi/lib/entities/cloud_entry_point.rb | 4 +- > clients/cimi/public/app.css | 12 ++++-- > clients/cimi/views/cloud_entry_point/index.haml | 16 +++----- > clients/cimi/views/layout.haml | 13 +++++-- > .../cimi/views/machine_configurations/index.haml | 16 ++------ > .../cimi/views/machine_configurations/show.haml | 14 ++----- > clients/cimi/views/machine_images/index.haml | 14 ++----- > clients/cimi/views/machine_images/show.haml | 10 ++--- > clients/cimi/views/machines/index.haml | 12 +++--- > clients/cimi/views/machines/show.haml | 43 > ++++++++++++---------- > .../cimi/views/network_configurations/index.haml | 15 ++------ > .../cimi/views/network_configurations/show.haml | 18 +++------ > clients/cimi/views/network_templates/index.haml | 16 +++----- > clients/cimi/views/network_templates/show.haml | 11 ++---- > clients/cimi/views/networks/index.haml | 15 ++------ > clients/cimi/views/networks/show.haml | 17 +++------ > .../cimi/views/volume_configurations/index.haml | 6 +-- > clients/cimi/views/volume_configurations/show.haml | 13 +------ > clients/cimi/views/volume_images/index.haml | 8 ++-- > clients/cimi/views/volume_images/show.haml | 12 ++---- > clients/cimi/views/volumes/index.haml | 8 ++-- > clients/cimi/views/volumes/show.haml | 21 +++-------- > 23 files changed, 122 insertions(+), 203 deletions(-) > > diff --git a/clients/cimi/lib/cimi_frontend_helper.rb > b/clients/cimi/lib/cimi_frontend_helper.rb > index 4ec6fd1..99dbc7c 100644 > --- a/clients/cimi/lib/cimi_frontend_helper.rb > +++ b/clients/cimi/lib/cimi_frontend_helper.rb > @@ -32,7 +32,11 @@ module CIMI > > def href_to_id(href) > return '' unless href > - href.split('/').last > + href.split('/').last.strip > + end > + > + def collection_name(obj) > + obj.class.name.split('::').last > end > > def flash_block_for(message_type) > @@ -104,12 +108,13 @@ module CIMI > end > > def details(title='', &block) > + title = title.empty? ? 'Details' : title > haml_tag :table, { :class => 'table table-bordered table-striped' } > do > haml_tag :caption do > - haml_tag :h3 do > + haml_tag :h5 do > haml_concat title > end > - end unless title.empty? > + end > haml_tag :tbody, &block > end > end > diff --git a/clients/cimi/lib/entities/cloud_entry_point.rb > b/clients/cimi/lib/entities/cloud_entry_point.rb > index 77bad66..edf7c50 100644 > --- a/clients/cimi/lib/entities/cloud_entry_point.rb > +++ b/clients/cimi/lib/entities/cloud_entry_point.rb > @@ -15,10 +15,12 @@ > > > class CIMI::Frontend::CloudEntryPoint < CIMI::Frontend::Entity > + > get '/cimi/cloudEntryPoint' do > entry_point_xml = get_entity_collection('cloudEntryPoint', credentials) > + puts XmlSimple.xml_in(entry_point_xml).inspect > haml :'cloud_entry_point/index', :locals => { > - :entry_point => CIMI::Model::CloudEntryPoint.from_xml(entry_point_xml) > + :entry_point => XmlSimple.xml_in(entry_point_xml) > } > end > > diff --git a/clients/cimi/public/app.css b/clients/cimi/public/app.css > index 74ccfa4..ecfb8ed 100644 > --- a/clients/cimi/public/app.css > +++ b/clients/cimi/public/app.css > @@ -7,6 +7,7 @@ body { > } > .container > footer p { > text-align: center; /* center align it with the container */ > + font-size : 80%; > } > .container { > width: 820px; /* downsize our container to make the content feel a bit > tighter and more cohesive. NOTE: this removes two full columns from the grid, > meaning you only go to 14 columns and not 16. */ > @@ -28,16 +29,17 @@ body { > /* Page header tweaks */ > .page-header { > background-color: #f5f5f5; > - margin: -20px -20px 10px; > + margin: -28px -20px 10px; > padding-bottom : 0px; > } > > .page-header h1 { > padding : 10px 20px; > -} > +} > > .page-header .breadcrumb { > - margin : 5px -1px 0px -1px; > + margin : 5px 0px 0px 0px; > + border-top: 1px solid rgba(0,0,0,.15); > } > > /* Styles you shouldn't keep as they are for displaying this base example > only */ > @@ -60,10 +62,12 @@ body { > margin-right : 30px; > } > > -#toolbar p:first-child { > +#toolbar { > text-align : right; > } > > table caption h3 { > text-align : left; > } > + > +h5 { text-align : left; } > diff --git a/clients/cimi/views/cloud_entry_point/index.haml > b/clients/cimi/views/cloud_entry_point/index.haml > index d4d2b89..866adb7 100644 > --- a/clients/cimi/views/cloud_entry_point/index.haml > +++ b/clients/cimi/views/cloud_entry_point/index.haml > @@ -1,4 +1,4 @@ > -- @title=entry_point.name > +- @title=entry_point['name'].first > > - content_for :breadcrumb do > %ul.breadcrumb > @@ -7,16 +7,10 @@ > > - content_for :actions do > %p > - %a{ :href => "#{entry_point.id}?format=xml", :class => 'label warning' } > XML > - %a{ :href => "#{entry_point.id}?format=json", :class => 'label warning' > } JSON > + %a{ :href => "#{entry_point['id'].first}?format=xml", :class => 'label > warning' } XML > + %a{ :href => "#{entry_point['id'].first}?format=json", :class => 'label > warning' } JSON > > %ul > - - entry_point.entities.each do |name, struct| > + - entry_point.select { |k, v| !v.kind_of?(String) and v.first['href'] > }.each do |k, v| > %li > - %a{ :href => '/cimi/'+href_to_id(struct.href) }=name.to_s.camelize > - > -- details do > - - row 'ID', entry_point.id > - - row 'Base URI', entry_point.base_uri > - - row 'Description', entry_point.description > - - row 'Created', entry_point.created > + %a{ :href => '/cimi/'+href_to_id(v.first['href']) }=k > diff --git a/clients/cimi/views/layout.haml b/clients/cimi/views/layout.haml > index 44007cb..7a99733 100644 > --- a/clients/cimi/views/layout.haml > +++ b/clients/cimi/views/layout.haml > @@ -18,7 +18,7 @@ > .navbar.navbar-fixed-top > .navbar-inner > .container-fluid > - %a.brand{ :href => '/' } CIMI > + %a.brand{ :href => '/' } CIMI Client > .nav-collapse > %ul.nav > %li.dropdown > @@ -34,6 +34,14 @@ > %a{ :href => '#providerModal', :onclick => > "toggleConfig('rhevm')"} RHEV-M > %li > %a{ :href => '#providerModal', :onclick => > "toggleConfig('openstack')"} OpenStack > + %li > + %a{ :href => '#providerModal', :onclick => > "toggleConfig('vsphere')"} VSphere > + %li > + %a{ :href => '#providerModal', :onclick => > "toggleConfig('fcgp')"} FCGP > + %li > + %a{ :href => '#providerModal', :onclick => > "toggleConfig('gogrid')"} GoGrid > + .pull-right{ :style => 'margin-top: 9px;'} > + .muted=ENV['CIMI_API_URL'] > > .container > %div{ :id => 'providerModal', :class => 'modal hide fade' } > @@ -58,8 +66,7 @@ > %label.control-label API Provider > .controls > %input{ :type => :text, :class => :span3, :placeholder > => 'http://', :name => :provider, :value => credentials.provider} > - %br/ > - %span{ :class => 'help-inline'} Enter driver specific > provider URL > + %span{ :class => 'help-inline'} Enter driver specific > provider URL (optional) > .modal-footer > %a{ :href => '#', :class => 'btn btn-primary', :id => > 'saveProvider'} Continue > %a{ :href => '#', :class => 'btn', :'data-dismiss' => 'modal'} > Cancel > diff --git a/clients/cimi/views/machine_configurations/index.haml > b/clients/cimi/views/machine_configurations/index.haml > index 669daee..979dbae 100644 > --- a/clients/cimi/views/machine_configurations/index.haml > +++ b/clients/cimi/views/machine_configurations/index.haml > @@ -1,31 +1,23 @@ > -- @title=@machine_configurations.name > +- @title=collection_name @machine_configurations > > - content_for :breadcrumb do > %ul.breadcrumb > %li > %a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint > %span.divider="/" > - %li.active > - MachineConfigurationCollection > + %li.active=collection_name @machine_configurations > > - content_for :actions do > %p > %a{ :href => "#{@machine_configurations.id}?format=xml", :class => > 'label warning' } XML > %a{ :href => "#{@machine_configurations.id}?format=json", :class => > 'label warning' } JSON > > -%blockquote > - %p > - A Machine Configuration Collection entity represents the collection of > - Machine Configuration entities within a Provider. This entity can be > used to > - locate and create Machine Configurations. > - > %h3 MachineConfigurationCollection > %ul > - @machine_configurations.machine_configurations.each do |conf| > %li > %a{ :href => > "/cimi/machine_configurations/#{href_to_id(conf.id)}"}=href_to_id(conf.id) > > -- details('Collection details') do > +- details do > - row 'ID', @machine_configurations.id > - - row 'Description', @machine_configurations.description > - - row 'Created', @machine_configurations.created > + - row 'Count', @machine_configurations.count > diff --git a/clients/cimi/views/machine_configurations/show.haml > b/clients/cimi/views/machine_configurations/show.haml > index 2caa0cd..d5ac78a 100644 > --- a/clients/cimi/views/machine_configurations/show.haml > +++ b/clients/cimi/views/machine_configurations/show.haml > @@ -16,18 +16,12 @@ > %a{ :href => "#{@machine_configuration.id}?format=xml", :class => 'label > warning' } XML > %a{ :href => "#{@machine_configuration.id}?format=json", :class => > 'label warning' } JSON > > -%blockquote > - %p > - The Machine Configuration entity represents the set of configuration > values > - that define the (virtual) hardware resources of a to-be-realized Machine > - Instance. Machine Configurations are created by Providers and MAY, at the > - Providers discretion, be created by Consumers. > - > -- details('MachineConfiguration details') do > +- details do > - row 'ID', @machine_configuration.id > + - row 'Name', @machine_configuration.name > - row 'Description', @machine_configuration.description > - row 'Created', @machine_configuration.created > - - row '# of CPU', @machine_configuration.cpu > + - row 'Num of CPUs', @machine_configuration.cpu > - row 'Memory (RAM)', @machine_configuration.memory > - - row 'Storage (disks)', @machine_configuration.disks.map { |d| d.capacity > }.join(',') > + - row 'Storage (disks)', @machine_configuration.disks.map { |d| > [d.capacity, d.format].join(' ') }.join(',') > > diff --git a/clients/cimi/views/machine_images/index.haml > b/clients/cimi/views/machine_images/index.haml > index af4da79..5ebf468 100644 > --- a/clients/cimi/views/machine_images/index.haml > +++ b/clients/cimi/views/machine_images/index.haml > @@ -1,4 +1,4 @@ > -- @title=@machine_images.name > +- @title=collection_name @machine_images > > - content_for :breadcrumb do > %ul.breadcrumb > @@ -13,19 +13,11 @@ > %a{ :href => "#{@machine_images.id}?format=xml", :class => 'label > warning' } XML > %a{ :href => "#{@machine_images.id}?format=json", :class => 'label > warning' } JSON > > -%blockquote > - %p > - A Machine Image Collection entity represents the collection of Machine > Image > - entities within a Provider. This entity can be used to locate and create > - Machine Images. > - > -%h3 MachineImageCollection > %ul > - @machine_images.machine_images.each do |image| > %li > - %a{ :href => > "/cimi/machine_images/#{image.href.split('/').last}"}=image.href.split('/').last > + %a{ :href => "/cimi/machine_images/#{href_to_id > image.id}"}=href_to_id(image.id) > > - details('Collection details') do > - row 'ID', @machine_images.id > - - row 'Description', @machine_images.description > - - row 'Created', @machine_images.created > + - row 'Count', @machine_images.count > diff --git a/clients/cimi/views/machine_images/show.haml > b/clients/cimi/views/machine_images/show.haml > index 0dfda3f..1bbe6c7 100644 > --- a/clients/cimi/views/machine_images/show.haml > +++ b/clients/cimi/views/machine_images/show.haml > @@ -16,15 +16,11 @@ > %a{ :href => "#{@machine_image.id}?format=xml", :class => 'label > warning' } XML > %a{ :href => "#{@machine_image.id}?format=json", :class => 'label > warning' } JSON > > -%blockquote > - %p > - This entity represents the information (e.g. an Open Virtualization > Format > - (OVF) package) necessary for hardware virtualized resources to create a > - Machine Instance > - > -- details 'MachineImage details' do > +- details do > - row 'ID', @machine_image.id > + - row 'Name', @machine_image.name > - row 'Description', @machine_image.description > + - row 'State', @machine_image.state > - row 'Created', @machine_image.created > - row 'Image Location', @machine_image.image_location.href > - row 'Image Data', @machine_image.image_data > diff --git a/clients/cimi/views/machines/index.haml > b/clients/cimi/views/machines/index.haml > index 108c89f..cfe832f 100644 > --- a/clients/cimi/views/machines/index.haml > +++ b/clients/cimi/views/machines/index.haml > @@ -1,4 +1,4 @@ > -- @[email protected] > +- @title=collection_name @machines > > - content_for :breadcrumb do > %ul.breadcrumb > @@ -9,9 +9,7 @@ > MachineCollection > > - content_for :actions do > - %p > - %a{ :href => "#{@machines.id}?format=xml", :class => 'label warning' } > XML > - %a{ :href => "#{@machines.id}?format=json", :class => 'label warning' } > JSON > + > %p > %a{ :href => '#machineModal', :class => 'btn btn-primary', > :'data-toggle' => :modal} New Machine > > @@ -44,6 +42,9 @@ > .modal-footer > %a{ :href => '#', :class => 'btn btn-primary', :'data-loading-text' => > 'Creating MachineAdmin...', :onclick => "postModalForm(this, > 'machineModal')"} Continue > %a{ :href => '#', :class => 'btn', :'data-dismiss' => 'modal'} Cancel > + %p{:style => 'text-align:right;'} > + %a{ :href => "#{@machines.id}?format=xml", :class => 'label warning' } > XML > + %a{ :href => "#{@machines.id}?format=json", :class => 'label warning' } > JSON > > %ul > - @machines.machines.each do |machine| > @@ -60,5 +61,4 @@ > > - details do > - row 'ID', @machines.id > - - row 'Description', @machines.description > - - row 'Created', @machines.created > + - row 'Count', @machines.count > diff --git a/clients/cimi/views/machines/show.haml > b/clients/cimi/views/machines/show.haml > index c000a27..c7e5599 100644 > --- a/clients/cimi/views/machines/show.haml > +++ b/clients/cimi/views/machines/show.haml > @@ -12,36 +12,38 @@ > = @machine.name > > - content_for :actions do > - %p > - %a{ :href => "#{@machine.id}?format=xml", :class => 'label warning' } XML > - %a{ :href => "#{@machine.id}?format=json", :class => 'label warning' } > JSON > - %p > + > + %div{:class => 'btn-group btn-group-vertical'} > + %form{ :action => "/cimi/machines/#{href_to_id @machine.id}/stop", > :method => :post, :style => 'display:inline', :id => 'frm_stop'} > + %form{ :action => "/cimi/machines/#{href_to_id @machine.id}/start", > :method => :post, :style => 'display:inline', :id => 'frm_start'} > + %form{ :action => "/cimi/machines/#{href_to_id @machine.id}/restart", > :method => :post, :style => 'display:inline', :id => 'frm_restart'} > + %form{ :action => "/cimi/machines/#{href_to_id @machine.id}/delete", > :method => :post, :style => 'display:inline', :id => 'frm_delete'} > + %input{ :type => :hidden, :name => '_method', :value => 'delete'} > - if @machine.state == 'STARTED' > - %form{ :action => "/cimi/machines/#{@machine.name}/stop", :method => > :post, :style => 'display:inline'} > - %button{ :class => 'btn'} Stop > + %button{ :class => 'btn btn-warning', :type => :button, :onclick => > '$("#frm_stop").submit()'} Stop > - if @machine.state == 'STOPPED' > - %form{ :action => "/cimi/machines/#{@machine.name}/start", :method => > :post, :style => 'display:inline'} > - %button{ :class => 'btn success'} Start > - %form{ :action => "/cimi/machines/#{@machine.name}/restart", :method => > :post, :style => 'display:inline'} > - %button{ :class => 'btn info'} Restart > - %form{ :action => "/cimi/machines/#{@machine.name}/delete", :method => > :post, :style => 'display:inline'} > - %input{ :type => :hidden, :name => '_method', :value => 'delete'} > - %button{ :class => 'btn danger'} Destroy > + %button{ :class => 'btn btn-success', :type => :button, :onclick => > '$("#frm_start").submit()'} Start > + %button{ :class => 'btn btn-info', :type => :button, :onclick => > '$("#frm_restart").submit()'} Reboot > + %button{ :class => 'btn btn-danger', :type => :button, :onclick => > '$("#frm_delete").submit()'} Destroy > > --details 'Machine details' do > + %p{:style => 'margin-top:1em;'} > + %a{ :href => "#{@machine.id}?format=xml", :class => 'label warning' } XML > + %a{ :href => "#{@machine.id}?format=json", :class => 'label warning' } > JSON > + > +- details do > -row 'ID', @machine.id > + -row 'Name',@machine.name > -row 'Description',@machine.description > - -row 'Created', @machine.created > -row 'State',state_span_for(@machine.state) > -row 'CPU', boolean_span_for(@machine.cpu) > -row 'RAM', @machine.memory > -row 'Meters', (@machine.meters.empty? ? "No meters" : ( > @machine.meters.each{|meter| meters.id})) > - -row 'Network Interfaces', @machine.network_interfaces.href > - -row 'Volumes', @machine.volumes.machine_volumes.first['href'] > - -row 'Disks', @machine.disks.disks.first['href'] > + -row 'Created', @machine.created > + -row 'Disks', url("/cimi/machines/#{href_to_id @machine.id}/disks") > + -row 'Volumes', url("/cimi/machines/#{href_to_id @machine.id}/volumes") > > > -%h3 Properties > +%h5 Properties > %table{ :class => 'table table-bordered table-striped' } > %thead > %tr > @@ -50,6 +52,7 @@ > %tbody > - @machine.property.each do |name, value| > %tr > - %td=name > + %td > + %code=name > %td=convert_urls value > > diff --git a/clients/cimi/views/network_configurations/index.haml > b/clients/cimi/views/network_configurations/index.haml > index de6d42f..8cc7ce9 100644 > --- a/clients/cimi/views/network_configurations/index.haml > +++ b/clients/cimi/views/network_configurations/index.haml > @@ -1,4 +1,4 @@ > -- @title=@network_configs.description > +- @title=collection_name @network_configs > > - content_for :breadcrumb do > %ul.breadcrumb > @@ -7,24 +7,17 @@ > %span.divider="/" > %li.active > NetworkConfigurationCollection > + > - content_for :actions do > %p > %a{ :href => "#{@network_configs.id}?format=xml", :class => 'label > warning' } XML > %a{ :href => "#{@network_configs.id}?format=json", :class => 'label > warning' } JSON > > -%blockquote > - %p > - A Network Configuration Collection entity represents the collection > - of Network Configurations within a Provider. This entity can be used > - to locate and create Network Configurations > - > -%h3 NetworkConfigurationCollection > %ul > - @network_configs.network_configurations.each do |conf| > %li > - %a{ :href => > "/cimi/network_configurations/#{conf.href.split('/').last}"}=conf.href.split('/').last > + %a{ :href => > "/cimi/network_configurations/#{href_to_id(conf.id)}"}=href_to_id(conf.id) > > -details 'NetworkConfigurationCollection details' do > -row 'ID', @network_configs.id > - -row 'Description', @network_configs.description > - -row 'Created', @network_configs.created > + -row 'Count', @network_configs.count > diff --git a/clients/cimi/views/network_configurations/show.haml > b/clients/cimi/views/network_configurations/show.haml > index 9c1a0b1..32245e4 100644 > --- a/clients/cimi/views/network_configurations/show.haml > +++ b/clients/cimi/views/network_configurations/show.haml > @@ -16,18 +16,10 @@ > %a{ :href => "#{@network_config.id}?format=xml", :class => 'label > warning' } XML > %a{ :href => "#{@network_config.id}?format=json", :class => 'label > warning' } JSON > > -%blockquote > - %p > - A Network Configuration entity is the set of configuration values > representing > - the information needed to create a Network with certain characteristics. > - > --details 'NetworkConfiguration details' do > - -row 'id', @network_config.id > +-details do > + -row 'ID', @network_config.id > -row 'Description',@network_config.description > -row 'Created',@network_config.created > - -row 'Access',@network_config.access > - -row 'Bandwidth Limit',@network_config.bandwidth_limit > - -row 'Traffic Priority',@network_config.traffic_priority > - -row 'Maximum Traffic Delay',@network_config.max_traffic_delay > - -row 'Maximum Traffic Loss',@network_config.max_traffic_loss > - -row 'Maximum Traffic Jitter',@network_config.max_traffic_jitter > + -row 'Type', @network_config.network_type > + -row 'MTU', @network_config.mtu > + -row 'Service Class', @network_config.class_of_service > diff --git a/clients/cimi/views/network_templates/index.haml > b/clients/cimi/views/network_templates/index.haml > index 09eed69..2145716 100644 > --- a/clients/cimi/views/network_templates/index.haml > +++ b/clients/cimi/views/network_templates/index.haml > @@ -1,4 +1,4 @@ > -- @title=@network_templates.description > +- @title=collection_name @network_templates > > - content_for :breadcrumb do > %ul.breadcrumb > @@ -7,23 +7,17 @@ > %span.divider="/" > %li.active > NetworkTemplateCollection > + > - content_for :actions do > %p > %a{ :href => "#{@network_templates.id}?format=xml", :class => 'label > warning' } XML > %a{ :href => "#{@network_templates.id}?format=json", :class => 'label > warning' } JSON > > -%blockquote > - %p > - A Network Template Collection entity represents the collection of > NetworkTemplates within a Provider. > - This resource can be used to locate and create NetworkTemplates > - > -%h3 NetworkTemplateCollection > %ul > - @network_templates.network_templates.each do |template| > %li > - %a{ :href => > "/cimi/network_templates/#{template.href.split('/').last}"}=template.href.split('/').last > + %a{ :href => > "/cimi/network_templates/#{href_to_id(template.id)}"}=href_to_id(template.id) > > --details 'NetworkTemplateCollection details' do > +-details do > -row 'ID', @network_templates.id > - -row 'Description', @network_templates.description > - -row 'Created', @network_templates.created > + -row 'Count', @network_templates.count > diff --git a/clients/cimi/views/network_templates/show.haml > b/clients/cimi/views/network_templates/show.haml > index 7977b74..0a9a8a6 100644 > --- a/clients/cimi/views/network_templates/show.haml > +++ b/clients/cimi/views/network_templates/show.haml > @@ -15,14 +15,11 @@ > %p > %a{ :href => "#{@network_template.id}?format=xml", :class => 'label > warning' } XML > %a{ :href => "#{@network_template.id}?format=json", :class => 'label > warning' } JSON > -%blockquote > - %p > - The Network Template is a set of configuration values for realizing a > Network. > - An instance of Network Template may be used to create multiple Networks > > --details 'NetworkConfiguration details' do > +-details do > -row 'ID', @network_template.id > + -row 'Name',@network_template.name > -row 'Description',@network_template.description > -row 'Created',@network_template.created > - -row 'NetworkConfiguration', @network_template.network_config.href > - -row 'RoutingGroup', @network_template.routing_group.href > + -row 'Network Config', url("/cimi/network_config/#{href_to_id > @network_template.network_config.href}") > + -row 'Forwarding Group', url("/cimi/forwarding_groups/#{href_to_id > @network_template.forwarding_group.href}") > diff --git a/clients/cimi/views/networks/index.haml > b/clients/cimi/views/networks/index.haml > index 74ecb1d..2ebd23f 100644 > --- a/clients/cimi/views/networks/index.haml > +++ b/clients/cimi/views/networks/index.haml > @@ -1,4 +1,4 @@ > -- @[email protected] > +- @title=collection_name @networks > > - content_for :breadcrumb do > %ul.breadcrumb > @@ -13,18 +13,11 @@ > %a{ :href => "#{@networks.id}?format=xml", :class => 'label warning' } > XML > %a{ :href => "#{@networks.id}?format=json", :class => 'label warning' } > JSON > > -%blockquote > - %p > - A Network Collection entity represents the collection of Networks > - within a Provider. This entity can be used to locate and create Networks. > - > -%h3 NetworkCollection > %ul > - @networks.networks.each do |network| > %li > - %a{ :href => > "/cimi/networks/#{network.href.split('/').last}"}=network.href.split('/').last > + %a{ :href => > "/cimi/networks/#{href_to_id(network.id)}"}=href_to_id(network.id) > > --details 'NetworkCollection details' do > +-details do > -row 'ID', @networks.id > - -row 'Description', @networks.description > - -row 'Created', @networks.created > + -row 'Count', @networks.count > diff --git a/clients/cimi/views/networks/show.haml > b/clients/cimi/views/networks/show.haml > index 8ec560a..006a4a7 100644 > --- a/clients/cimi/views/networks/show.haml > +++ b/clients/cimi/views/networks/show.haml > @@ -16,20 +16,13 @@ > %a{ :href => "#{@network.id}?format=xml", :class => 'label warning' } XML > %a{ :href => "#{@network.id}?format=json", :class => 'label warning' } > JSON > > -%blockquote > - %p > - This entity represents a Network - a realized entity > - that represents an abstraction of a layer 2 broadcast domain. > - > -details 'Network details' do > -row 'ID', @network.id > + -row 'Name', @network.name > -row 'Description', @network.description > -row 'Created', @network.created > -row 'State', @network.state > - -row 'Access', @network.access > - -row 'RoutingGroup', @network.routing_group.href > - -row 'Bandwidth Limit', @network.bandwidth_limit > - -row 'Traffic Priority', @network.traffic_priority > - -row 'Maximum Traffic Delay', @network.max_traffic_delay > - -row 'Maximum Traffic Loss', @network.max_traffic_loss > - -row 'Maximum Traffic Jitter', @network.max_traffic_jitter > + -row 'Type', @network.network_type > + -row 'MTU', @network.mtu > + -row 'Service Class', @network.class_of_service > + -row 'Forwarding Group', url("/cimi/forwarding_groups/#{href_to_id > @network.forwarding_group.href}") > diff --git a/clients/cimi/views/volume_configurations/index.haml > b/clients/cimi/views/volume_configurations/index.haml > index f0af661..376a112 100644 > --- a/clients/cimi/views/volume_configurations/index.haml > +++ b/clients/cimi/views/volume_configurations/index.haml > @@ -1,4 +1,4 @@ > -- @title=@volume_configurations.description > +- @title=collection_name @volume_configurations > > - content_for :breadcrumb do > %ul.breadcrumb > @@ -13,7 +13,6 @@ > %a{ :href => "#{@volume_configurations.id}?format=xml", :class => 'label > warning' } XML > %a{ :href => "#{@volume_configurations.id}?format=json", :class => > 'label warning' } JSON > > -%h3 VolumeConfigurationsCollection > %ul > - @volume_configurations.volume_configurations.each do |conf| > %li > @@ -21,5 +20,4 @@ > > - details 'VolumeConfigurationCollection details' do > -row 'ID', @volume_configurations.id > - -row 'Description', @volume_configurations.description > - -row 'Created', @volume_configurations.created > + -row 'Count', @volume_configurations.count > diff --git a/clients/cimi/views/volume_configurations/show.haml > b/clients/cimi/views/volume_configurations/show.haml > index 58783a6..8ab5c55 100644 > --- a/clients/cimi/views/volume_configurations/show.haml > +++ b/clients/cimi/views/volume_configurations/show.haml > @@ -16,19 +16,10 @@ > %a{ :href => "#{@volume_configuration.id}?format=xml", :class => 'label > warning' } XML > %a{ :href => "#{@volume_configuration.id}?format=json", :class => 'label > warning' } JSON > > -%blockquote > - %p > - The Volume Configuration entity represents the set of configuration > values > - that define the (virtual) hardware resources of a to-be-realized Volume > - Instance. Volume Configurations are created by Providers and MAY, at the > - Providers discretion, be created by Consumers. > > -- details 'VolumeConfiguration details' do > +- details do > -row 'ID', @volume_configuration.id > -row 'Description', @volume_configuration.description > -row 'Created', @volume_configuration.created > - -row 'Format', boolean_span_for(@volume_configuration.format) > - -row 'Supports snapshots', > boolean_span_for(@volume_configuration.supports_snapshots) > - -row 'Guest interface', > boolean_span_for(@volume_configuration.guest_interface) > - -row 'Capacity', ([@volume_configuration.capacity.quantity, > @volume_configuration.capacity.units].join(' ')) > + -row 'Capacity', @volume_configuration.capacity > > diff --git a/clients/cimi/views/volume_images/index.haml > b/clients/cimi/views/volume_images/index.haml > index 84806ef..ea32a1e 100644 > --- a/clients/cimi/views/volume_images/index.haml > +++ b/clients/cimi/views/volume_images/index.haml > @@ -1,4 +1,4 @@ > -- @title=@volume_images.name > +- @title=collection_name @volume_images > > - content_for :breadcrumb do > %ul.breadcrumb > @@ -18,8 +18,6 @@ > %li > %a{ :href => > "/cimi/volume_images/#{href_to_id(image.id)}"}=href_to_id(image.id) > > -- details 'VolumeImageCollection details' do > +- details do > - row 'ID', @volume_images.id > - - row ' Description', @volume_images.description > - - row 'Created', @volume_images.created > - > + - row 'Count', @volume_images.count > diff --git a/clients/cimi/views/volume_images/show.haml > b/clients/cimi/views/volume_images/show.haml > index 7f32497..4e5534e 100644 > --- a/clients/cimi/views/volume_images/show.haml > +++ b/clients/cimi/views/volume_images/show.haml > @@ -16,16 +16,10 @@ > %a{ :href => "#{@volume_image.id}?format=xml", :class => 'label warning' > } XML > %a{ :href => "#{@volume_image.id}?format=json", :class => 'label > warning' } JSON > > -%blockquote > - %p > - This entity represents the information necessary for hardware virtualized > - resources to create a Volume Instance > - > -- details 'VolumeImage details' do > +- details do > -row 'ID', @volume_image.id > -row 'Description', @volume_image.description > -row 'Created', @volume_image.created > - -row 'Bootable', boolean_span_for(@volume_image.bootable) > - -row 'Image Location', > "/cimi/volumes/#{href_to_id(@volume_image.image_location.href)}" > - -row 'Image Data', boolean_span_for(@volume_image.image_data) > + -row 'Bootable?', boolean_span_for(@volume_image.bootable) > + -row 'Image Location', > url("/cimi/volumes/#{href_to_id(@volume_image.image_location.href)}") > > diff --git a/clients/cimi/views/volumes/index.haml > b/clients/cimi/views/volumes/index.haml > index 619462b..a4e4c25 100644 > --- a/clients/cimi/views/volumes/index.haml > +++ b/clients/cimi/views/volumes/index.haml > @@ -1,4 +1,4 @@ > -- @[email protected] > +- @title=collection_name @volumes > > - content_for :breadcrumb do > %ul.breadcrumb > @@ -19,8 +19,6 @@ > %li > %a{ :href => > "/cimi/volumes/#{href_to_id(volume.id)}"}=href_to_id(volume.id) > > -- details 'VolumeCollection details' do > +- details do > - row 'ID', @volumes.id > - - row 'Description', @volumes.description > - - row 'Created', @volumes.created > - > + - row 'Count', @volumes.count > diff --git a/clients/cimi/views/volumes/show.haml > b/clients/cimi/views/volumes/show.haml > index 9046402..991cff2 100644 > --- a/clients/cimi/views/volumes/show.haml > +++ b/clients/cimi/views/volumes/show.haml > @@ -16,23 +16,12 @@ > %a{ :href => "#{@volume.id}?format=xml", :class => 'label warning' } XML > %a{ :href => "#{@volume.id}?format=json", :class => 'label warning' } > JSON > > -%blockquote > - %p > - This entity represents a volume Instance > - > -- details 'Volume details' do > +- details do > - row 'ID', @volume.id > + - row 'Name', @volume.name > - row 'Description', @volume.description > - row 'Created', @volume.created > + - row 'Type', @volume.type > + - row 'Capacity', @volume.capacity > - row 'Bootable?', boolean_span_for(@volume.bootable) > - - row 'Support snapshots?', boolean_span_for(@volume.supports_snapshots) > - - row 'Guest Interface', boolean_span_for(@volume.guest_interface) > - > -- details 'Volume Snapshots' do > - - @volume.snapshots.each_with_index do |s, i| > - - row "##{i}", s.ref > - > -- details 'Volume Meters' do > - - @volume.meters.each_with_index do |m, i| > - - row "##{i}", m.ref > - > + - row 'State', @volume.state >
