control-center/serviced — pull request #741 by wplu (2014-07-21 15:53:30+00:00)
Title: added --ascii and SERVICED_TREE_ASCII for putty; use spaces when outputt...

...ing to non-tty

ISSUE:
```
# plu@plu-9: ./serviced service list | grep zenpython
│ └─zenpython ehg2kjc45tbwg7a0h6c4hnxqq 1 .../euuygi0.../devimg default 0 auto HBase
# plu@plu-9: ./serviced service list | awk '/zenpython/{print $2}'
└─zenpython
```

FIX:
```
# plu@plu-9: ./serviced service list | grep zenpython
zenpython	ehg2kjc45tbwg7a0h6c4hnxqq	1	.../euuygi0.../devimg	default	0	auto	HBase
# plu@plu-9: ./serviced service list | awk '/zenpython/{print $2}'
ehg2kjc45tbwg7a0h6c4hnxqq
```

DEMO1:
```
# plu@plu-9: ./serviced service list
NAME	SERVICEID	INST	IMAGEID	POOL	DSTATE	LAUNCH	DEPID
└─Zenoss.core	euuygi078fwpgw6v3chubpu7p	0	default	0	auto	HBase
├─MetricShipper	1nk6hh1dd2unau7kka91262ix	1	.../euuygi0.../devimg	default	0	auto	HBase
├─MySQL	2k5rrsvoy5fpl3fxqm8qvkec7	1	.../euuygi0.../devimg	default	0	auto	HBase
├─localhost	3vj3m1qp5ntt8koctdftw5hg0	0	default	0	auto	HBase
│ ├─zenhub	b37a5xezfskz6pa02xjlytzp4	1	.../euuygi0.../devimg	default	0	auto	HBase
│ └─localhost	u0b5ehx1q67dghqyjx7w3b84	0	default	0	auto	HBase
│ ├─zensyslog	25s0duwqc7t50ppg2jbpf48bp	1	.../euuygi0.../devimg	default	0	auto	HBase
│ ├─zencommand	3yecsjtq3b7zbq0aewvswqwvp	1	.../euuygi0.../devimg	default	0	auto	HBase
│ ├─zenprocess	4de86boou4zj40s0x77z4tflb	1	.../euuygi0.../devimg	default	0	auto	HBase
│ ├─zenperfsnmp	4vz0zijkfrddt2mhwhb2m87dg	1	.../euuygi0.../devimg	default	0	auto	HBase
│ ├─zenstatus	alv66uiatyl62k5jjp0904ur0	1	.../euuygi0.../devimg	default	0	auto	HBase
│ ├─zentrap	azl54cyq7cgymno5dyeuv4dlq	1	.../euuygi0.../devimg	default	0	auto	HBase
│ ├─zenmodeler	bxt317uon8er4lrbb4pthvjal	1	.../euuygi0.../devimg	default	0	auto	HBase
│ ├─zenping	dtwg0bj50hiuq53zi1z7j3ra	1	.../euuygi0.../devimg	default	0	auto	HBase
│ ├─zenjmx	duscgbqtkmfecgi9jwixl8dd8	1	.../euuygi0.../devimg	default	0	auto	HBase
│ └─zenpython	ehg2kjc45tbwg7a0h6c4hnxqq	1	.../euuygi0.../devimg	default	0	auto	HBase
├─zproxy	4eesgsfmo3duhcria0f51dz1p	1	.../euuygi0.../devimg	default	0	auto	HBase
├─Zauth	6ii5vtd0ybv2atamqhc96zq02	1	.../euuygi0.../devimg	default	0	auto	HBase
├─Zope	7dk1szg6xoiin4stoa082l8k3	2	.../euuygi0.../devimg	default	0	auto	HBase
├─memcached	92mfbts4yy3m8lbrvm54zg72f	1	.../euuygi0.../devimg	default	0	auto	HBase
├─zenactiond	99jiuis7l3coqbu3zqezi93pj	1	.../euuygi0.../devimg	default	0	auto	HBase
├─zeneventd	9ca56007ft9ptsfgrt7o0rb04	1	.../euuygi0.../devimg	default	0	auto	HBase
├─zenjobs	ae253x2q0t5kxzon8lq2oluzx	1	.../euuygi0.../devimg	default	0	auto	HBase
├─MetricConsumer	aefln3czagm5gbxtk3ekzn46w	1	.../euuygi0.../devimg	default	0	auto	HBase
├─zeneventserver	bc2ls1t863jl1lquds05hl577	1	.../euuygi0.../devimg	default	0	auto	HBase
├─CentralQuery	bs49b6qegpxmuydwfr5njhih8	1	.../euuygi0.../devimg	default	0	auto	HBase
├─RabbitMQ	cbf0mcplo75bh66d3fyo893as	1	.../euuygi0.../devimg	default	0	auto	HBase
├─redis	df56nq0r3bkh4zjm1lmtxhjb4	1	.../euuygi0.../devimg	default	0	auto	HBase
├─HBase	di9n3i4gebreiaatpo8oyiqbq	0	default	0	auto	HBase
│ ├─HMaster	1qx19iy7moztyjfc1bhtsv44u	1	.../euuygi0.../hbase	default	0	auto	HBase
│ ├─RegionServer	e79tuq0rodw2qbxamvc1h71oe	3	.../euuygi0.../hbase	default	0	auto	HBase
│ └─ZooKeeper	ht7npvo0jzch9z8a2tw38nzj	3	.../euuygi0.../hbase	default	0	auto	HBase
└─opentsdb	efpqe3fdpejeguwdax93m0sl7	0	default	0	auto	HBase
├─writer	10zwwnd2dvc0otrkh7ql0y8ek	1	.../euuygi0.../opentsdb	default	0	auto	HBase
└─reader	38g29nc01yvrlvkwstzr0xci0	1	.../euuygi0.../opentsdb	default	0	auto	HBase
```

