Sha256: e33c0158711b0e276b3cfd0408618fb933f51a2026ecb0f2e6f8376a5a608570

Contents?: true

Size: 1.23 KB

Versions: 10

Compression:

Stored size: 1.23 KB

Contents

#    This file is part of RestConnection 
#
#    RestConnection is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    RestConnection is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with RestConnection.  If not, see <http://www.gnu.org/licenses/>.

class Deployment 
  include RightScale::Api::Base
  extend RightScale::Api::BaseExtend

  def set_input(name, value)
    deploy_href = URI.parse(self.href)
    connection.put(deploy_href.path, :deployment => {:parameters => {name => value} })
  end

  def servers_no_reload
    server_list = []
    @params['servers'].each do |s|
      server_list << Server.new(s)
    end
    return server_list
  end

  def servers
    # this populates extra information about the servers
    servers_no_reload.each do |s|
      s.reload
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rest_connection-0.0.13 lib/rest_connection/rightscale/deployment.rb
rest_connection-0.0.12 lib/rest_connection/rightscale/deployment.rb
rest_connection-0.0.11 lib/rest_connection/rightscale/deployment.rb
rest_connection-0.0.10 lib/rest_connection/rightscale/deployment.rb
rest_connection-0.0.9 lib/rest_connection/rightscale/deployment.rb
rest_connection-0.0.8 lib/rest_connection/rightscale/deployment.rb
rest_connection-0.0.7 lib/rest_connection/rightscale/deployment.rb
rest_connection-0.0.6 lib/rest_connection/rightscale/deployment.rb
rest_connection-0.0.5 lib/rest_connection/rightscale/deployment.rb
rest_connection-0.0.4 lib/rest_connection/rightscale/deployment.rb