Ask Your Question
0

heat template complain "physical_network" property of OS::Neutron::ProviderNet [closed]

asked 2015-04-10 09:20:43 -0500

PainInNetwork gravatar image

Hi,

I'm trying to deploy a VM using two physical networks. manually create a VM to use these physical networks works fine.

neutron net-create --provider:physical_network ANetwork --provider:network_type vlan a_net
neutron net-create --provider:physical_network BNetwork --provider:network_type vlan b_net
neutron port-create a_net --binding:vnic-type direct
neutron port-create b_net --binding:vnic-type direct
nova boot --flavor m1.medium --image test.img --nic port-id=a_net_port_id --nic port-id=b_net_port_id my_vm

Then I turn to use heat to do the same, but my template is rejected and an ERROR popped like below:

ERROR: Template not in valid format: Error parsing template: while scanning for the next token found character that cannot start any token in "<unicode string>", line 15, column 1

My template is like this:

heat_template_version: 2013-05-23

description: >
  HOT template to create a simple setup 

parameters:
  image:
    type: string
    description: Name of image to use

resources:
  a_net:
    type: OS::Neutron::ProviderNet
    properties:
      physical_network: ANetwork
  b_net:
    type: OS::Neutron::ProviderNet
    properties:
      physical_network: BNetwork
  ..........................

According to openstack document, OS::Neutron::ProviderNet has only one "required" property, and it is "physical_network". why my heat installation doesn't like this property? did I missed anything in the template?

The heat version in my openstack environment is 0.4.0

stack@vRanGEP11:~/heat$ heat --version
0.4.0
edit retag flag offensive reopen merge delete

Closed for the following reason too localized by zaneb
close date 2015-07-29 12:45:58.687741

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-04-10 10:04:17 -0500

PainInNetwork gravatar image

Hmm... Modified the resource to following then it works. seems I need not only the "physical_network", but also other optional properties...

heat_template_version: 2015-04-30

description: Template to test provider_net Neutron resources

    resources:
      a_net:
        type: OS::Neutron::ProviderNet
        properties:
          name: a_net
          network_type: vlan
          physical_network: RANNetwork
          segmentation_id: 101
          shared: true
      b_net:
        type: OS::Neutron::ProviderNet
        properties:
          name: b_net
          network_type: vlan
          physical_network: RANNetwork
          segmentation_id: 101
          shared: true
edit flag offensive delete link more

Comments

It's nothing to do with properties - your template isn't even getting as far as Heat. The error message means that it couldn't even be interpreted as valid YAML (in the client). I don't know what the error is caused by, but it seems to be an invalid character at the beginning of line 15.

zaneb gravatar imagezaneb ( 2015-04-10 16:37:08 -0500 )edit

yes, you're right zaneb. it's due to the editor I'm using. when press enter in the editor, it will automatically input a "tab" in the new line, which is not an allowed character in yaml

PainInNetwork gravatar imagePainInNetwork ( 2015-05-06 09:33:28 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-04-10 09:20:43 -0500

Seen: 2,006 times

Last updated: Apr 10 '15