components/ruby/puppet-modules/openstack-cinder/patches/03-grep.patch
changeset 6817 e4a26f447d0c
parent 6816 bb11bcf4ebf8
child 6818 4079d968549c
equal deleted inserted replaced
6816:bb11bcf4ebf8 6817:e4a26f447d0c
     1 Patch to change /bin/grep to /bin/ggrep as the module uses flags
       
     2 /bin/grep doesn't understand.
       
     3 
       
     4 The patch is not suitable for upstream and can be removed when
       
     5 /bin/grep enters this century.  See bug 22742880 for more information.
       
     6 
       
     7 --- openstack-cinder-6.1.0/spec/defines/cinder_type_set_spec.rb.orig	2016-04-21 07:44:39.304234219 -0700
       
     8 +++ openstack-cinder-6.1.0/spec/defines/cinder_type_set_spec.rb	2016-04-21 07:45:54.080994658 -0700
       
     9 @@ -1,3 +1,7 @@
       
    10 +#######################################################################
       
    11 +# Oracle has modified the originally distributed contents of this file.
       
    12 +#######################################################################
       
    13 +
       
    14  #Author: Andrew Woodward <[email protected]>
       
    15  
       
    16  require 'spec_helper'
       
    17 @@ -19,7 +23,7 @@
       
    18    it 'should have its execs' do
       
    19      is_expected.to contain_exec('cinder type-key sith set monchichi=hippo').with(
       
    20        :command => 'cinder type-key sith set monchichi=hippo',
       
    21 -      :unless  => "cinder extra-specs-list | grep -Eq '\\bsith\\b.*\\bmonchichi\\b.*\\bhippo\\b'",
       
    22 +      :unless  => "cinder extra-specs-list | ggrep -Eq '\\bsith\\b.*\\bmonchichi\\b.*\\bhippo\\b'",
       
    23        :environment => [
       
    24          'OS_TENANT_NAME=admin',
       
    25          'OS_USERNAME=admin',
       
    26 --- openstack-cinder-6.1.0/spec/defines/cinder_type_spec.rb.orig	2016-04-21 07:44:43.458867297 -0700
       
    27 +++ openstack-cinder-6.1.0/spec/defines/cinder_type_spec.rb	2016-04-21 07:45:36.053871835 -0700
       
    28 @@ -1,3 +1,7 @@
       
    29 +#######################################################################
       
    30 +# Oracle has modified the originally distributed contents of this file.
       
    31 +#######################################################################
       
    32 +
       
    33  #Author: Andrew Woodward <[email protected]>
       
    34  
       
    35  require 'spec_helper'
       
    36 @@ -24,7 +28,7 @@
       
    37          'OS_USERNAME=admin',
       
    38          'OS_PASSWORD=asdf',
       
    39          'OS_AUTH_URL=http://127.127.127.1:5000/v2.0/'],
       
    40 -      :unless  => "cinder type-list | grep -qP '\\bhippo\\b'",
       
    41 +      :unless  => "cinder type-list | ggrep -qP '\\bhippo\\b'",
       
    42        :require => 'Package[python-cinderclient]')
       
    43      is_expected.to contain_exec('cinder type-key hippo set volume_backend_name=name1')
       
    44      is_expected.to contain_exec('cinder type-key hippo set volume_backend_name=name2')
       
    45 --- openstack-cinder-6.1.0/manifests/type_set.pp.orig	2016-04-21 07:44:47.661447131 -0700
       
    46 +++ openstack-cinder-6.1.0/manifests/type_set.pp	2016-04-21 07:45:41.645429540 -0700
       
    47 @@ -1,3 +1,7 @@
       
    48 +#######################################################################
       
    49 +# Oracle has modified the originally distributed contents of this file.
       
    50 +#######################################################################
       
    51 +
       
    52  # ==Define: cinder::type_set
       
    53  #
       
    54  # Assigns keys after the volume type is set.
       
    55 @@ -58,7 +62,7 @@
       
    56    exec {"cinder type-key ${type} set ${key}=${name}":
       
    57      path        => ['/usr/bin', '/bin'],
       
    58      command     => "cinder type-key ${type} set ${key}=${name}",
       
    59 -    unless      => "cinder extra-specs-list | grep -Eq '\\b${type}\\b.*\\b${key}\\b.*\\b${name}\\b'",
       
    60 +    unless      => "cinder extra-specs-list | ggrep -Eq '\\b${type}\\b.*\\b${key}\\b.*\\b${name}\\b'",
       
    61      environment => concat($cinder_env, $region_env),
       
    62      require     => Package['python-cinderclient']
       
    63    }
       
    64 --- openstack-cinder-6.1.0/manifests/type.pp.orig	2016-04-21 07:44:52.352619515 -0700
       
    65 +++ openstack-cinder-6.1.0/manifests/type.pp	2016-04-21 07:45:48.039994336 -0700
       
    66 @@ -1,3 +1,7 @@
       
    67 +#######################################################################
       
    68 +# Oracle has modified the originally distributed contents of this file.
       
    69 +#######################################################################
       
    70 +
       
    71  # == Define: cinder::type
       
    72  #
       
    73  # Creates cinder type and assigns backends.
       
    74 @@ -66,7 +70,7 @@
       
    75  
       
    76    exec {"cinder type-create ${volume_name}":
       
    77      command     => "cinder type-create ${volume_name}",
       
    78 -    unless      => "cinder type-list | grep -qP '\\b${volume_name}\\b'",
       
    79 +    unless      => "cinder type-list | ggrep -qP '\\b${volume_name}\\b'",
       
    80      environment => concat($cinder_env, $region_env),
       
    81      require     => Package['python-cinderclient'],
       
    82      path        => ['/usr/bin', '/bin'],