deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [2/7] git commit: CIMI: Fixes Networks
Date Tue, 18 Sep 2012 13:37:28 GMT
CIMI: Fixes Networks


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

Branch: refs/heads/master
Commit: 47339aca6dfbf756f737baba3e6a4e585e736e63
Parents: 42f564c
Author: marios <marios@redhat.com>
Authored: Fri Sep 14 18:37:39 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Tue Sep 18 16:34:36 2012 +0300

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


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/47339aca/server/lib/cimi/collections/networks.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/networks.rb b/server/lib/cimi/collections/networks.rb
index 154bb77..c11e188 100644
--- a/server/lib/cimi/collections/networks.rb
+++ b/server/lib/cimi/collections/networks.rb
@@ -119,6 +119,18 @@ module CIMI::Collections
         end
       end
 
+      operation :network_ports, :with_capability => :network_ports do
+        description "Retrieve the Network's NetworkPortCollection"
+        control do
+          network_ports = NetworkPortCollection.for_network(params[:id], self)
+          respond_to do |format|
+            format.json {network_ports.to_json}
+            format.xml  {network_ports.to_xml}
+          end
+        end
+      end
+
+
     end
 
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/47339aca/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 7a0f78b..f8cc34d 100644
--- a/server/lib/deltacloud/drivers/mock/data/cimi/network/network1.json
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/network/network1.json
@@ -6,7 +6,7 @@
   "networkType": "PUBLIC",
   "classOfService": "GOLD",
   "mtu": 1500,
-  "networkPorts": { "href": "http://cimi.example.org/networks/network1/networkports"},
+  "networkPorts": { "href": "http://cimi.example.org/networks/network1/network_ports"},
   "forwardingGroup": { "href": "http://cimi.example.org/forwarding_groups/group1" },
   "operations": [
     { "rel": "edit", "href": "http://cimi.example.org/networks/network1" },

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/47339aca/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 283d242..85adff1 100644
--- a/server/lib/deltacloud/drivers/mock/data/cimi/network/network2.json
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/network/network2.json
@@ -6,7 +6,7 @@
   "networkType": "PUBLIC",
   "classOfService": "SILVER",
   "mtu": 1500,
-  "networkPorts": { "href": "http://cimi.example.org/networks/network2/networkports"},
+  "networkPorts": { "href": "http://cimi.example.org/networks/network2/network_ports"},
   "forwardingGroup": { "href": "http://cimi.example.org/forwarding_groups/group1" },
   "operations": [
     { "rel": "edit", "href": "http://cimi.example.org/networks/network2" },


Mime
View raw message