Skip to content

Commit 5116579

Browse files
committed
Include memory option to Snapshots
Fixes #84
1 parent 892b048 commit 5116579

File tree

4 files changed

+355
-1059
lines changed

4 files changed

+355
-1059
lines changed

lib/fog/proxmox/compute/models/snapshot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def initialize(new_attributes = {})
5151

5252
def save
5353
path_params = { node: node_id, type: server_type, vmid: server_id }
54-
body_params = { snapname: name }
54+
body_params = { snapname: name, vmstate: vmstate }
5555
server.tasks.wait_for(service.create_snapshot(path_params, body_params))
5656
end
5757

spec/compute_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,16 @@
277277

278278
it 'CRUD snapshots' do
279279
VCR.use_cassette('snapshots') do
280-
node_name = 'pve'
280+
node_name = 'proxmox-noris'
281281
node = @service.nodes.get node_name
282282
vmid = node.servers.next_id
283283
server_hash = { vmid: vmid }
284284
node.servers.create server_hash
285285
# Create
286286
snapname = 'snapshot1'
287+
vmstate = 0
287288
server = node.servers.get vmid
288-
snapshot_hash = { name: snapname }
289+
snapshot_hash = { name: snapname, vmstate: vmstate }
289290
server.snapshots.create(snapshot_hash)
290291
# Find by id
291292
snapshot = server.snapshots.get snapname

0 commit comments

Comments
 (0)