DEMO2:
```
# plu@plu-9: ./serviced service list --ascii
NAME	SERVICEID	INST	IMAGEID	POOL	DSTATE	LAUNCH	DEPID
+-Zenoss.core	euuygi078fwpgw6v3chubpu7p	0	default	0	auto	HBase
|-MetricShipper	1nk6hh1dd2unau7kka91262ix	1	.../euuygi0.../devimg	default	0	auto	HBase
|-MySQL	2k5rrsvoy5fpl3fxqm8qvkec7	1	.../euuygi0.../devimg	default	0	auto	HBase
|-localhost	3vj3m1qp5ntt8koctdftw5hg0	0	default	0	auto	HBase
| |-zenhub	b37a5xezfskz6pa02xjlytzp4	1	.../euuygi0.../devimg	default	0	auto	HBase
| +-localhost	u0b5ehx1q67dghqyjx7w3b84	0	default	0	auto	HBase
| |-zensyslog	25s0duwqc7t50ppg2jbpf48bp	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zencommand	3yecsjtq3b7zbq0aewvswqwvp	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenprocess	4de86boou4zj40s0x77z4tflb	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenperfsnmp	4vz0zijkfrddt2mhwhb2m87dg	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenstatus	alv66uiatyl62k5jjp0904ur0	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zentrap	azl54cyq7cgymno5dyeuv4dlq	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenmodeler	bxt317uon8er4lrbb4pthvjal	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenping	dtwg0bj50hiuq53zi1z7j3ra	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenjmx	duscgbqtkmfecgi9jwixl8dd8	1	.../euuygi0.../devimg	default	0	auto	HBase
| +-zenpython	ehg2kjc45tbwg7a0h6c4hnxqq	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zproxy	4eesgsfmo3duhcria0f51dz1p	1	.../euuygi0.../devimg	default	0	auto	HBase
|-Zauth	6ii5vtd0ybv2atamqhc96zq02	1	.../euuygi0.../devimg	default	0	auto	HBase
|-Zope	7dk1szg6xoiin4stoa082l8k3	2	.../euuygi0.../devimg	default	0	auto	HBase
|-memcached	92mfbts4yy3m8lbrvm54zg72f	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zenactiond	99jiuis7l3coqbu3zqezi93pj	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zeneventd	9ca56007ft9ptsfgrt7o0rb04	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zenjobs	ae253x2q0t5kxzon8lq2oluzx	1	.../euuygi0.../devimg	default	0	auto	HBase
|-MetricConsumer	aefln3czagm5gbxtk3ekzn46w	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zeneventserver	bc2ls1t863jl1lquds05hl577	1	.../euuygi0.../devimg	default	0	auto	HBase
|-CentralQuery	bs49b6qegpxmuydwfr5njhih8	1	.../euuygi0.../devimg	default	0	auto	HBase
|-RabbitMQ	cbf0mcplo75bh66d3fyo893as	1	.../euuygi0.../devimg	default	0	auto	HBase
|-redis	df56nq0r3bkh4zjm1lmtxhjb4	1	.../euuygi0.../devimg	default	0	auto	HBase
|-HBase	di9n3i4gebreiaatpo8oyiqbq	0	default	0	auto	HBase
| |-HMaster	1qx19iy7moztyjfc1bhtsv44u	1	.../euuygi0.../hbase	default	0	auto	HBase
| |-RegionServer	e79tuq0rodw2qbxamvc1h71oe	3	.../euuygi0.../hbase	default	0	auto	HBase
| +-ZooKeeper	ht7npvo0jzch9z8a2tw38nzj	3	.../euuygi0.../hbase	default	0	auto	HBase
+-opentsdb	efpqe3fdpejeguwdax93m0sl7	0	default	0	auto	HBase
|-writer	10zwwnd2dvc0otrkh7ql0y8ek	1	.../euuygi0.../opentsdb	default	0	auto	HBase
+-reader	38g29nc01yvrlvkwstzr0xci0	1	.../euuygi0.../opentsdb	default	0	auto	HBase
```

