diff options
author | Gabriele Cerami <gcerami@redhat.com> | 2016-09-14 11:36:20 +0200 |
---|---|---|
committer | Gabriele Cerami <gcerami@redhat.com> | 2016-09-16 22:52:56 +0200 |
commit | be79cb1eca81b39760e00948d216858c013e8819 (patch) | |
tree | 88cc2b38f0767195291fc5a5f832633a4466a668 /manifests/profile/base/swift/add_devices.pp | |
parent | 28855f3f279eb5d415e0cd5b1aaecad725ea10fe (diff) |
Swift add_devices.pp IPv6 handling
Add brackets to IPv6 addresses before forming $object from $base
Change-Id: I4568d538561a0102b69f331a122d4989333a3bfa
Closes-Bug: #1623096
Diffstat (limited to 'manifests/profile/base/swift/add_devices.pp')
-rw-r--r-- | manifests/profile/base/swift/add_devices.pp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/manifests/profile/base/swift/add_devices.pp b/manifests/profile/base/swift/add_devices.pp index bd4c91c..909ddd6 100644 --- a/manifests/profile/base/swift/add_devices.pp +++ b/manifests/profile/base/swift/add_devices.pp @@ -39,7 +39,10 @@ define tripleo::profile::base::swift::add_devices( $zone = (($server_num%$swift_zones) + 1) # add the rings - $base = regsubst($name,'^r1.*-(.*)$','\1') + $base_notnormal = regsubst($name,'^r1.*-(.*)$','\1') + $ip_notnormal = regsubst($base_notnormal, ':%PORT%.*', '') + $ip = normalize_ip_for_uri($ip_notnormal) + $base = regsubst($base_notnormal, $ip_notnormal, $ip) $object = regsubst($base, '%PORT%', '6000') ring_object_device { $object: zone => '1', |