Currently we only allow to use strings
as the data type for ports.
Due to this we need to cast the data type
in the puppet modules because from THT
this is configured as a Number.
This submission allow to use either string
or numbers for the port parameter in the
os_transport_url function.
Change-Id: I9e56f8e2de542b20fe9e6995506cff5bb435e220
Closes-Bug: #1664561
The ssl paramter of the os_transport_url should be 0/1 but we do not
ensure that this is the value being used in the creation of the
transport_url. This change leverages the stdlib str2bool and bool2num to
ensure that when provided the ssl paramter ends up being 0/1 which is
the correct format for the transport url. Additionally this also allows
for string booleans to be passed into the ssl parameter and it should
still work correctly.
Change-Id: I278559ba98ba48974ae590dc1e0bb99b6ab961d7
If an array with a single host is passed into the hosts param, the
function was erroring because the host was getting converted to a string
when it was checking for bracketing for ipv6. This change checks the
type and fixes the case where a single host is being passed so it
continues to function.
Change-Id: I91b9959a6f71b4e6885e55a568116cc28cf16ddd
Closes-Bug: #1650042
This change adds a os_transport_url function that can be used to
generate correct URIs for the transport_url setting used by
oslo.messaging.
Change-Id: If83c0f0e61a08061334536399a42767a305966b7