Jamie Gritton
8fd1ba2a5e
Improve IP address list representation in libxo output.
Extract decision-making about special-case printing of certain
jail parameters into a function.
Refactor emitting of IPv4 and IPv6 address lists into a function.
Resulting user-facing changes:
XO_VERSION is bumped to 2.
In verbose mode (-v), IPv4 and IPv6-Addresses are now properly emitted
as separate lists.
This only affects the output in encoding styles, i.e. xml and json.
{ {
"__version": "1", "__version": "2",
"jail-information": { "jail-information": {
"jail": [ "jail": [
{ {
"jid": 166, "jid": 166,
"hostname": "foo.com", "hostname": "foo.com",
"path": "/var/jail/foo", "path": "/var/jail/foo",
"name": "foo", "name": "foo",
"state": "ACTIVE", "state": "ACTIVE",
"cpusetid": 2, "cpusetid": 2,
"ipv4_addrs": [ "ipv4_addrs": [
"10.1.1.1", "10.1.1.1",
"10.1.1.2", "10.1.1.2",
"10.1.1.3", | "10.1.1.3"
> ],
> "ipv6_addrs": [
"fe80::1000:1", "fe80::1000:1",
"fe80::1000:2" "fe80::1000:2"
] ]
} }
] ]
} }
} }
In -n mode, ip4.addr and ip6.addr are formatted in the encoding styles'
native list types, e.g. instead of comma-separated lists, JSON arrays
are printed.
jls -n all --libxo json
...
"ip4.addr": [
"10.1.1.1",
"10.1.1.2",
"10.1.1.3"
],
"ip4.saddrsel": true,
"ip6.addr": [
"fe80::1000:1",
"fe80::1000:2"
],
...
jls -n all --libxo xml
...
<ip4.addr>10.1.1.1</ip4.addr>
<ip4.addr>10.1.1.2</ip4.addr>
<ip4.addr>10.1.1.3</ip4.addr>
<ip4.saddrsel>true</ip4.saddrsel>
<ip6.addr>fe80::1000:1</ip6.addr>
<ip6.addr>fe80::1000:2</ip6.addr>
...
PR: 215008
Submitted by: Christian Schwarz <me@cschwarz.com>
Differential Revision: https://reviews.freebsd.org/D8766
2016-12-24 23:51:27 +00:00
..
2015-06-13 19:20:56 +00:00
2016-01-21 17:49:10 +00:00
2016-10-04 20:27:15 +00:00
2015-06-13 19:20:56 +00:00
2016-11-11 02:42:53 +00:00
2016-08-09 19:46:05 +00:00
2016-01-21 18:41:55 +00:00
2016-05-24 03:15:46 +00:00
2016-10-07 22:17:25 +00:00
2015-12-01 05:18:48 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-02-24 17:20:11 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-11-02 08:12:37 +00:00
2016-11-29 13:11:00 +00:00
2016-11-13 17:55:27 +00:00
2016-06-26 14:44:01 +00:00
2016-05-13 17:48:04 +00:00
2016-06-03 19:25:30 +00:00
2016-06-03 19:25:30 +00:00
2016-08-29 19:40:46 +00:00
2016-01-14 15:49:24 +00:00
2015-09-25 19:44:01 +00:00
2016-02-24 17:20:11 +00:00
2016-10-16 20:59:28 +00:00
2016-12-13 22:31:49 +00:00
2016-12-24 11:22:28 +00:00
2016-04-18 17:30:33 +00:00
2016-07-20 15:00:05 +00:00
2016-08-25 19:36:58 +00:00
2015-08-01 10:40:17 +00:00
2016-10-10 14:21:21 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-10-26 15:58:41 +00:00
2016-11-02 16:15:49 +00:00
2016-07-20 18:41:47 +00:00
2016-12-20 17:12:17 +00:00
2016-11-17 18:12:17 +00:00
2016-12-21 09:05:30 +00:00
2016-11-28 07:41:01 +00:00
2016-04-14 21:56:36 +00:00
2016-11-13 00:11:30 +00:00
2015-12-01 05:18:48 +00:00
2016-08-29 22:48:36 +00:00
2016-03-18 01:28:41 +00:00
2015-06-13 19:20:56 +00:00
2016-09-22 07:55:07 +00:00
2015-06-13 19:20:56 +00:00
2016-02-24 17:20:11 +00:00
2016-05-13 00:02:03 +00:00
2015-09-25 19:44:01 +00:00
2016-11-13 00:11:23 +00:00
2016-09-08 15:53:49 +00:00
2016-09-21 10:58:58 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-04-15 02:14:11 +00:00
2016-04-14 12:46:46 +00:00
2015-06-13 19:20:56 +00:00
2016-11-22 22:10:58 +00:00
2015-06-13 19:20:56 +00:00
2016-04-15 03:38:58 +00:00
2016-10-12 20:24:33 +00:00
2016-10-18 12:58:17 +00:00
2015-12-01 05:23:19 +00:00
2015-10-21 05:37:09 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-03-12 15:10:30 +00:00
2016-05-01 16:41:25 +00:00
2016-11-09 07:31:39 +00:00
2016-11-17 03:02:35 +00:00
2016-12-02 11:30:21 +00:00
2015-06-13 19:20:56 +00:00
2016-05-10 11:12:31 +00:00
2016-09-21 11:22:19 +00:00
2016-03-14 17:41:17 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-08-25 05:22:53 +00:00
2016-07-14 20:15:55 +00:00
2016-04-23 22:31:58 +00:00
2016-12-24 23:51:27 +00:00
2016-03-16 04:05:02 +00:00
2015-11-27 21:27:39 +00:00
2016-05-30 20:41:55 +00:00
2016-04-14 11:41:30 +00:00
2016-08-02 21:48:26 +00:00
2016-08-23 13:43:43 +00:00
2015-06-13 19:20:56 +00:00
2016-05-15 21:45:04 +00:00
2016-05-10 11:17:19 +00:00
2015-06-13 19:20:56 +00:00
2016-02-24 17:20:11 +00:00
2015-06-13 19:20:56 +00:00
2016-11-26 13:26:29 +00:00
2016-02-24 17:20:11 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-07-12 19:47:01 +00:00
2015-10-21 05:37:09 +00:00
2016-05-11 17:27:27 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-12-01 05:23:19 +00:00
2016-10-25 00:59:23 +00:00
2016-09-26 22:07:45 +00:00
2016-04-20 21:32:34 +00:00
2015-10-22 21:13:35 +00:00
2016-05-24 00:57:11 +00:00
2016-04-01 01:35:52 +00:00
2016-05-01 16:41:25 +00:00
2015-12-02 05:31:01 +00:00
2016-03-30 23:50:23 +00:00
2015-12-19 09:18:01 +00:00
2016-11-08 23:59:41 +00:00
2016-04-15 22:31:22 +00:00
2016-12-08 23:29:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-11-30 22:16:30 +00:00
2015-09-22 01:31:01 +00:00
2015-06-13 19:20:56 +00:00
2016-05-04 23:20:53 +00:00
2015-06-16 23:37:19 +00:00
2015-06-13 19:20:56 +00:00
2016-11-22 08:27:49 +00:00
2014-06-20 09:57:27 +00:00
2015-12-07 23:53:01 +00:00
2016-08-25 19:36:58 +00:00
2016-10-21 15:23:54 +00:00
2016-05-21 02:14:11 +00:00
2016-07-30 01:10:05 +00:00
2015-06-13 19:20:56 +00:00
2016-04-22 05:07:59 +00:00
2016-10-15 23:46:55 +00:00
2016-08-31 19:30:59 +00:00
2015-09-25 19:44:01 +00:00
2016-12-16 22:37:16 +00:00
2016-05-10 11:18:53 +00:00
2016-07-04 21:18:57 +00:00
2015-06-13 19:20:56 +00:00
2016-02-24 17:20:11 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-12-21 08:29:44 +00:00
2015-12-01 05:18:48 +00:00
2016-12-10 12:48:48 +00:00
2016-02-23 15:28:13 +00:00
2016-05-02 02:13:22 +00:00
2015-06-13 19:20:56 +00:00
2016-05-17 04:03:45 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-04-14 12:25:00 +00:00
2016-05-15 22:31:03 +00:00
2016-06-13 11:19:06 +00:00
2016-05-29 04:18:47 +00:00
2015-06-13 19:20:56 +00:00
2016-05-22 19:06:38 +00:00
2016-02-24 17:20:11 +00:00
2016-02-24 17:20:11 +00:00
2016-06-16 15:25:37 +00:00
2016-02-24 17:20:11 +00:00
2015-06-13 19:20:56 +00:00
2016-11-05 19:51:13 +00:00
2015-06-13 19:20:56 +00:00
2016-10-02 00:56:21 +00:00
2016-01-21 17:33:31 +00:00
2016-06-26 00:53:31 +00:00
2016-03-02 16:14:46 +00:00
2015-09-08 22:50:17 +00:00
2016-07-30 01:10:05 +00:00
2016-09-30 20:35:12 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-11-11 15:00:13 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-12-24 23:29:50 +00:00
2016-06-13 10:30:49 +00:00
2015-11-26 01:14:40 +00:00
2015-11-26 01:14:40 +00:00
2015-06-13 19:20:56 +00:00
2016-06-08 22:30:21 +00:00
2016-05-04 23:20:53 +00:00
2016-05-14 04:29:13 +00:00
2016-02-24 17:20:11 +00:00
2016-11-05 18:00:36 +00:00
2016-10-06 16:28:34 +00:00
2016-10-22 22:35:39 +00:00
2016-07-30 20:39:39 +00:00
2016-09-19 16:07:32 +00:00
2015-06-13 19:20:56 +00:00
2015-12-22 05:57:23 +00:00
2016-09-04 12:17:57 +00:00
2015-06-13 19:20:56 +00:00
2016-04-18 17:30:33 +00:00
2015-06-13 19:20:56 +00:00
2016-11-05 11:19:55 +00:00
2015-12-01 05:23:19 +00:00
2015-06-13 19:20:56 +00:00
2015-08-12 10:34:05 +00:00
2015-10-06 22:49:25 +00:00
2016-11-10 10:45:12 +00:00
2015-08-17 09:18:54 +00:00
2015-10-18 21:38:25 +00:00
2015-07-28 02:32:40 +00:00
2016-05-12 21:35:40 +00:00
2016-12-02 06:07:27 +00:00
2015-09-17 05:06:34 +00:00
2016-02-24 17:20:11 +00:00
2016-05-25 00:25:38 +00:00
2015-09-03 07:18:52 +00:00
2015-10-27 23:35:02 +00:00
2016-06-03 19:25:30 +00:00
2015-06-13 19:20:56 +00:00
2016-12-21 08:29:44 +00:00
2016-08-19 21:14:27 +00:00
2015-12-21 17:41:08 +00:00
2015-11-08 20:56:04 +00:00
2016-08-19 22:27:14 +00:00
2015-11-21 16:37:11 +00:00
2016-10-22 01:57:15 +00:00
2015-12-21 17:41:08 +00:00