1.0.0 • Published 9 years ago
fleetctl-parse-units-list v1.0.0
fleetctl-parse-units-list
Parse output of fleetctl list-units
.
Installation
$ npm install fleetctl-parse-units-list --save
Usage
const parse = require('fleetctl-parse-units-list');
let output = yield exec('fleetctl list-units');
/*
UNIT MACHINE ACTIVE SUB
hozmelago.service sokhire.../141.239.12.114 active running
*/
let units = parse(output);
/*
units = [{
name: 'hozmelago',
machine: {
name: 'sokhire',
ip: '141.239.12.114'
},
state: 'running'
}]
*/
Tests
$ make test
License
fleetctl-parse-units-list is released under the MIT license.
1.0.0
9 years ago