deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [2/5] git commit: CIMI: Fixes ForwardingGroup entities (was RoutingGroup)
Date Wed, 26 Sep 2012 09:04:52 GMT
CIMI: Fixes ForwardingGroup entities (was RoutingGroup)


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

Branch: refs/heads/master
Commit: d11587879dab54269ba49795ad4352c982b878ac
Parents: 0fa9502
Author: marios <marios@redhat.com>
Authored: Tue Sep 25 18:25:59 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Tue Sep 25 18:25:59 2012 +0300

----------------------------------------------------------------------
 .../cimi/collections/forwarding_group_templates.rb |   47 ++++++++++++++
 server/lib/cimi/collections/forwarding_groups.rb   |   48 ++++++++++++++
 .../cimi/collections/routing_group_templates.rb    |   48 --------------
 server/lib/cimi/collections/routing_groups.rb      |   49 ---------------
 server/lib/cimi/models.rb                          |    4 +-
 server/lib/cimi/models/forwarding_group.rb         |   36 +++++++++++
 .../lib/cimi/models/forwarding_group_template.rb   |   36 +++++++++++
 server/lib/cimi/models/routing_group.rb            |   36 -----------
 server/lib/cimi/models/routing_group_template.rb   |   36 -----------
 .../drivers/mock/data/cimi/address/address1.json   |   19 ------
 .../drivers/mock/data/cimi/address/address2.json   |   19 ------
 .../drivers/mock/data/cimi/address/address3.json   |   19 ------
 .../mock/data/cimi/forwarding_group/group1.json    |   13 ++++
 .../cimi/forwarding_group_template/template1.json  |   12 ++++
 .../mock/data/cimi/routing_group/group1.json       |   13 ----
 .../cimi/routing_group_template/template1.json     |   12 ----
 .../drivers/mock/mock_driver_cimi_methods.rb       |   31 ++++++---
 17 files changed, 215 insertions(+), 263 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/cimi/collections/forwarding_group_templates.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/forwarding_group_templates.rb b/server/lib/cimi/collections/forwarding_group_templates.rb
new file mode 100644
index 0000000..f258001
--- /dev/null
+++ b/server/lib/cimi/collections/forwarding_group_templates.rb
@@ -0,0 +1,47 @@
+# 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.
+module CIMI::Collections
+  class ForwardingGroupTemplates < Base
+
+    set :capability, lambda { |m| driver.respond_to? m }
+
+    collection :forwarding_group_templates do
+
+      operation :index, :with_capability => :forwarding_groups do
+        description 'List all ForwardingGroupTemplates in the ForwardingGroupTemplateCollection'
+        param :CIMISelect, :string, :optional
+        control do
+          forwarding_group_templates = ForwardingGroupTemplate.list(self).filter_by(params[:CIMISelect])
+          respond_to do |format|
+            format.xml {forwarding_group_templates.to_xml}
+            format.json {forwarding_group_templates.to_json}
+          end
+        end
+      end
+
+      operation :show, :with_capability => :forwarding_groups do
+        description 'Show a specific ForwardingGroupTemplate'
+        control do
+          forwarding_group_template = ForwardingGroupTemplate.find(params[:id], self)
+          respond_to do |format|
+            format.xml {forwarding_group_template.to_xml}
+            format.json {forwarding_group_template.to_json}
+          end
+        end
+      end
+    end
+
+  end
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/cimi/collections/forwarding_groups.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/forwarding_groups.rb b/server/lib/cimi/collections/forwarding_groups.rb
new file mode 100644
index 0000000..af316e9
--- /dev/null
+++ b/server/lib/cimi/collections/forwarding_groups.rb
@@ -0,0 +1,48 @@
+# 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.
+module CIMI::Collections
+  class ForwardingGroups < Base
+
+    set :capability, lambda { |m| driver.respond_to? m }
+
+    collection :forwarding_groups do
+
+      operation :index, :with_capability => :forwarding_groups do
+        description 'List all ForwardingGroups in the ForwardingGroupsCollection'
+        param :CIMISelect, :string, :optional
+        control do
+          forwarding_groups = ForwardingGroup.list(self).filter_by(params[:CIMISelect])
+          respond_to do |format|
+            format.xml {forwarding_groups.to_xml}
+            format.json {forwarding_groups.to_json}
+          end
+        end
+      end
+
+      operation :show, :with_capability => :forwarding_groups do
+        description 'Show a specific ForwardingGroup'
+        control do
+          forwarding_group = ForwardingGroup.find(params[:id], self)
+          respond_to do |format|
+            format.xml {forwarding_group.to_xml}
+            format.json {forwarding_group.to_json}
+          end
+        end
+      end
+
+    end
+
+  end
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/cimi/collections/routing_group_templates.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/routing_group_templates.rb b/server/lib/cimi/collections/routing_group_templates.rb
deleted file mode 100644
index 464b262..0000000
--- a/server/lib/cimi/collections/routing_group_templates.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# 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.
-
-module CIMI::Collections
-  class RoutingGroupTemplates < Base
-
-    set :capability, lambda { |m| driver.respond_to? m }
-
-    collection :routing_group_templates do
-
-      operation :index, :with_capability => :routing_groups do
-        description 'List all RoutingGroupTemplates in the RoutingGroupTemplateCollection'
-        param :CIMISelect, :string, :optional
-        control do
-          routing_group_templates = RoutingGroupTemplate.list(self).filter_by(params[:CIMISelect])
-          respond_to do |format|
-            format.xml {routing_group_templates.to_xml}
-            format.json {routing_group_templates.to_json}
-          end
-        end
-      end
-
-      operation :show, :with_capability => :routing_group do
-        description 'Show a specific RoutingGroupTemplate'
-        control do
-          routing_group_template = RoutingGroupTemplate.find(params[:id], self)
-          respond_to do |format|
-            format.xml {routing_group_template.to_xml}
-            format.json {routing_group_template.to_json}
-          end
-        end
-      end
-    end
-
-  end
-end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/cimi/collections/routing_groups.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/routing_groups.rb b/server/lib/cimi/collections/routing_groups.rb
deleted file mode 100644
index 52a1fcf..0000000
--- a/server/lib/cimi/collections/routing_groups.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# 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.
-
-module CIMI::Collections
-  class RoutingGroups < Base
-
-    set :capability, lambda { |m| driver.respond_to? m }
-
-    collection :routing_groups do
-
-      operation :index, :with_capability => :routing_groups do
-        description 'List all RoutingGroups in the RoutingGroupsCollection'
-        param :CIMISelect, :string, :optional
-        control do
-          routing_groups = RoutingGroup.list(self).filter_by(params[:CIMISelect])
-          respond_to do |format|
-            format.xml {routing_groups.to_xml}
-            format.json {routing_groups.to_json}
-          end
-        end
-      end
-
-      operation :show, :with_capability => :routing_group do
-        description 'Show a specific RoutingGroup'
-        control do
-          routing_group = RoutingGroup.find(params[:id], self)
-          respond_to do |format|
-            format.xml {routing_group.to_xml}
-            format.json {routing_group.to_json}
-          end
-        end
-      end
-
-    end
-
-  end
-end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/cimi/models.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models.rb b/server/lib/cimi/models.rb
index fc9a291..df328f5 100644
--- a/server/lib/cimi/models.rb
+++ b/server/lib/cimi/models.rb
@@ -50,5 +50,5 @@ require_relative './models/network_port_template'
 require_relative './models/network_port_configuration'
 require_relative './models/address'
 require_relative './models/address_template'
