From: Michal Fojtik <[email protected]> --- server/deltacloud.rb | 1 + server/lib/deltacloud/models/load_balancer.rb | 39 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 0 deletions(-) create mode 100644 server/lib/deltacloud/models/load_balancer.rb
diff --git a/server/deltacloud.rb b/server/deltacloud.rb index 82e5780..02d6c2e 100644 --- a/server/deltacloud.rb +++ b/server/deltacloud.rb @@ -15,6 +15,7 @@ require 'deltacloud/models/storage_snapshot' require 'deltacloud/models/storage_volume' require 'deltacloud/models/bucket' require 'deltacloud/models/blob' +require 'deltacloud/models/load_balancer' require 'deltacloud/validation' require 'deltacloud/helpers' diff --git a/server/lib/deltacloud/models/load_balancer.rb b/server/lib/deltacloud/models/load_balancer.rb new file mode 100644 index 0000000..546a25f --- /dev/null +++ b/server/lib/deltacloud/models/load_balancer.rb @@ -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 + -- 1.7.3.2
