Revision c8e87b3e
src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb | ||
---|---|---|
45 | 45 |
when "deploy" then self.deploy(action_hash['params']) |
46 | 46 |
when "finalize" then self.finalize |
47 | 47 |
when "hold" then self.hold |
48 |
when "live_migrate" then self.live_migrate(action_hash['params'])
|
|
48 |
when "livemigrate" then self.live_migrate(action_hash['params']) |
|
49 | 49 |
when "migrate" then self.migrate(action_hash['params']) |
50 | 50 |
when "resume" then self.resume |
51 | 51 |
when "release" then self.release |
52 | 52 |
when "stop" then self.stop |
53 | 53 |
when "suspend" then self.suspend |
54 | 54 |
when "restart" then self.restart |
55 |
when "save_as" then self.save_as(action_hash['params'])
|
|
55 |
when "saveas" then self.save_as(action_hash['params']) |
|
56 | 56 |
when "shutdown" then self.shutdown |
57 | 57 |
else |
58 | 58 |
error_msg = "#{action_hash['perform']} action not " << |
src/sunstone/test/examples/vm/save_as.json | ||
---|---|---|
1 |
{ |
|
2 |
"action": { |
|
3 |
"params": { |
|
4 |
"disk_id": "0", |
|
5 |
"image_name": "new_image" |
|
6 |
}, |
|
7 |
"perform": "save_as" |
|
8 |
} |
|
9 |
} |
src/sunstone/test/examples/vm/saveas.json | ||
---|---|---|
1 |
{ |
|
2 |
"action": { |
|
3 |
"params": { |
|
4 |
"disk_id": "0", |
|
5 |
"image_name": "new_image" |
|
6 |
}, |
|
7 |
"perform": "saveas" |
|
8 |
} |
|
9 |
} |
src/sunstone/test/spec/vm_spec.rb | ||
---|---|---|
35 | 35 |
|
36 | 36 |
@action_deploy = File.read(EXAMPLES_PATH + '/vm/deploy.json') |
37 | 37 |
@action_hold = File.read(EXAMPLES_PATH + '/vm/hold.json') |
38 |
@action_saveas = File.read(EXAMPLES_PATH + '/vm/save_as.json')
|
|
38 |
@action_saveas = File.read(EXAMPLES_PATH + '/vm/saveas.json') |
|
39 | 39 |
@wrong_action = File.read(EXAMPLES_PATH + '/error/wrong_action.json') |
40 | 40 |
end |
41 | 41 |
|
... | ... | |
125 | 125 |
end |
126 | 126 |
|
127 | 127 |
############################################################################ |
128 |
# Save_as
|
|
128 |
# Saveas |
|
129 | 129 |
############################################################################ |
130 | 130 |
it "should prepare the VirtualMachine 0 disk to be saved" do |
131 | 131 |
url = '/vm/0/action' |
... | ... | |
134 | 134 |
last_response.status.should eql(204) |
135 | 135 |
end |
136 | 136 |
|
137 |
it "should get VirtualMachine 0 information after save_as action" do
|
|
137 |
it "should get VirtualMachine 0 information after saveas action" do |
|
138 | 138 |
url = '/vm/0' |
139 | 139 |
get url |
140 | 140 |
|
Also available in: Unified diff