[rabbitmq-discuss] rabbitmqadmin and default node behaviour
Simon Lundström
simlu at su.se
Tue Oct 30 12:12:29 GMT 2012
On Tue, 2012-10-30 at 11:10:23 +0000, Simon MacMullen wrote:
> On 30/10/12 11:01, Simon Lundström wrote:
> >>>Does this mean rabbitmqadmin will fail if the default file exists,
> >>>and the user does not specify a node, and the file does not contain
> >>>a default node?
> >Exactly.
> >
> >This is a small price to pay, IMO, compared to always having to specify
> >either the node or a config file.
>
> Surely we can decide what to do in this scenario based on whether
> the config file contains a default node. If it does, use it. If it
> doesn't, use the defaults (guest / guest / localhost).
And this is why you work on RabbitMQ and not me = )
Smart! So basically:
Parse the config/defaults in this order:
# defaults from default_options hash^Wdictionary
# config file
## Find out which config file to use, one of:
### specified via --config
#### Use it and exit with an error if it doesn't exist
### default config file (~/.rabbitmqadmin.conf)
#### If file doesn't exist, just ignore it.
## If node doesn't exist in config and is:
### specified via commandline
#### Display error and exit
### using the default node
#### ignore the config file entirely
# Options on the command line
Thanks,
- Simon
More information about the rabbitmq-discuss
mailing list