X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-starlingx%2Fmeta-stx-cloud%2Frecipes-support%2Fpuppet%2Ffiles%2Fnetwork%2Fpuppet-network-support-ipv6.patch;fp=meta-starlingx%2Fmeta-stx-cloud%2Frecipes-support%2Fpuppet%2Ffiles%2Fnetwork%2Fpuppet-network-support-ipv6.patch;h=b6d2f3c9140fde658fa326ea7f108e389bcc3ba6;hb=e0634c6eaf2fe2641a0fb90e84a5defb880b1335;hp=0000000000000000000000000000000000000000;hpb=210d0f78485e760dffcdd3f630f59cec797f3f11;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/network/puppet-network-support-ipv6.patch b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/network/puppet-network-support-ipv6.patch new file mode 100644 index 0000000..b6d2f3c --- /dev/null +++ b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/network/puppet-network-support-ipv6.patch @@ -0,0 +1,46 @@ +Index: packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb +--- a/packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb ++++ b/packstack/puppet/modules/network/lib/puppet/provider/network_config/redhat.rb +@@ -224,6 +224,11 @@ + + pairs = self.unmunge props + ++ ip_version = provider.send(:family) ++ if (ip_version.to_s == "inet6") ++ pairs = self.ipv6_fixup pairs ++ end ++ + content = pairs.inject('') do |str, (key, val)| + str << %{#{key}=#{val}\n} + end +@@ -259,6 +264,30 @@ + pairs + end + ++ def self.ipv6_fixup(pairs) ++ pairs['IPV6INIT'] = 'yes' ++ ++ if (pairs.include? 'NETMASK' and pairs.include? 'IPADDR') ++ pairs['IPV6ADDR'] = pairs['IPADDR'].to_s + "/" + pairs['NETMASK'].to_s ++ pairs.delete('NETMASK') ++ pairs.delete('IPADDR') ++ elsif (pairs.include? 'IPADDR') ++ pairs['IPV6ADDR'] = pairs['IPADDR'].to_s ++ pairs.delete('IPADDR') ++ end ++ ++ if (pairs.include? 'GATEWAY') ++ pairs['IPV6_DEFAULTGW'] = pairs['GATEWAY'] ++ pairs.delete('GATEWAY') ++ end ++ ++ if (pairs['BOOTPROTO'].to_s == 'dhcp') ++ pairs['DHCPV6C'] = 'yes' ++ pairs['DHCLIENTARGS'] = '-1' ++ end ++ pairs ++ end ++ + def self.header + str = <<-HEADER + # HEADER: This file is is being managed by puppet. Changes to