diff options
| author | Matthew Hicks <mhicks@mhicks-host.usersys.redhat.com> | 2008-07-16 21:00:12 -0400 |
|---|---|---|
| committer | Matthew Hicks <mhicks@mhicks-host.usersys.redhat.com> | 2008-07-16 21:00:12 -0400 |
| commit | 93c27104cd19d165c981bbedc7980b09b55109b2 (patch) | |
| tree | 89cc5c0cc79c8a6974e2b33798c2b68abfb313f2 /cloudmasterd | |
| parent | 1542121d13bf15b7c61b0ce2bf324acd9671c6eb (diff) | |
| download | tools-93c27104cd19d165c981bbedc7980b09b55109b2.tar.gz tools-93c27104cd19d165c981bbedc7980b09b55109b2.tar.xz tools-93c27104cd19d165c981bbedc7980b09b55109b2.zip | |
Updating genome-bootstrap and cloudmaster to store the repo and ipaddress in the cloud
Diffstat (limited to 'cloudmasterd')
| -rw-r--r-- | cloudmasterd/extra/cloudmasterd.spec | 2 | ||||
| -rw-r--r-- | cloudmasterd/lib/cloudmasterd.rb | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/cloudmasterd/extra/cloudmasterd.spec b/cloudmasterd/extra/cloudmasterd.spec index 3781280..4896536 100644 --- a/cloudmasterd/extra/cloudmasterd.spec +++ b/cloudmasterd/extra/cloudmasterd.spec @@ -6,7 +6,7 @@ Summary: Genome library and web application for managing cloud machines Name: rubygem-%{gemname} Version: 1.0.0 -Release: 7%{?dist} +Release: 8%{?dist} Group: Applications/System License: GPLv2 URL: https://fedorahosted.org/genome diff --git a/cloudmasterd/lib/cloudmasterd.rb b/cloudmasterd/lib/cloudmasterd.rb index 33c094f..91c4450 100644 --- a/cloudmasterd/lib/cloudmasterd.rb +++ b/cloudmasterd/lib/cloudmasterd.rb @@ -108,7 +108,8 @@ module Cloudmasterd::Models t.column :email, :string, :null => false, :limit => 255 t.column :cloud, :string, :null => false, :limit => 255 t.column :state, :string, :null => false, :limit => 255 - #t.column :repo, :string, :null => false, :limit => 255 # Add the repo column capture the origin repo + t.column :repo, :string, :null => false, :limit => 255 + t.column :hostname, :string, :null => false, :limit => 255 t.column :created_date, :datetime, :null => true end end @@ -168,7 +169,7 @@ module Cloudmasterd::Controllers begin _koan(@host, system_name, repo) - Machine.create :name => system_name, :email => email, :cloud => @host, :state => "Installing", :created_date => DateTime.now() + @machine = Machine.create :name => system_name, :repo => repo, :email => email, :cloud => @host, :state => "Installing", :created_date => DateTime.now() render :_koan rescue Exception => e @exception = e @@ -177,6 +178,10 @@ module Cloudmasterd::Controllers end end + def update + Machine.find(input.id).update_attribute(:hostname, input.hostname) + end + def destroy(name) puts "Destroying image #{name}" @@ -307,7 +312,7 @@ module Cloudmasterd::Views end def _koan - @host + "#{@machine.id}:#{@host}" end def _error |
