5 Commits

Author SHA1 Message Date
Carlos Camacho
b3d0590022 Allow integer port in os_transport_url
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
2017-02-22 10:40:31 +01:00
Andrew Smith
f9672b062f Enable alternative transport in os_transport_url
Change-Id: Ie6965dc5f7896587b5625e38cc758b5564e59bd4
Closes-Bug: 1651215
2016-12-20 10:00:55 -05:00
Alex Schultz
cbeb29e69b Improve os_transport_url ssl support
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
2016-12-19 11:43:07 -07:00
Alex Schultz
8d37c059d2 Fix os_transport_url with single hosts array
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
2016-12-14 15:21:03 -07:00
Alex Schultz
7ef2f7b0d7 os_transport_url parser function
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
2016-11-10 16:17:30 -07:00