Skip to content

Commit

Permalink
Rework model to use VMware, adjust import_vm helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
sambible committed Jun 26, 2023
1 parent e4a46d0 commit 6e648f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion airgun/entities/computeresource.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ def vm_poweroff(self, entity_name, vm_name):
if vm['Power'].widget.read() == 'On':
vm['Actions'].widget.click(handle_alert=True)

def vm_import(self, entity_name, vm_name, hostgroup, location):
def vm_import(self, entity_name, vm_name, hostgroup, location, org=None, name=None):
"""Imports the specified VM"""
view = self.navigate_to(self, 'VMImport', entity_name=entity_name, vm_name=vm_name)
if name:
view.fill({'host.name': name})
if org:
view.fill({'host.organization': org})
view.fill({'host.hostgroup': hostgroup, 'host.location': location})
view.submit.click()

Expand Down

0 comments on commit 6e648f9

Please sign in to comment.