Skip to content

Commit

Permalink
wrapper: fix VM ID lookup in RHV
Browse files Browse the repository at this point in the history
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
  • Loading branch information
nyoxi committed Apr 18, 2019
1 parent 2f885cf commit fe188ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wrapper/virt-v2v-wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ class OutputParser(object): # {{{
br'(?P<disk>.*?)(-flat)?\.vmdk$')
RHV_DISK_UUID = re.compile(br'disk\.id = \'(?P<uuid>[a-fA-F0-9-]*)\'')
RHV_VM_ID = re.compile(
br'<VirtualSystem ovf:id=\'?P<uuid>[a-fA-F0-9-]*\'>')
br'<VirtualSystem ovf:id=\'(?P<uuid>[a-fA-F0-9-]*)\'>')
OSP_VOLUME_ID = re.compile(
br'openstack .*\'?volume\'? \'?show\'?.* '
br'\'?(?P<uuid>[a-fA-F0-9-]*)\'?$')
Expand Down Expand Up @@ -1248,6 +1248,7 @@ def parse_line(self, state, line):
'Volume \'%s\' is NOT at index %d', volume_id, index)

# RHV VM UUID
m = self.RHV_VM_ID.search(line)
if m is not None:
vm_id = m.group('uuid').decode('utf-8')
state['vm_id'] = vm_id
Expand Down

0 comments on commit fe188ab

Please sign in to comment.