You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by ma...@redhat.com on 2012/03/09 18:42:49 UTC

[PATCH 4/4] CIMI - adds CIMI Client views for index/show network and network_configurations

From: marios <ma...@redhat.com>


Signed-off-by: marios <ma...@redhat.com>
---
 .../cimi/views/network_configurations/index.haml   |   34 +++++++++++++++
 .../cimi/views/network_configurations/show.haml    |   43 +++++++++++++++++++
 clients/cimi/views/networks/index.haml             |   34 +++++++++++++++
 clients/cimi/views/networks/show.haml              |   45 ++++++++++++++++++++
 4 files changed, 156 insertions(+), 0 deletions(-)
 create mode 100644 clients/cimi/views/network_configurations/index.haml
 create mode 100644 clients/cimi/views/network_configurations/show.haml
 create mode 100644 clients/cimi/views/networks/index.haml
 create mode 100644 clients/cimi/views/networks/show.haml

diff --git a/clients/cimi/views/network_configurations/index.haml b/clients/cimi/views/network_configurations/index.haml
new file mode 100644
index 0000000..155baca
--- /dev/null
+++ b/clients/cimi/views/network_configurations/index.haml
@@ -0,0 +1,34 @@
+- @title=@network_configs.description
+
+- content_for :breadcrumb do
+  %ul.breadcrumb
+    %li
+      %a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint
+      %span.divider="/"
+    %li.active
+      NetworkConfigurationCollection
+- content_for :actions do
+  %p
+    %a{ :href => "#{@network_configs.uri}?format=xml", :class => 'label warning' } XML
+    %a{ :href => "#{@network_configs.uri}?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
+
+%ul
+  - @network_configs.network_configurations.each do |conf|
+    %li
+      %a{ :href => "/cimi/network_configurations/#{conf.href.split('/').last}"}=conf.href.split('/').last
+
+%h3 Collection details
+
+%dl
+  %dt URI
+  %dd=@network_configs.uri
+  %dt Description
+  %dd=@network_configs.description
+  %dt Created
+  %dd=@network_configs.created
diff --git a/clients/cimi/views/network_configurations/show.haml b/clients/cimi/views/network_configurations/show.haml
new file mode 100644
index 0000000..676ee9c
--- /dev/null
+++ b/clients/cimi/views/network_configurations/show.haml
@@ -0,0 +1,43 @@
+- @title="#{@network_config.name}"
+
+- content_for :breadcrumb do
+  %ul.breadcrumb
+    %li
+      %a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint
+      %span.divider="/"
+    %li
+      %a{ :href => "/cimi/network_configurations"} NetworkConfigurationCollection
+      %span.divider="/"
+    %li.active
+      = @network_config.name
+
+- content_for :actions do
+  %p
+    %a{ :href => "#{@network_config.uri}?format=xml", :class => 'label warning' } XML
+    %a{ :href => "#{@network_config.uri}?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.
+
+%dl
+  %dt URI
+  %dd
+    %a{ :href => @network_config.uri }=@network_config.uri
+  %dt Description
+  %dd=@network_config.description
+  %dt Created
+  %dd=@network_config.created
+  %dt Access
+  %dd=@network_config.access
+  %dt Bandwidth Limit
+  %dd=@network_config.bandwidth_limit
+  %dt Traffic Priority
+  %dd=@network_config.traffic_priority
+  %dt Maximum Traffic Delay
+  %dd=@network_config.max_traffic_delay
+  %dt Maximum Traffic Loss
+  %dd=@network_config.max_traffic_loss
+  %dt Maximum Traffic Jitter
+  %dd=@network_config.max_traffic_jitter
diff --git a/clients/cimi/views/networks/index.haml b/clients/cimi/views/networks/index.haml
new file mode 100644
index 0000000..699ebf8
--- /dev/null
+++ b/clients/cimi/views/networks/index.haml
@@ -0,0 +1,34 @@
+- @title=@networks.description
+
+- content_for :breadcrumb do
+  %ul.breadcrumb
+    %li
+      %a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint
+      %span.divider="/"
+    %li.active
+      NetworkCollection
+
+- content_for :actions do
+  %p
+    %a{ :href => "#{@networks.uri}?format=xml", :class => 'label warning' } XML
+    %a{ :href => "#{@networks.uri}?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.
+
+%ul
+  - @networks.networks.each do |network|
+    %li
+      %a{ :href => "/cimi/networks/#{network.href.split('/').last}"}=network.href.split('/').last
+
+%h3 Collection details
+
+%dl
+  %dt URI
+  %dd=@networks.uri
+  %dt Description
+  %dd=@networks.description
+  %dt Created
+  %dd=@networks.created
diff --git a/clients/cimi/views/networks/show.haml b/clients/cimi/views/networks/show.haml
new file mode 100644
index 0000000..111254a
--- /dev/null
+++ b/clients/cimi/views/networks/show.haml
@@ -0,0 +1,45 @@
+- @title="#{@network.name}"
+
+- content_for :breadcrumb do
+  %ul.breadcrumb
+    %li
+      %a{ :href => "/cimi/cloudEntryPoint"} CloudEntryPoint
+      %span.divider="/"
+    %li
+      %a{ :href => "/cimi/networks"} NetworkCollection
+      %span.divider="/"
+    %li.active
+      = @network.name
+
+- content_for :actions do
+  %p
+    %a{ :href => "#{@network.uri}?format=xml", :class => 'label warning' } XML
+    %a{ :href => "#{@network.uri}?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.
+
+%dl
+  %dt URI
+  %dd
+    %a{ :href => @network.uri }=@network.uri
+  %dt Description
+  %dd=@network.description
+  %dt Created
+  %dd=@network.created
+  %dt State
+  %dd=@network.state
+  %dt Access
+  %dd=@network.access
+  %dt Bandwidth Limit
+  %dd=@network.bandwidth_limit
+  %dt Traffic Priority
+  %dd=@network.traffic_priority
+  %dt Maximum Traffic Delay
+  %dd=@network.max_traffic_delay
+  %dt Maximum Traffic Loss
+  %dd=@network.max_traffic_loss
+  %dt Maximum Traffic Jitter
+  %dd=@network.max_traffic_jitter
-- 
1.7.6.5