brbzull0 opened a new pull request, #11650:
URL: https://github.com/apache/trafficserver/pull/11650
This PR changes the `traffic_ctl config` output when `--records` is
requested.
`--records` was used to display the output of a record in the
`records.config` configuration style:
```bash
$ traffic_ctl config get proxy.config.diags.show_location
proxy.config.diags.logfile_perm proxy.config.diags.logfile.filename --records
CONFIG proxy.config.diags.show_location INT 2
CONFIG proxy.config.diags.logfile_perm STRING rw-r--r--
CONFIG proxy.config.diags.logfile.filename STRING diags.log
```
As we do not support `records.config` style anymore, it now make sense to
have just YAML, so the same command will now display:
```bash
$ traffic_ctl config get proxy.config.diags.show_location
proxy.config.diags.logfile_perm proxy.config.diags.logfile.filename --records
records:
diags:
logfile:
filename: diags.log
logfile_perm: rw-r--r--
show_location: 2
```
For things like `traffic_ctl config diff --records` it will add the default
value as **standard** YAML comment.
*Note: This is the main reason why this PR uses `YAML::Emitter` and not just
the `YAML::Node` to build up the yaml doc, it would have been very easy just to
use the `YAML::Node` but it cannot keep track of the comments which for things
like the `diff` option is key.*
``` bash
$ traffic_ctl config diff --records
records:
diags:
debug:
tags: quic|udp # default: http|dns
show_location: 2 # default: 1
http:
server_ports: 8080 4443:ssl 4443:quic # default: 8080 8080:ipv6
quic:
initial_max_streams_bidi_in: 5 # default: 100
initial_max_streams_bidi_out: 100000 # default: 100
udp:
enable_gso: 0 # default: 1
threads: 1 # default: 0
```
if no `--records` option is passed, the behavior remain unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]