]> git.proxmox.com Git - pve-storage.git/commitdiff
nexenta : volume_snapshot_rollback : parse_volname
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 5 Feb 2013 11:56:10 +0000 (12:56 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Feb 2013 09:34:18 +0000 (10:34 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/NexentaPlugin.pm

index 4300b55895c3e837aadcf18b900302660653b21a..9bdbd6b4723b6ca4e3711e165515ad76f1be5eba 100644 (file)
@@ -456,13 +456,15 @@ sub volume_snapshot {
 sub volume_snapshot_rollback {
     my ($class, $scfg, $storeid, $volname, $snap) = @_;
 
-    nexenta_delete_lu($scfg, $volname);
+    my ($vtype, $name, $vmid) = $class->parse_volname($volname);
+
+    nexenta_delete_lu($scfg, $name);
 
-    nexenta_request($scfg, 'rollback', 'snapshot', "$scfg->{pool}/$volname\@$snap", '');
+    nexenta_request($scfg, 'rollback', 'snapshot', "$scfg->{pool}/$name\@$snap", '');
     
-    nexenta_import_lu($scfg, $volname);
+    nexenta_import_lu($scfg, $name);
     
-    nexenta_add_lun_mapping_entry($scfg, $volname);
+    nexenta_add_lun_mapping_entry($scfg, $name);
 }
 
 sub volume_snapshot_delete {