DEMO3:
```
# plu@plu-9: SERVICED_TREE_ASCII=true ./serviced service list
NAME	SERVICEID	INST	IMAGEID	POOL	DSTATE	LAUNCH	DEPID
+-Zenoss.core	euuygi078fwpgw6v3chubpu7p	0	default	0	auto	HBase
|-MetricShipper	1nk6hh1dd2unau7kka91262ix	1	.../euuygi0.../devimg	default	0	auto	HBase
|-MySQL	2k5rrsvoy5fpl3fxqm8qvkec7	1	.../euuygi0.../devimg	default	0	auto	HBase
|-localhost	3vj3m1qp5ntt8koctdftw5hg0	0	default	0	auto	HBase
| |-zenhub	b37a5xezfskz6pa02xjlytzp4	1	.../euuygi0.../devimg	default	0	auto	HBase
| +-localhost	u0b5ehx1q67dghqyjx7w3b84	0	default	0	auto	HBase
| |-zensyslog	25s0duwqc7t50ppg2jbpf48bp	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zencommand	3yecsjtq3b7zbq0aewvswqwvp	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenprocess	4de86boou4zj40s0x77z4tflb	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenperfsnmp	4vz0zijkfrddt2mhwhb2m87dg	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenstatus	alv66uiatyl62k5jjp0904ur0	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zentrap	azl54cyq7cgymno5dyeuv4dlq	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenmodeler	bxt317uon8er4lrbb4pthvjal	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenping	dtwg0bj50hiuq53zi1z7j3ra	1	.../euuygi0.../devimg	default	0	auto	HBase
| |-zenjmx	duscgbqtkmfecgi9jwixl8dd8	1	.../euuygi0.../devimg	default	0	auto	HBase
| +-zenpython	ehg2kjc45tbwg7a0h6c4hnxqq	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zproxy	4eesgsfmo3duhcria0f51dz1p	1	.../euuygi0.../devimg	default	0	auto	HBase
|-Zauth	6ii5vtd0ybv2atamqhc96zq02	1	.../euuygi0.../devimg	default	0	auto	HBase
|-Zope	7dk1szg6xoiin4stoa082l8k3	2	.../euuygi0.../devimg	default	0	auto	HBase
|-memcached	92mfbts4yy3m8lbrvm54zg72f	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zenactiond	99jiuis7l3coqbu3zqezi93pj	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zeneventd	9ca56007ft9ptsfgrt7o0rb04	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zenjobs	ae253x2q0t5kxzon8lq2oluzx	1	.../euuygi0.../devimg	default	0	auto	HBase
|-MetricConsumer	aefln3czagm5gbxtk3ekzn46w	1	.../euuygi0.../devimg	default	0	auto	HBase
|-zeneventserver	bc2ls1t863jl1lquds05hl577	1	.../euuygi0.../devimg	default	0	auto	HBase
|-CentralQuery	bs49b6qegpxmuydwfr5njhih8	1	.../euuygi0.../devimg	default	0	auto	HBase
|-RabbitMQ	cbf0mcplo75bh66d3fyo893as	1	.../euuygi0.../devimg	default	0	auto	HBase
|-redis	df56nq0r3bkh4zjm1lmtxhjb4	1	.../euuygi0.../devimg	default	0	auto	HBase
|-HBase	di9n3i4gebreiaatpo8oyiqbq	0	default	0	auto	HBase
| |-HMaster	1qx19iy7moztyjfc1bhtsv44u	1	.../euuygi0.../hbase	default	0	auto	HBase
| |-RegionServer	e79tuq0rodw2qbxamvc1h71oe	3	.../euuygi0.../hbase	default	0	auto	HBase
| +-ZooKeeper	ht7npvo0jzch9z8a2tw38nzj	3	.../euuygi0.../hbase	default	0	auto	HBase
+-opentsdb	efpqe3fdpejeguwdax93m0sl7	0	default	0	auto	HBase
|-writer	10zwwnd2dvc0otrkh7ql0y8ek	1	.../euuygi0.../opentsdb	default	0	auto	HBase
+-reader	38g29nc01yvrlvkwstzr0xci0	1	.../euuygi0.../opentsdb	default	0	auto	HBase
```