You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2010/11/12 10:52:24 UTC

svn commit: r1034314 - in /incubator/deltacloud/trunk/server: deltacloud.rb lib/deltacloud/models/load_balancer.rb

Author: mfojtik
Date: Fri Nov 12 09:52:24 2010
New Revision: 1034314

URL: http://svn.apache.org/viewvc?rev=1034314&view=rev
Log:
Added LoadBalancer object

Added:
    incubator/deltacloud/trunk/server/lib/deltacloud/models/load_balancer.rb
Modified:
    incubator/deltacloud/trunk/server/deltacloud.rb

Modified: incubator/deltacloud/trunk/server/deltacloud.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/deltacloud.rb?rev=1034314&r1=1034313&r2=1034314&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/deltacloud.rb (original)
+++ incubator/deltacloud/trunk/server/deltacloud.rb Fri Nov 12 09:52:24 2010
@@ -15,6 +15,7 @@ require 'deltacloud/models/storage_snaps
 require 'deltacloud/models/storage_volume'
 require 'deltacloud/models/bucket'
 require 'deltacloud/models/blob'
+require 'deltacloud/models/load_balancer'
 
 require 'deltacloud/validation'
 require 'deltacloud/helpers'

Added: incubator/deltacloud/trunk/server/lib/deltacloud/models/load_balancer.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/models/load_balancer.rb?rev=1034314&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/models/load_balancer.rb (added)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/models/load_balancer.rb Fri Nov 12 09:52:24 2010
@@ -0,0 +1,39 @@
+#
+# Copyright (C) 2009  Red Hat, Inc.
+#
+# 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 LoadBalancer < BaseModel
+
+  attr_accessor :realms
+  attr_accessor :listeners
+  attr_accessor :instances
+  attr_accessor :public_addresses
+  attr_accessor :created_at
+
+  def add_listener(opts)
+    @listeners << Listener.new(opts)
+  end
+
+  class Listener < BaseModel
+    attr_accessor :protocol
+    attr_accessor :load_balancer_port
+    attr_accessor :instance_port
+  end
+
+end
+