Re: [Openstack] Fn::FindInMap gives error in Heat HOT Template

2015-02-11 Thread Mike Spreitzer
That doc also says that Ref is not supported in 
template heat_template_version: 2014-10-16.

Qiming Teng teng...@linux.vnet.ibm.com wrote on 02/12/2015 05:35:45 AM:

 From: Qiming Teng teng...@linux.vnet.ibm.com
 To: openstack@lists.openstack.org
 Date: 02/11/2015 09:47 PM
 Subject: Re: [Openstack] Fn::FindInMap gives error in Heat HOT Template
 
 I think Thomas was referring to this doc ...
 
 http://docs.openstack.org/developer/heat/template_guide/
 hot_spec.html#heat-template-verion
 
 
 On Wed, Feb 11, 2015 at 12:18:01AM -0800, Thomas Spatzier wrote:
  Hi Khayam,
  
  the Fn::FindInMap is not supported in HOT as far as I can see in the 
code.
  
  The list of functions supported in the HOT version you are using is 
defined
  in this part of the code:
  https://github.com/openstack/heat/blob/master/heat/engine/hot/
 template.py#L274
  
  The list for version 2013-05-23 can be found in the same file.
  I think this should also be covered in docs that get generated from 
the
  sources, but I do not have a link at hand right now.
  
  Regards,
  Thomas
  
   From: Khayam Gondal khayam.gon...@gmail.com
   To: openstack@lists.openstack.org openstack@lists.openstack.org
   Date: 11/02/2015 07:03
   Subject: [Openstack] Fn::FindInMap gives error in Heat HOT Template
  
   In my HOT template heat_template_version: 2014-10-16 I have a
   autoscaling group as
   auto_scale_server:
   type: OS::Heat::AutoScalingGroup
   properties:
 min_size: 0
 max_size: { Fn::FindInMap : [ mirror_map, { Ref :
  Mirror } ]}
 resource:
 type: OS::Nova::Server
 properties:
   name: Scaled_Blade
   image: UbuntuDemo
   flavor: g1.disk
   key_name: htor
   networks: [{network: internal}]
   where value of max_size depends upon Property Mirror
   In Parameters section
   parameters:
  
 Mirror:
   type: string
   label: Mirroring Port
   description: Select the Port on which you want to Mirror the
  traffic
   constraints:
- allowed_values:
  - port1
  - fm00
  
Mappings:
   mirror_map:
 fm00: 0
 port1: 1
   When I start this template, I got error
   ERROR: Invalid key 'mirror_map' for parameter (Mappings)
  
   P.S I had also changed  HOT template version to '2013-05-23' but no 
luck
   ___
   Mailing list:
  http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
   Post to : openstack@lists.openstack.org
   Unsubscribe :
  http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
  
  
  ___
  Mailing list: 
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
  Post to : openstack@lists.openstack.org
  Unsubscribe : 
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
  
 
 
 ___
 Mailing list: 
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
 Post to : openstack@lists.openstack.org
 Unsubscribe : 
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
 
___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


Re: [Openstack] Fn::FindInMap gives error in Heat HOT Template

2015-02-11 Thread Thomas Spatzier
Hi Khayam,

the Fn::FindInMap is not supported in HOT as far as I can see in the code.

The list of functions supported in the HOT version you are using is defined
in this part of the code:
https://github.com/openstack/heat/blob/master/heat/engine/hot/template.py#L274

The list for version 2013-05-23 can be found in the same file.
I think this should also be covered in docs that get generated from the
sources, but I do not have a link at hand right now.

Regards,
Thomas

 From: Khayam Gondal khayam.gon...@gmail.com
 To: openstack@lists.openstack.org openstack@lists.openstack.org
 Date: 11/02/2015 07:03
 Subject: [Openstack] Fn::FindInMap gives error in Heat HOT Template

 In my HOT template heat_template_version: 2014-10-16 I have a
 autoscaling group as
 auto_scale_server:
 type: OS::Heat::AutoScalingGroup
 properties:
   min_size: 0
   max_size: { Fn::FindInMap : [ mirror_map, { Ref :
Mirror } ]}
   resource:
   type: OS::Nova::Server
   properties:
 name: Scaled_Blade
 image: UbuntuDemo
 flavor: g1.disk
 key_name: htor
 networks: [{network: internal}]
 where value of max_size depends upon Property Mirror
 In Parameters section
 parameters:

   Mirror:
 type: string
 label: Mirroring Port
 description: Select the Port on which you want to Mirror the
