Darryl L. Pierce
2008-Jul-09 20:43 UTC
[Ovirt-devel] [PATCH] Moved the host saving call to after the CPU records are created. Also made it
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> --- wui/src/host-browser/host-browser.rb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/wui/src/host-browser/host-browser.rb b/wui/src/host-browser/host-browser.rb index e66493d..624661d 100755 --- a/wui/src/host-browser/host-browser.rb +++ b/wui/src/host-browser/host-browser.rb @@ -185,7 +185,6 @@ class HostBrowser # Let host-status mark it available when it # successfully connects to it via libvirt. "state" => Host::STATE_UNAVAILABLE) - host.save! rescue Exception => error puts "Error while creating record: #{error.message}" unless defined?(TESTING) end @@ -217,6 +216,8 @@ class HostBrowser host.cpus << detail end + host.save! + return host end -- 1.5.5.1
Chris Lalancette
2008-Jul-09 20:44 UTC
[Ovirt-devel] [PATCH] Moved the host saving call to after the CPU records are created. Also made it
Darryl L. Pierce wrote:> Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> > --- > wui/src/host-browser/host-browser.rb | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/wui/src/host-browser/host-browser.rb b/wui/src/host-browser/host-browser.rb > index e66493d..624661d 100755 > --- a/wui/src/host-browser/host-browser.rb > +++ b/wui/src/host-browser/host-browser.rb > @@ -185,7 +185,6 @@ class HostBrowser > # Let host-status mark it available when it > # successfully connects to it via libvirt. > "state" => Host::STATE_UNAVAILABLE) > - host.save! > rescue Exception => error > puts "Error while creating record: #{error.message}" unless defined?(TESTING) > end > @@ -217,6 +216,8 @@ class HostBrowser > host.cpus << detail > end > > + host.save! > + > return host > endYep, this one looks good. ACK Chris Lalancette