Bug 1426227

Summary: vm.create_snapshot for rhev vm creates a snapshot with extended name
Product: Red Hat CloudForms Management Engine Reporter: Ilanit Stein <istein>
Component: ProvidersAssignee: Greg Blomquist <gblomqui>
Status: CLOSED NOTABUG QA Contact: Ilanit Stein <istein>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: jfrey, jhardy, mkanoor, obarenbo, tfitzger
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: automate:snapshot:rhev
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-05 14:14:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:

Description Ilanit Stein 2017-02-23 13:23:20 UTC
Description of problem:

when creating snapshot via Automate, the snapshot is created with name other than expected:
For VM with name "test_1", create a snapshot, with name "snp1",
Creates actually snapshot with name "Snapshot:<snp1> for test_1",
though it should be "snp1"

Version-Release number of selected component (if applicable):
CFME-5.7.1.2
RHV-4.0.7

Additional info:
The exact flow in automate, used to create the snapshot is described in bug 1399207 description.

Comment 2 Greg McCullough 2017-02-23 19:33:04 UTC
Looks like the provider create_snapshot method ignores the name passed to the method.

https://github.com/ManageIQ/manageiq/blob/51c1c07fa128b496f480e59f054647492ca38033/app/models/manageiq/providers/redhat/infra_manager/vm/operations/snapshot.rb#L24

Sending to providers team to take a look.

Comment 3 Ilanit Stein 2017-03-05 14:14:31 UTC
After investigating this issue with masayag, it turned out that for RHV provider,
Snapshot name parameter is not used.

Therefore, running create snapshot method with the following line, that includes snap_name, as done in this case:
  
snap_desc = $evm.root['snap_desc'] || "Snapshot:<#{snap_name}> for #{vm.name}"

is not relevant. 

considering the above, I am closing the bug.