def extras(self, extra_):
        '''
        Extra actions
        '''
        output = {}

        alias, driver = extra_['provider'].split(':')
        fun = '{0}.{1}'.format(driver, extra_['action'])
        if fun not in self.clouds:
            log.error(
                'Creating \'%s\' using \'%s\' as the provider '
                'cannot complete since \'%s\' is not available',
                extra_['name'], extra_['provider'], driver
            )
            return

        try:
            with salt.utils.context.func_globals_inject(
                self.clouds[fun],
                __active_provider_name__=extra_['provider']
            ):
                output = self.clouds[fun](**extra_)
        except KeyError as exc:
            log.exception(
                'Failed to perform %s.%s on %s. '
                'Configuration value %s needs to be set',
                extra_['provider'], extra_['action'], extra_['name'], exc
            )
        return output
def extras ( self , extra_ ) : output = { } alias , driver = extra_ [ 'provider' ] . split ( ':' ) fun = '{0}.{1}' . format ( driver , extra_ [ 'action' ] ) if fun not in self . clouds : log . error ( 'Creating \'%s\' using \'%s\' as the provider ' 'cannot complete since \'%s\' is not available' , extra_ [ 'name' ] , extra_ [ 'provider' ] , driver ) return try : with salt . utils . context . func_globals_inject ( self . clouds [ fun ] , __active_provider_name__ = extra_ [ 'provider' ] ) : output = self . clouds [ fun ] ( ** extra_ ) except KeyError as exc : log . exception ( 'Failed to perform %s.%s on %s. ' 'Configuration value %s needs to be set' , extra_ [ 'provider' ] , extra_ [ 'action' ] , extra_ [ 'name' ] , exc ) return output
Extra actions