Closed charlescng closed 8 years ago
Given the following configuration:
[connection:*] username: foo password: bar
Given the following code:
client = Rbeapi::Client.connect_to('host1') client = Rbeapi::Client.connect_to('host2')
The config['host'] of value * is clobbered to host1: https://github.com/arista-eosplus/rbeapi/blob/develop/lib/rbeapi/client.rb#L104
config['host']
*
host1
The second call to connect_to('host2') has a config['host'] value of host1
connect_to('host2')
It should probably .dup the configuration before modifying config['host'].
.dup
Thank you for reporting this bug, we will get it fixed.
Given the following configuration:
Given the following code:
The
config['host']
of value*
is clobbered tohost1
: https://github.com/arista-eosplus/rbeapi/blob/develop/lib/rbeapi/client.rb#L104The second call to
connect_to('host2')
has aconfig['host']
value ofhost1
It should probably
.dup
the configuration before modifyingconfig['host']
.