From: marios <[email protected]>
Signed-off-by: marios <[email protected]> --- clients/cimi/app.rb | 1 + clients/cimi/lib/entities.rb | 1 + clients/cimi/lib/entities/vsp.rb | 1 - clients/cimi/lib/entities/vsp_configuration.rb | 30 +++++++++++++++++++++ clients/cimi/views/vsp_configurations/index.haml | 31 ++++++++++++++++++++++ clients/cimi/views/vsp_configurations/show.haml | 31 ++++++++++++++++++++++ 6 files changed, 94 insertions(+), 1 deletions(-) create mode 100644 clients/cimi/lib/entities/vsp_configuration.rb create mode 100644 clients/cimi/views/vsp_configurations/index.haml create mode 100644 clients/cimi/views/vsp_configurations/show.haml diff --git a/clients/cimi/app.rb b/clients/cimi/app.rb index 3d32cc5..6a124e5 100644 --- a/clients/cimi/app.rb +++ b/clients/cimi/app.rb @@ -34,6 +34,7 @@ module CIMI::Frontend use CIMI::Frontend::RoutingGroup use CIMI::Frontend::RoutingGroupTemplate use CIMI::Frontend::VSP + use CIMI::Frontend::VSPConfiguration use Rack::Session::Cookie helpers CIMI::Frontend::Helper diff --git a/clients/cimi/lib/entities.rb b/clients/cimi/lib/entities.rb index 53ab6bf..7071bf2 100644 --- a/clients/cimi/lib/entities.rb +++ b/clients/cimi/lib/entities.rb @@ -34,3 +34,4 @@ require 'entities/network_template' require 'entities/routing_group' require 'entities/routing_group_template' require 'entities/vsp' +require 'entities/vsp_configuration' diff --git a/clients/cimi/lib/entities/vsp.rb b/clients/cimi/lib/entities/vsp.rb index 13c90bd..ccf02c9 100644 --- a/clients/cimi/lib/entities/vsp.rb +++ b/clients/cimi/lib/entities/vsp.rb @@ -1,4 +1,3 @@ - # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. The diff --git a/clients/cimi/lib/entities/vsp_configuration.rb b/clients/cimi/lib/entities/vsp_configuration.rb new file mode 100644 index 0000000..9d50090 --- /dev/null +++ b/clients/cimi/lib/entities/vsp_configuration.rb @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +class CIMI::Frontend::VSPConfiguration < CIMI::Frontend::Entity + + get '/cimi/vsp_configurations/:id' do + vsp_config_xml = get_entity('vsp_configurations', params[:id], credentials) + @vsp_config = CIMI::Model::VSPConfiguration.from_xml(vsp_config_xml) + haml :'vsp_configurations/show' + end + + get '/cimi/vsp_configurations' do + vsp_configs_xml = get_entity_collection('vsp_configurations', credentials) + @vsp_configs = CIMI::Model::VSPConfigurationCollection.from_xml(vsp_configs_xml) + haml :'vsp_configurations/index' + end + +end diff --git a/clients/cimi/views/vsp_configurations/index.haml b/clients/cimi/views/vsp_configurations/index.haml new file mode 100644 index 0000000..604c9e0 --- /dev/null +++ b/clients/cimi/views/vsp_configurations/index.haml @@ -0,0 +1,31 @@ +- @title=@vsp_configs.description + +- content_for :breadcrumb do + %ul.breadcrumb + %li + %a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint + %span.divider="/" + %li.active + VSPConfigurationCollection + +- content_for :actions do + %p + %a{ :href => "#{@vsp_configs.id}?format=xml", :class => 'label warning' } XML + %a{ :href => "#{@vsp_configs.id}?format=json", :class => 'label warning' } JSON + +%blockquote + %p + A VSP Configuration Collection entity represents the collection of VSP Configurations within a Provider. + This entity can be used to locate and create VSP Configurations + + +%h3 VSPConfigurationCollection +%ul + - @vsp_configs.vsp_configurations.each do |vsp_config| + %li + %a{ :href => "/cimi/vsp_configurations/#{vsp_config.href.split('/').last}"}=vsp_config.href.split('/').last + +-details 'VSPConfigurationCollection details' do + -row 'ID', @vsp_configs.id + -row 'Description', @vsp_configs.description + -row 'Created', @vsp_configs.created diff --git a/clients/cimi/views/vsp_configurations/show.haml b/clients/cimi/views/vsp_configurations/show.haml new file mode 100644 index 0000000..3ab2dfb --- /dev/null +++ b/clients/cimi/views/vsp_configurations/show.haml @@ -0,0 +1,31 @@ +- @title="#{@vsp_config.name}" + +- content_for :breadcrumb do + %ul.breadcrumb + %li + %a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint + %span.divider="/" + %li + %a{ :href => "/cimi/vsp_configurations"} VSPConfigurationCollection + %span.divider="/" + %li.active + = @vsp_config.name + +- content_for :actions do + %p + %a{ :href => "#{@vsp_config.id}?format=xml", :class => 'label warning' } XML + %a{ :href => "#{@vsp_config.id}?format=json", :class => 'label warning' } JSON + +%blockquote + %p + The set of configuration values representing the information needed to create a VSP with certain characteristics. + +-details 'VSPConfiguration details' do + -row 'ID', @vsp_config.id + -row 'Description', @vsp_config.description + -row 'Created', @vsp_config.created + -row 'Bandwidth Reservation', @vsp_config.bandwidth_reservation + -row 'Traffic Priority', @vsp_config.traffic_priority + -row 'Maximum Traffic Delay', @vsp_config.max_traffic_delay + -row 'Maximum Traffic Loss', @vsp_config.max_traffic_loss + -row 'Maximum Traffic Jitter', @vsp_config.max_traffic_jitter -- 1.7.6.5