traffic
 constraints:
  - allowed_values:
- port1
- fm00

  Mappings:
 mirror_map:
   fm00: 0
   port1: 1
 When I start this template, I got error
 ERROR: Invalid key 'mirror_map' for parameter (Mappings)

 P.S I had also changed  HOT template version to '2013-05-23' but no luck
 ___
 Mailing list:
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
 Post to : openstack@lists.openstack.org
 Unsubscribe :
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


Re: [Openstack] Fn::FindInMap gives error in Heat HOT Template

2015-02-11 Thread Qiming Teng
On Wed, Feb 11, 2015 at 09:55:28PM -0500, Mike Spreitzer wrote:
 That doc also says that Ref is not supported in 
 template heat_template_version: 2014-10-16.

Correct. It is marked as a removed function. Users are encouraged (now
forced) to use the HOT equivalents.

Regards,
  Qiming

 Qiming Teng teng...@linux.vnet.ibm.com wrote on 02/12/2015 05:35:45 AM:
 
  From: Qiming Teng teng...@linux.vnet.ibm.com
  To: openstack@lists.openstack.org
  Date: 02/11/2015 09:47 PM
  Subject: Re: [Openstack] Fn::FindInMap gives error in Heat HOT Template
  
  I think Thomas was referring to this doc ...
  
  http://docs.openstack.org/developer/heat/template_guide/
  hot_spec.html#heat-template-verion
  
  
  On Wed, Feb 11, 2015 at 12:18:01AM -0800, Thomas Spatzier wrote:
   Hi Khayam,
   
   the Fn::FindInMap is not supported in HOT as far as I can see in the 
 code.
   
   The list of functions supported in the HOT version you are using is 
 defined
   in this part of the code:
   https://github.com/openstack/heat/blob/master/heat/engine/hot/
  template.py#L274
   
   The list for version 2013-05-23 can be found in the same file.
   I think this should also be covered in docs that get generated from 
 the
   sources, but I do not have a link at hand right now.
   
   Regards,
   Thomas
   
From: Khayam Gondal khayam.gon...@gmail.com
To: openstack@lists.openstack.org openstack@lists.openstack.org
Date: 11/02/2015 07:03
Subject: [Openstack] Fn::FindInMap gives error in Heat HOT Template
   
In my HOT template heat_template_version: 2014-10-16 I have a
autoscaling group as
auto_scale_server:
type: OS::Heat::AutoScalingGroup
properties:
  min_size: 0
  max_size: { Fn::FindInMap : [ mirror_map, { Ref :
   Mirror } ]}
  resource:
  type: OS::Nova::Server
  properties:
name: Scaled_Blade
image: UbuntuDemo
flavor: g1.disk
key_name: htor
networks: [{network: internal}]
where value of max_size depends upon Property Mirror
In Parameters section
parameters:
   
  Mirror:
type: string
label: Mirroring Port
description: Select the Port on which you want to Mirror the
   traffic
constraints:
 - allowed_values:
   - port1
   - fm00
   
 Mappings:
mirror_map:
  fm00: 0
  port1: 1
When I start this template, I got error
ERROR: Invalid key 'mirror_map' for parameter (Mappings)
   
P.S I had also changed  HOT template version to '2013-05-23' but no 
 luck
___
Mailing list:
   http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe :
   http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
   
   
   ___
   Mailing list: 
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
   Post to : openstack@lists.openstack.org
   Unsubscribe : 
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
   
  
  
  ___
  Mailing list: 
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
  Post to : openstack@lists.openstack.org
  Unsubscribe : 
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
  


___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack