1.0.0 • Published 9 years ago

fleetctl-parse-units-list v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

fleetctl-parse-units-list Circle CI

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

Circle CI

$ make test

License

fleetctl-parse-units-list is released under the MIT license.