Page MenuHomePhabricator

Add utility for managing local configuration settings
ClosedPublic

Authored by chris on Aug 4 2019, 6:49 PM.

Details

Summary

This adds a .bin/config utility to manage local configuration settings. Available arguments are --list, --get, --set, and --delete

Test Plan
$ ./bin/config --set mysql.port 3306
INFO:root:[INFO]: Set local configuration values for mysql.port

$ ./bin/config --list
INFO:root:[INFO]:
  mysql.host:  127.0.0.1
  mysql.port:  3306
  mysql.user:  root
  mysql.password:  *****
  mysql.namespace:  simplex

$ ./bin/config --delete mysql.namespace
INFO:root:[INFO]: Successfully deleted keys: ['namespace']

$ ./bin/config --get mysql.host
INFO:root:[INFO]:
  mysql.host:  127.0.0.1

Diff Detail

Repository
rSIM Simplex
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

chris requested review of this revision.Aug 4 2019, 6:49 PM
chris created this revision.
Harbormaster completed remote builds in B41: Diff 57.Aug 4 2019, 6:49 PM
chris updated this revision to Diff 58.Aug 4 2019, 6:49 PM

Removed an extra debug statement

Harbormaster completed remote builds in B42: Diff 58.Aug 4 2019, 6:49 PM
brooke accepted this revision.Aug 11 2019, 1:54 PM
This revision is now accepted and ready to land.Aug 11 2019, 1:54 PM
chris updated this revision to Diff 64.Aug 11 2019, 2:07 PM
  • Properly handle nested arguments
This revision was automatically updated to reflect the committed changes.