deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [3/3] git commit: CIMI: starts fixing Networks (mocking)
Date Tue, 04 Sep 2012 12:52:41 GMT
CIMI: starts fixing Networks (mocking)


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

Branch: refs/heads/master
Commit: 78e98159737f4e01015ab9d6bab569a3efbdc860
Parents: 9b3ce42
Author: marios <marios@redhat.com>
Authored: Fri Aug 31 22:30:51 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Tue Sep 4 12:55:49 2012 +0300

----------------------------------------------------------------------
 server/lib/cimi/collections/networks.rb            |    2 +-
 server/lib/cimi/models/network.rb                  |   14 +++++---------
 .../drivers/mock/data/cimi/network/network1.json   |   12 +++++-------
 .../drivers/mock/data/cimi/network/network2.json   |   12 +++++-------
 4 files changed, 16 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/78e98159/server/lib/cimi/collections/networks.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/networks.rb b/server/lib/cimi/collections/networks.rb
index 4f26b0b..154bb77 100644
--- a/server/lib/cimi/collections/networks.rb
+++ b/server/lib/cimi/collections/networks.rb
@@ -33,7 +33,7 @@ module CIMI::Collections
         end
       end
 
-      operation :show, :with_capability => :network do
+      operation :show, :with_capability => :networks do
         description "Show a specific Network"
         control do
           network = Network.find(params[:id], self)

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/78e98159/server/lib/cimi/models/network.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/network.rb b/server/lib/cimi/models/network.rb
index 3d9c7ed..cc8e4df 100644
--- a/server/lib/cimi/models/network.rb
+++ b/server/lib/cimi/models/network.rb
@@ -17,19 +17,15 @@ class CIMI::Model::Network < CIMI::Model::Base
 
   text :state
 
-  text :access
+  text :network_type
 
-  text :bandwidth_limit
+  text :mtu
 
-  text :traffic_priority
+  text :class_of_service
 
-  text :max_traffic_delay
+  href :network_ports
 
-  text :max_traffic_loss
-
-  text :max_traffic_jitter
-
-  href :routing_group
+  href :forwarding_group
 
   href :event_log
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/78e98159/server/lib/deltacloud/drivers/mock/data/cimi/network/network1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/network/network1.json b/server/lib/deltacloud/drivers/mock/data/cimi/network/network1.json
index 28cf767..7a0f78b 100644
--- a/server/lib/deltacloud/drivers/mock/data/cimi/network/network1.json
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/network/network1.json
@@ -3,13 +3,11 @@
   "description": "the first network",
   "created": "Thu Jan 12 15:25:41 EET 2012",
   "state": "STARTED",
-  "access": "Public",
-  "bandwidthLimit": 2,
-  "trafficPriority": 1,
-  "maxTrafficDelay": 500000,
-  "maxTrafficLoss": 100,
-  "maxTrafficJitter": 100000,
-  "routingGroup": { "href": "http://cimi.example.org/routinggroups/group1" },
+  "networkType": "PUBLIC",
+  "classOfService": "GOLD",
+  "mtu": 1500,
+  "networkPorts": { "href": "http://cimi.example.org/networks/network1/networkports"},
+  "forwardingGroup": { "href": "http://cimi.example.org/forwarding_groups/group1" },
   "operations": [
     { "rel": "edit", "href": "http://cimi.example.org/networks/network1" },
     { "rel": "delete", "href": "http://cimi.example.org/networks/network1" }

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/78e98159/server/lib/deltacloud/drivers/mock/data/cimi/network/network2.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/network/network2.json b/server/lib/deltacloud/drivers/mock/data/cimi/network/network2.json
index 370db99..283d242 100644
--- a/server/lib/deltacloud/drivers/mock/data/cimi/network/network2.json
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/network/network2.json
@@ -3,13 +3,11 @@
   "description": "another network",
   "created": "Fri Jan 13 17:30:34 EET 2012",
   "state": "STARTED",
-  "access": "Public",
-  "bandwidthLimit": 3,
-  "trafficPriority": 2,
-  "maxTrafficDelay": 600000,
-  "maxTrafficLoss": 100,
-  "maxTrafficJitter": 200000,
-  "routingGroup": { "href": "http://cimi.example.org/routinggroups/group1" },
+  "networkType": "PUBLIC",
+  "classOfService": "SILVER",
+  "mtu": 1500,
+  "networkPorts": { "href": "http://cimi.example.org/networks/network2/networkports"},
+  "forwardingGroup": { "href": "http://cimi.example.org/forwarding_groups/group1" },
   "operations": [
     { "rel": "edit", "href": "http://cimi.example.org/networks/network2" },
     { "rel": "delete", "href": "http://cimi.example.org/networks/network2" }


Mime
View raw message