(cls, driver)
Confirm that driver is allowed via configuration for this COE.
Confirm that driver is allowed via configuration for this COE.
Confirm that driver is allowed via configuration for this COE .
def _validate_network_driver_allowed(cls, driver):
        """Confirm that driver is allowed via configuration for this COE."""
        if ('all' not in cls.allowed_network_drivers and
           driver not in cls.allowed_network_drivers):
            raise exception.InvalidParameterValue(_(
                'Network driver type %(driver)s is not allowed, '
                'expecting a %(allowed_drivers)s network driver. ') % {
                    'driver': driver,
                    'allowed_drivers': '/'.join(
                        cls.allowed_network_drivers + ['unspecified'])})
def _validate_network_driver_allowed ( cls , driver ) : if ( 'all' not in cls . allowed_network_drivers and driver not in cls . allowed_network_drivers ) : raise exception . InvalidParameterValue ( _ ( 'Network driver type %(driver)s is not allowed, ' 'expecting a %(allowed_drivers)s network driver. ' ) % { 'driver' : driver , 'allowed_drivers' : '/' . join ( cls . allowed_network_drivers + [ 'unspecified' ] ) } )