-require_relative './models/routing_group'
-require_relative './models/routing_group_template'
+require_relative './models/forwarding_group'
+require_relative './models/forwarding_group_template'

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/cimi/models/forwarding_group.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/forwarding_group.rb b/server/lib/cimi/models/forwarding_group.rb
new file mode 100644
index 0000000..221c0b2
--- /dev/null
+++ b/server/lib/cimi/models/forwarding_group.rb
@@ -0,0 +1,36 @@
+# 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::Model::ForwardingGroup < CIMI::Model::Base
+
+  acts_as_root_entity
+
+  array :networks do
+    scalar :href
+  end
+
+  array :operations do
+    scalar :rel, :href
+  end
+
+  def self.find(id, context)
+    if id==:all
+      context.driver.forwarding_groups(context.credentials, {:env=>context})
+    else
+      context.driver.forwarding_groups(context.credentials, {:env=>context, :id=>id})
+    end
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/cimi/models/forwarding_group_template.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/forwarding_group_template.rb b/server/lib/cimi/models/forwarding_group_template.rb
new file mode 100644
index 0000000..fca2f71
--- /dev/null
+++ b/server/lib/cimi/models/forwarding_group_template.rb
@@ -0,0 +1,36 @@
+# 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::Model::ForwardingGroupTemplate < CIMI::Model::Base
+
+  acts_as_root_entity
+
+  array :networks do
+    scalar :href
+  end
+
+  array :operations do
+    scalar :rel, :href
+  end
+
+  def self.find(id, context)
+    if id==:all
+      context.driver.forwarding_group_templates(context.credentials, {:env=>context})
+    else
+      context.driver.forwarding_group_templates(context.credentials, {:env=>context, :id=>id})
+    end
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/cimi/models/routing_group.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/routing_group.rb b/server/lib/cimi/models/routing_group.rb
deleted file mode 100644
index fd87607..0000000
--- a/server/lib/cimi/models/routing_group.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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::Model::RoutingGroup < CIMI::Model::Base
-
-  acts_as_root_entity
-
-  array :networks do
-    scalar :href
-  end
-
-  array :operations do
-    scalar :rel, :href
-  end
-
-  def self.find(id, context)
-    if id==:all
-      context.driver.routing_groups(context.credentials, {:env=>context})
-    else
-      context.driver.routing_groups(context.credentials, {:env=>context, :id=>id})
-    end
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/cimi/models/routing_group_template.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/routing_group_template.rb b/server/lib/cimi/models/routing_group_template.rb
deleted file mode 100644
index c673c9d..0000000
--- a/server/lib/cimi/models/routing_group_template.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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::Model::RoutingGroupTemplate < CIMI::Model::Base
-
-  acts_as_root_entity
-
-  array :networks do
-    scalar :href
-  end
-
-  array :operations do
-    scalar :rel, :href
-  end
-
-  def self.find(id, context)
-    if id==:all
-      context.driver.routing_group_templates(context.credentials, {:env=>context})
-    else
-      context.driver.routing_group_templates(context.credentials, {:env=>context, :id=>id})
-    end
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/deltacloud/drivers/mock/data/cimi/address/address1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/address/address1.json b/server/lib/deltacloud/drivers/mock/data/cimi/address/address1.json
deleted file mode 100644
index ccf0695..0000000
--- a/server/lib/deltacloud/drivers/mock/data/cimi/address/address1.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{ "id": "http://cimi.example.org/addresses/address1",
-  "name": "address1",
-  "description": "an IP address",
-  "created": "Wed Apr 04 11:59:15 EET 2012",
-  "ip": "192.168.10.1",
-  "hostname": "marios.local",
-  "allocation": "static",
-  "defaultGateway": "192.168.0.1",
-  "dns": "192.168.0.10",
-  "macAddress": "",
-  "protocol": "IPv4",
-  "mask": "255.255.0.0",
-  "network": {"href": "http://cimi.example.org/networks/network1"},
-  "resource": {},
-  "operations": [
-    { "rel": "edit", "href": "http://cimi.example.org/addresses/address1" },
-    { "rel": "delete", "href": "http://cimi.example.org/addresses/address1" }
-  ]
-}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/deltacloud/drivers/mock/data/cimi/address/address2.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/address/address2.json b/server/lib/deltacloud/drivers/mock/data/cimi/address/address2.json
deleted file mode 100644
index 13891eb..0000000
--- a/server/lib/deltacloud/drivers/mock/data/cimi/address/address2.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{ "id": "http://cimi.example.org/addresses/address2",
-  "name": "address2",
-  "description": "an IP address",
-  "created": "Thu Apr 05 12:57:59 EET 2012",
-  "ip": "192.168.10.2",
-  "hostname": "foo.bar",
-  "allocation": "static",
-  "defaultGateway": "192.168.0.1",
-  "dns": "192.168.0.10",
-  "macAddress": "",
-  "protocol": "IPv4",
-  "mask": "255.255.0.0",
-  "network": {"href": "http://cimi.example.org/networks/network1"},
-  "resource": {},
-  "operations": [
-    { "rel": "edit", "href": "http://cimi.example.org/addresses/address2" },
-    { "rel": "delete", "href": "http://cimi.example.org/addresses/address2" }
-  ]
-}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/deltacloud/drivers/mock/data/cimi/address/address3.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/address/address3.json b/server/lib/deltacloud/drivers/mock/data/cimi/address/address3.json
deleted file mode 100644
index 6dc72cb..0000000
--- a/server/lib/deltacloud/drivers/mock/data/cimi/address/address3.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{ "id": "http://cimi.example.org/addresses/address3",
-  "name": "address3",
-  "description": "an IP address",
-  "created": "Wed Apr 04 11:59:15 EET 2012",
-  "ip": "192.168.10.3",
-  "hostname": "jsmith.local",
-  "allocation": "static",
-  "defaultGateway": "192.168.0.1",
-  "dns": "192.168.0.10",
-  "macAddress": "",
-  "protocol": "IPv4",
-  "mask": "255.255.0.0",
-  "network": {"href": "http://cimi.example.org/networks/network1"},
-  "resource": {},
-  "operations": [
-    { "rel": "edit", "href": "http://cimi.example.org/addresses/address3" },
-    { "rel": "delete", "href": "http://cimi.example.org/addresses/address3" }
-  ]
-}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/deltacloud/drivers/mock/data/cimi/forwarding_group/group1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/forwarding_group/group1.json b/server/lib/deltacloud/drivers/mock/data/cimi/forwarding_group/group1.json
new file mode 100644
index 0000000..e10e0bd
--- /dev/null
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/forwarding_group/group1.json
@@ -0,0 +1,13 @@
+{ "id": "http://cimi.example.org/routing_groups/group1",
+  "name": "group1",
+  "description": "a mock routing group",
+  "created": "Thu Jan 12 16:02:56 EET 2012",
+  "networks": [
+    { "href": "http://cimi.example.org/networks/network1"},
+    { "href": "http://cimi.example.org/networks/network2"}
+  ],
+  "operations": [
+    { "rel": "edit", "href": "http://cimi.example.org/routing_groups/group1" },
+    { "rel": "delete", "href": "http://cimi.example.org/routing_groups/group1" }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/deltacloud/drivers/mock/data/cimi/forwarding_group_template/template1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/forwarding_group_template/template1.json
b/server/lib/deltacloud/drivers/mock/data/cimi/forwarding_group_template/template1.json
new file mode 100644
index 0000000..adbe645
--- /dev/null
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/forwarding_group_template/template1.json
@@ -0,0 +1,12 @@
+{ "id": "http://cimi.example.org/routing_group_templates/template1",
+  "name": "template1",
+  "description": "A mock routing group template",
+  "created": "Fri Mar 16 16:42:50 EET 2012",
+  "networks": [
+    { "href": "http://cimi.example.org/networks/network1"},
+    { "href": "http://cimi.example.org/networks/network2"}
+  ],
+  "operations": [
+    { "rel": "edit", "href": "http://cimi.example.org/routing_group_templates/template1"
},
+    { "rel": "delete", "href": "http://cimi.example.org/routing_group_templates/template1"
}]
+}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/deltacloud/drivers/mock/data/cimi/routing_group/group1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/routing_group/group1.json b/server/lib/deltacloud/drivers/mock/data/cimi/routing_group/group1.json
deleted file mode 100644
index e10e0bd..0000000
--- a/server/lib/deltacloud/drivers/mock/data/cimi/routing_group/group1.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{ "id": "http://cimi.example.org/routing_groups/group1",
-  "name": "group1",
-  "description": "a mock routing group",
-  "created": "Thu Jan 12 16:02:56 EET 2012",
-  "networks": [
-    { "href": "http://cimi.example.org/networks/network1"},
-    { "href": "http://cimi.example.org/networks/network2"}
-  ],
-  "operations": [
-    { "rel": "edit", "href": "http://cimi.example.org/routing_groups/group1" },
-    { "rel": "delete", "href": "http://cimi.example.org/routing_groups/group1" }
-  ]
-}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/deltacloud/drivers/mock/data/cimi/routing_group_template/template1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/routing_group_template/template1.json
b/server/lib/deltacloud/drivers/mock/data/cimi/routing_group_template/template1.json
deleted file mode 100644
index adbe645..0000000
--- a/server/lib/deltacloud/drivers/mock/data/cimi/routing_group_template/template1.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{ "id": "http://cimi.example.org/routing_group_templates/template1",
-  "name": "template1",
-  "description": "A mock routing group template",
-  "created": "Fri Mar 16 16:42:50 EET 2012",
-  "networks": [
-    { "href": "http://cimi.example.org/networks/network1"},
-    { "href": "http://cimi.example.org/networks/network2"}
-  ],
-  "operations": [
-    { "rel": "edit", "href": "http://cimi.example.org/routing_group_templates/template1"
},
-    { "rel": "delete", "href": "http://cimi.example.org/routing_group_templates/template1"
}]
-}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d1158787/server/lib/deltacloud/drivers/mock/mock_driver_cimi_methods.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/mock_driver_cimi_methods.rb b/server/lib/deltacloud/drivers/mock/mock_driver_cimi_methods.rb
index 3431e51..336f77b 100644
--- a/server/lib/deltacloud/drivers/mock/mock_driver_cimi_methods.rb
+++ b/server/lib/deltacloud/drivers/mock/mock_driver_cimi_methods.rb
@@ -53,25 +53,25 @@ module Deltacloud::Drivers::Mock
       end
     end
 
-    def routing_groups(credentials, opts={})
+    def forwarding_groups(credentials, opts={})
       check_credentials(credentials)
       if opts[:id].nil?
-        routing_groups = @client.load_all_cimi(:routing_group).map{|rg| CIMI::Model::RoutingGroup.from_json(rg)}
-        routing_groups.map{|rg|convert_cimi_mock_urls(:routing_group, rg, opts[:env])}.flatten
+        forwarding_groups = @client.load_all_cimi(:forwarding_group).map{|fg| CIMI::Model::ForwardingGroup.from_json(fg)}
+        forwarding_groups.map{|fg|convert_cimi_mock_urls(:forwarding_group, fg, opts[:env])}.flatten
       else
-        routing_group = CIMI::Model::RoutingGroup.from_json(@client.load_cimi(:routing_group,
opts[:id]))
-        convert_cimi_mock_urls(:routing_group, routing_group, opts[:env])
+        forwarding_group = CIMI::Model::ForwardingGroup.from_json(@client.load_cimi(:forwarding_group,
opts[:id]))
+        convert_cimi_mock_urls(:forwarding_group, forwarding_group, opts[:env])
       end
     end
 
-    def routing_group_templates(credentials, opts={})
+    def forwarding_group_templates(credentials, opts={})
       check_credentials(credentials)
       if opts[:id].nil?
-        routing_group_templates = @client.load_all_cimi(:routing_group_template).map{|rg_templ|
CIMI::Model::RoutingGroupTemplate.from_json(rg_templ)}
-        routing_group_templates.map{|rg_templ|convert_cimi_mock_urls(:routing_group_template,
rg_templ, opts[:env])}.flatten
+        forwarding_group_templates = @client.load_all_cimi(:forwarding_group_template).map{|fg_templ|
CIMI::Model::ForwardingGroupTemplate.from_json(fg_templ)}
+        forwarding_group_templates.map{|fg_templ|convert_cimi_mock_urls(:forwarding_group_template,
fg_templ, opts[:env])}.flatten
       else
-        routing_group_template = CIMI::Model::RoutingGroupTemplate.from_json(@client.load_cimi(:routing_group_template,
opts[:id]))
-        convert_cimi_mock_urls(:routing_group_template, routing_group_template, opts[:env])
+        forwarding_group_template = CIMI::Model::ForwardingGroupTemplate.from_json(@client.load_cimi(:forwarding_group_template,
opts[:id]))
+        convert_cimi_mock_urls(:forwarding_group_template, forwarding_group_template, opts[:env])
       end
     end
 
@@ -108,6 +108,17 @@ module Deltacloud::Drivers::Mock
       end
     end
 
+    def address_templates(credentials, opts={})
+      check_credentials(credentials)
+      if opts[:id].nil?
+        address_templates = @client.load_all_cimi(:address_template).map{|addr_templ| CIMI::Model::AddressTemplate.from_json(addr_templ)}
+        address_templates.map{|addr_templ|convert_cimi_mock_urls(:address_template, addr_templ,
opts[:env])}.flatten
+      else
+        address_template = CIMI::Model::AddressTemplate.from_json(@client.load_cimi(:address_template,
opts[:id]))
+        convert_cimi_mock_urls(:address_template, address_template, opts[:env])
+      end
+    end
+
     private
 
     def convert_cimi_mock_urls(model_name, cimi_object, context)


Mime
View raw message