Skip to content

Commit

Permalink
No need to set deviceName when creating the CD/DVD drive backing info
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaeon committed Apr 16, 2015
1 parent 6b31cf2 commit 5e9f747
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/pvc/widget/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ def display(self):
controller=controller
)

backing_info = self.select_backing(
name='cdrom-{}-{}'.format(controller.key, unit_number)
)
backing_info = self.select_backing()

if not backing_info:
return
Expand Down Expand Up @@ -183,13 +181,10 @@ def display(self):

gauge.display()

def select_backing(self, name):
def select_backing(self):
"""
Prompts the user to select device backing
Args:
name (str): Device name to set
Returns:
A vim.VirtualDeviceDeviceBackingInfo instance on success,
None otherwise
Expand Down Expand Up @@ -217,13 +212,13 @@ def select_backing(self, name):

if tag == 'Pass through':
backing_info = pyVmomi.vim.VirtualCdromRemotePassthroughBackingInfo(
deviceName=name,
deviceName='',
useAutoDetect=False,
exclusive=False
)
elif tag == 'ATAPI emulation':
backing_info = pyVmomi.vim.VirtualCdromRemoteAtapiBackingInfo(
deviceName=name,
deviceName='',
useAutoDetect=False
)

Expand Down

0 comments on commit 5e9f747

Please sign in to comment.