components/openstack/heat/patches/05-neutron-names-required.patch
changeset 2025 8dbf23e740f2
child 3998 5bd484384122
equal deleted inserted replaced
2024:d2eeeca993a7 2025:8dbf23e740f2
       
     1 In-house patch to change the name of Neutron objects to use underscores
       
     2 instead of hyphens on Solaris.  This patch has not yet been submitted
       
     3 upstream.
       
     4 
       
     5 --- heat-2013.2.3/heat/engine/resources/neutron/neutron.py.orig     2014-07-22 18:07:26.583195123 -0600
       
     6 +++ heat-2013.2.3/heat/engine/resources/neutron/neutron.py  2014-07-22 18:08:49.115350165 -0600
       
     7 @@ -13,6 +13,8 @@
       
     8  #    License for the specific language governing permissions and limitations
       
     9  #    under the License.
       
    10 
       
    11 +import platform
       
    12 +
       
    13  from neutronclient.common.exceptions import NeutronClientException
       
    14 
       
    15  from heat.common import exception
       
    16 @@ -147,3 +149,10 @@
       
    17                      else:
       
    18                          raise
       
    19          return seclist
       
    20 +
       
    21 +    def physical_resource_name(self):
       
    22 +        name = super(NeutronResource, self).physical_resource_name()
       
    23 +        if platform.uname()[0] == "SunOS":
       
    24 +            # EVS can not use hyphen characters
       
    25 +            name = name.replace("-", "_")
       
    26 +        return name