mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:13:31 +02:00
Move utility plugins into their own folder. They don't go into the support folder because they're not standalone units and require interaction with the main units. Further refactoring pending.
This commit is contained in:
21
lib/units/device/plugins/util/phone.js
Normal file
21
lib/units/device/plugins/util/phone.js
Normal file
@@ -0,0 +1,21 @@
|
||||
var syrup = require('stf-syrup')
|
||||
|
||||
var logger = require('../../../../util/logger')
|
||||
|
||||
module.exports = syrup.serial()
|
||||
.dependency(require('../service'))
|
||||
.define(function(options, service) {
|
||||
var log = logger.createLogger('device:plugins:phone')
|
||||
|
||||
function fetch() {
|
||||
log.info('Fetching phone info')
|
||||
return service.getProperties([
|
||||
'imei'
|
||||
, 'phoneNumber'
|
||||
, 'iccid'
|
||||
, 'network'
|
||||
])
|
||||
}
|
||||
|
||||
return fetch()
|
||||
})
|
||||
Reference in New Issue
Block a user