You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2013/02/25 20:23:02 UTC
[1/9] git commit: CIMI (MachineCreate): pass initialState to driver
CIMI (MachineCreate): pass initialState to driver
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/c64000c0
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/c64000c0
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/c64000c0
Branch: refs/heads/master
Commit: c64000c0c1799c4b2726fb1316b70ff518a83441
Parents: 8ea2b03
Author: David Lutterkort <lu...@redhat.com>
Authored: Fri Feb 22 14:25:58 2013 -0800
Committer: David Lutterkort <lu...@redhat.com>
Committed: Mon Feb 25 11:22:37 2013 -0800
----------------------------------------------------------------------
server/lib/cimi/models/machine_create.rb | 2 ++
server/lib/cimi/models/machine_template.rb | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c64000c0/server/lib/cimi/models/machine_create.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/machine_create.rb b/server/lib/cimi/models/machine_create.rb
index c0b107c..0f04c01 100644
--- a/server/lib/cimi/models/machine_create.rb
+++ b/server/lib/cimi/models/machine_create.rb
@@ -22,11 +22,13 @@ class CIMI::Model::MachineCreate < CIMI::Model::Base
if machine_template.href
template = machine_template.find(ctx)
params[:hwp_id] = template.machine_config.ref_id(ctx)
+ params[:initial_state] = template.initial_state
image_id = template.machine_image.ref_id(ctx)
else
# FIXME: What if either of these href's isn't there ? What if the user
# tries to override some aspect of the machine_config/machine_image ?
params[:hwp_id] = machine_template.machine_config.href.split('/').last
+ params[:initial_state] = machine_template.initial_state
image_id = machine_template.machine_image.href.split('/').last
if machine_template.credential.href
params[:keyname] = machine_template.credential.href.split('/').last
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c64000c0/server/lib/cimi/models/machine_template.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/machine_template.rb b/server/lib/cimi/models/machine_template.rb
index 4da9094..eed8fa9 100644
--- a/server/lib/cimi/models/machine_template.rb
+++ b/server/lib/cimi/models/machine_template.rb
@@ -17,6 +17,7 @@ class CIMI::Model::MachineTemplate < CIMI::Model::Base
acts_as_root_entity
+ text :initial_state
ref :machine_config
ref :machine_image
ref :credential