deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject [7/9] git commit: CIMI: remove unneeded explicit collection models
Date Fri, 09 Nov 2012 19:49:39 GMT
CIMI: remove unneeded explicit collection models


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

Branch: refs/heads/master
Commit: 98c1482f8fa7dcb89988624c3560e47540f7aae9
Parents: 01305cf
Author: David Lutterkort <lutter@redhat.com>
Authored: Thu Nov 8 16:37:03 2012 -0800
Committer: David Lutterkort <lutter@redhat.com>
Committed: Fri Nov 9 11:48:42 2012 -0800

----------------------------------------------------------------------
 server/lib/cimi/models/network_port_collection.rb  |   51 ---------------
 .../network_port_configuration_collection.rb       |   35 ----------
 .../models/network_port_template_collection.rb     |   37 -----------
 3 files changed, 0 insertions(+), 123 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/98c1482f/server/lib/cimi/models/network_port_collection.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/network_port_collection.rb b/server/lib/cimi/models/network_port_collection.rb
deleted file mode 100644
index c5a848b..0000000
--- a/server/lib/cimi/models/network_port_collection.rb
+++ /dev/null
@@ -1,51 +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::NetworkPortCollection < CIMI::Model::Base
-
-  act_as_root_entity :network_port
-
-  text :count
-
-  #add member array:
-  self << CIMI::Model::NetworkPort
-
-  def self.default(context)
-    network_ports = CIMI::Model::NetworkPort.all(context)
-    self.new(
-      :id => context.network_ports_url,
-      :name => 'default',
-      :created => Time.now.xmlschema,
-      :description => "#{context.driver.name.capitalize} NetworkPortCollection",
-      :count => network_ports.size,
-      :network_ports => network_ports
-    )
-  end
-
-  def self.for_network(network_id, context)
-    net_url = context.network_url(network_id)
-    network_ports = CIMI::Model::NetworkPort.all(context)
-    ports_collection = network_ports.inject([]){|res, current| res << current if current.network.href
== net_url ; res}
-    self.new(
-      :id => net_url+"/network_ports",
-      :name => 'default',
-      :created => Time.now.xmlschema,
-      :description => "#{context.driver.name.capitalize} NetworkPortCollection",
-      :count => ports_collection.size,
-      :network_ports => ports_collection
-    )
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/98c1482f/server/lib/cimi/models/network_port_configuration_collection.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/network_port_configuration_collection.rb b/server/lib/cimi/models/network_port_configuration_collection.rb
deleted file mode 100644
index b210c3b..0000000
--- a/server/lib/cimi/models/network_port_configuration_collection.rb
+++ /dev/null
@@ -1,35 +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::NetworkPortConfigurationCollection < CIMI::Model::Base
-
-  act_as_root_entity :network_port_configuration
-
-  text :count
-
-  self << CIMI::Model::NetworkPortConfiguration
-
-  def self.default(context)
-    network_port_configurations = CIMI::Model::NetworkPortConfiguration.all(context)
-    self.new(
-      :id => context.network_port_configurations_url,
-      :name => 'default',
-      :created => Time.now.xmlschema,
-      :description => "#{context.driver.name.capitalize} NetworkPortConfigurationCollection",
-      :count => network_port_configurations.size,
-      :network_port_configurations => network_port_configurations
-    )
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/98c1482f/server/lib/cimi/models/network_port_template_collection.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/network_port_template_collection.rb b/server/lib/cimi/models/network_port_template_collection.rb
deleted file mode 100644
index 934e5cf..0000000
--- a/server/lib/cimi/models/network_port_template_collection.rb
+++ /dev/null
@@ -1,37 +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::NetworkPortTemplateCollection < CIMI::Model::Base
-
-  CIMI::Model.register_as_root_entity! "NetworkPortTemplates"
-
-  text :count
-
-  #add array of network_port_templates:
-  self << CIMI::Model::NetworkPortTemplate
-
-  def self.default(context)
-    network_port_templates = CIMI::Model::NetworkPortTemplate.all(context)
-    self.new(
-      :id => context.network_port_templates_url,
-      :name => 'default',
-      :created => Time.now.xmlschema,
-      :description => "#{context.driver.name.capitalize} NetworkPortTemplateCollection",
-      :count => network_port_templates.size,
-      :network_port_templates => network_port_templates
-    )
-  end
-
-end


Mime
View raw message