VirtualBox

Changeset 79911 in vbox for trunk


Ignore:
Timestamp:
Jul 21, 2019 2:14:57 PM (6 years ago)
Author:
vboxsync
Message:

ValKit/vboxwrappers.py: Try create a new host-only interface is no suitable one is found. bugref:9151

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py

    r79908 r79911  
    14381438                except:
    14391439                    reporter.errorXcpt();
     1440
    14401441        elif eAttachmentType == vboxcon.NetworkAttachmentType_HostOnly:
    14411442            try:
     
    14511452                reporter.errorXcpt();
    14521453            if sRetName == '':
    1453                 sRetName = 'HostInterfaceNetwork-vboxnet0';
     1454                # Create a new host-only interface.
     1455                try:
     1456                    (oIHostOnly, oIProgress) = self.oVBox.host.createHostOnlyNetworkInterface();
     1457                    oProgress = ProgressWrapper(oIProgress, self.oVBoxMgr, self.oTstDrv, 'Create host only interface');
     1458                    oProgress.wait();
     1459                    if oProgress.logResult() is False:
     1460                        return '';
     1461                    sRetName = oIHostOnly.name;
     1462                except:
     1463                    reporter.errorXcpt();
     1464                    return '';
     1465
    14541466        elif eAttachmentType == vboxcon.NetworkAttachmentType_Internal:
    14551467            sRetName = 'VBoxTest';
     1468
    14561469        elif eAttachmentType == vboxcon.NetworkAttachmentType_NAT:
    14571470            sRetName = '';
    1458         else:
     1471
     1472        else: ## @todo Support NetworkAttachmentType_NATNetwork
    14591473            reporter.error('eAttachmentType=%s is not known' % (eAttachmentType));
    14601474        return sRetName;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette