deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [1/4] git commit: CIMI: Adds RoutingGroupTemplate entity and views to CIMI Client app.
Date Tue, 20 Mar 2012 10:16:04 GMT
Updated Branches:
  refs/heads/master 9ddd4b5eb -> a0996bcd0


CIMI: Adds RoutingGroupTemplate entity and views to CIMI Client app.


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/308f1b55
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/308f1b55
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/308f1b55

Branch: refs/heads/master
Commit: 308f1b55b8e46d01a2dde71a545933499512680a
Parents: 9ddd4b5
Author: marios <marios@redhat.com>
Authored: Mon Mar 19 18:04:40 2012 +0200
Committer: marios <marios@redhat.com>
Committed: Tue Mar 20 12:14:20 2012 +0200

----------------------------------------------------------------------
 clients/cimi/app.rb                                |    1 +
 clients/cimi/lib/entities.rb                       |    1 +
 .../cimi/lib/entities/routing_group_template.rb    |   30 ++++++++++++++
 .../cimi/views/routing_group_templates/index.haml  |   30 ++++++++++++++
 .../cimi/views/routing_group_templates/show.haml   |   31 +++++++++++++++
 5 files changed, 93 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/308f1b55/clients/cimi/app.rb
----------------------------------------------------------------------
diff --git a/clients/cimi/app.rb b/clients/cimi/app.rb
index c14e36b..5064712 100644
--- a/clients/cimi/app.rb
+++ b/clients/cimi/app.rb
@@ -32,6 +32,7 @@ module CIMI::Frontend
     use CIMI::Frontend::NetworkConfiguration
     use CIMI::Frontend::NetworkTemplate
     use CIMI::Frontend::RoutingGroup
+    use CIMI::Frontend::RoutingGroupTemplate
     use Rack::Session::Cookie
 
     helpers CIMI::Frontend::Helper

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/308f1b55/clients/cimi/lib/entities.rb
----------------------------------------------------------------------
diff --git a/clients/cimi/lib/entities.rb b/clients/cimi/lib/entities.rb
index 7249067..5f9ed53 100644
--- a/clients/cimi/lib/entities.rb
+++ b/clients/cimi/lib/entities.rb
@@ -32,3 +32,4 @@ require 'entities/network'
 require 'entities/network_configuration'
 require 'entities/network_template'
 require 'entities/routing_group'
+require 'entities/routing_group_template'

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/308f1b55/clients/cimi/lib/entities/routing_group_template.rb
----------------------------------------------------------------------
diff --git a/clients/cimi/lib/entities/routing_group_template.rb b/clients/cimi/lib/entities/routing_group_template.rb
new file mode 100644
index 0000000..88a0a47
--- /dev/null
+++ b/clients/cimi/lib/entities/routing_group_template.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::RoutingGroupTemplate < CIMI::Frontend::Entity
+
+  get '/cimi/routing_group_templates/:id' do
+    rg_template_xml = get_entity('routing_group_templates', params[:id], credentials)
+    @rg_template = CIMI::Model::RoutingGroupTemplate.from_xml(rg_template_xml)
+    haml :'routing_group_templates/show'
+  end
+
+  get '/cimi/routing_group_templates' do
+    rg_templates_xml = get_entity_collection('routing_group_templates', credentials)
+    @rg_templates = CIMI::Model::RoutingGroupTemplateCollection.from_xml(rg_templates_xml)
+    haml :'routing_group_templates/index'
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/308f1b55/clients/cimi/views/routing_group_templates/index.haml
----------------------------------------------------------------------
diff --git a/clients/cimi/views/routing_group_templates/index.haml b/clients/cimi/views/routing_group_templates/index.haml
new file mode 100644
index 0000000..c601c33
--- /dev/null
+++ b/clients/cimi/views/routing_group_templates/index.haml
@@ -0,0 +1,30 @@
+- @title=@rg_templates.description
+
+- content_for :breadcrumb do
+  %ul.breadcrumb
+    %li
+      %a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint
+      %span.divider="/"
+    %li.active
+      RoutingGroupTemplateCollection
+- content_for :actions do
+  %p
+    %a{ :href => "#{@rg_templates.id}?format=xml", :class => 'label warning' } XML
+    %a{ :href => "#{@rg_templates.id}?format=json", :class => 'label warning' } JSON
+
+%blockquote
+  %p
+    A Routing Group Template Collection entity represents the collection of Routing
+    Group Template entities within a Provider. This entity can be used to locate and
+    create Routing Group Templates.
+
+%h3 RoutingGroupTemplateCollection
+%ul
+  - @rg_templates.routing_group_templates.each do |rg_template|
+    %li
+      %a{ :href => "/cimi/routing_group_templates/#{rg_template.href.split('/').last}"}=rg_template.href.split('/').last
+
+-details 'RoutingGroupTemplateCollection details' do
+  -row 'ID', @rg_templates.id
+  -row 'Description', @rg_templates.description
+  -row 'Created', @rg_templates.created

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/308f1b55/clients/cimi/views/routing_group_templates/show.haml
----------------------------------------------------------------------
diff --git a/clients/cimi/views/routing_group_templates/show.haml b/clients/cimi/views/routing_group_templates/show.haml
new file mode 100644
index 0000000..89beb9f
--- /dev/null
+++ b/clients/cimi/views/routing_group_templates/show.haml
@@ -0,0 +1,31 @@
+- @title="#{@rg_template.name}"
+
+- content_for :breadcrumb do
+  %ul.breadcrumb
+    %li
+      %a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint
+      %span.divider="/"
+    %li
+      %a{ :href => "/cimi/routing_group_templates"} RoutingGroupTemplateCollection
+      %span.divider="/"
+    %li.active
+      =@rg_template.name
+
+- content_for :actions do
+  %p
+    %a{ :href => "#{@rg_template.id}?format=xml", :class => 'label warning' } XML
+    %a{ :href => "#{@rg_template.id}?format=json", :class => 'label warning' } JSON
+
+%blockquote
+  %p
+    A RoutingGroupTemplate entity captures the configuration values for realizing a RoutingGroup.
+    A Routing Group Template may be used to create multiple RoutingGroup
+
+-details 'RoutingGroupTemplate details' do
+  -row 'ID', @rg_template.id
+  -row 'Description', @rg_template.description
+  -row 'Created', @rg_template.created
+
+-details 'RoutingGroupTemplate networks' do
+  -@rg_template.networks.each do |net|
+    -row 'ID', net.href


Mime
View raw message