nl_tokens: Gets a license provider based on api type or version
pl_tokens: function getLicenseProvider ( poolName , options ) { const methodOptions = { } ; Object . assign ( methodOptions , options ) ; const factoryOptions = { } ; Object . assign ( factoryOptions , this . constructorOptions ) ; let licenseProvider ; if ( methodOptions . autoApiType ) { return getApiType . call ( this , poolName , methodOptions ) . then ( ( apiType ) => { // Even though the main API by type is the same across BIG-IQ versions, // there are some subtle differences the implementations need to know // about factoryOptions . version = this . version ; try { licenseProvider = bigIqLicenseProviderFactory . getLicenseProviderByType ( apiType , this . bigIp , factoryOptions ) ; return q ( licenseProvider ) ; } catch ( err ) { this . logger . info ( 'Error getting license provider by type' , err && err . message ? err . message : err ) ; return q . reject ( err ) ; } } ) . catch ( ( err ) => { this . logger . info ( 'Error getting api type' , err && err . message ? err . message : err ) ; return q . reject ( err ) ; } ) ; } try { licenseProvider = bigIqLicenseProviderFactory . getLicenseProviderByVersion ( this . version , this . bigIp , factoryOptions ) ; return q ( licenseProvider ) ; } catch ( err ) { this . logger . info ( 'Error getting license provider by type' , err && <mask> . message ? err . message : err ) ; return q . reject ( err ) ; } }