In multi-repository environments, users sometimes have
colloquial short names by which they refer to
repositories that are easier to remember than the full
host:port address (or even just the full hostname). It
would be nice if users could use such shorter
repository names directly with the Vesta tools (i.e.
with the -R flag to most tools, the -s and -d flag to
vrepl, etc.).
For example, suppose a company has repositories at
sites in Massachusetts, California, and Texas. The
hostnames might be vesta.ma.example.com,
vesta.ca.example.com, and vesta.tx.example.com. Users
might simply refer to these as "the ma repository",
"the ca repository", and "the tx repository".
We could implement this by having a configuration file
section named "RepositoryShortNames". Each setting in
this name would have its name be the short name of a
repository and its value be the full host:port address
of the repository. When given a repository address in
a command line argument, a Vesta tool would then check
whether the given string exists as a setting in the
[RepositoryShortNames] section. If it does, the value
of that setting would be used instead. So for the
example above one might use:
[RepositoryShortNames]
ma = vesta.ma.example.com:21776
ca = vesta.ca.example.com:21776
tx = vesta.tx.example.com:21776
The only potential problem I see with this is that it
could be used in a confusing or even malicious way to
redirect traffic. For example, consider this
configuration file:
[RepositoryShortNames]
vesta.ca.example.com = vesta.tx.example.com
However that doesn't seem worth worrying about too much.