平面网络的Openstack热模板

平面网络的Openstack热模板,openstack,openstack-neutron,openstack-heat,Openstack,Openstack Neutron,Openstack Heat,我已经配置了2节点Openstack(Icehouse)设置,并且还配置了heat。使用热模板创建实例时,该实例已成功启动。但是,当我试图使用yml文件创建平面网络时,它会显示以下错误- “无法创建网络。没有可供分配的租户网络” heat_template_version: 2013-05-23 description: Simple template to deploy a single compute instance resources: provider_01: type

我已经配置了2节点Openstack(Icehouse)设置,并且还配置了heat。使用热模板创建实例时,该实例已成功启动。但是,当我试图使用yml文件创建平面网络时,它会显示以下错误-

“无法创建网络。没有可供分配的租户网络”

heat_template_version: 2013-05-23
description: Simple template to deploy a single compute instance

resources:
  provider_01:
     type: OS::Neutron::ProviderNet
     properties:
       physical_network: physnet2
       shared: true
       network_type: flat
  network_01:
     type: OS::Neutron::Net
     properties:
       admin_state_up: true
       name: External2
       shared: true
       #admin tenant id
       tenant_id: 6ec23610836048ddb8f9294dbf89a41e
  subnet_01:
     type: OS::Neutron::Subnet
     properties:
       name: Subnet2
       network_id: { get_resource: network_01 }
       cidr: 192.168.56.0/24
       gateway_ip: 192.168.56.1
       allocation_pools: [{"start": 192.168.56.50, "end": 192.168.56.70}]
       enable_dhcp: true
  port_01:
     type: OS::Neutron::Port
     properties:
       admin_state_up: true
       network_id: { get_resource: network_01 }
       #security_groups: "default"
heat_template_version: 2014-10-16
description: Template to create a tenant network along with router config

parameters:
    ImageId:
       type: string
       label: cirros-0.3.2-x86_64
       description: cirros-0.3.2-x86_64

resources:
    demo-net:
       type: OS::Neutron::Net
       properties:
          name: demo-net

    demo-subnet:
       type: OS::Neutron::Subnet
       properties:
          name: demo-subnet
          network_id: { get_resource: demo-net }
          cidr: 10.10.0.0/24
          gateway_ip: 10.10.0.1

    my_instance:
       type: OS::Nova::Server
       properties:
          name: "demo_test_nw_01"
          image: { get_param: ImageId }
          flavor: "m1.tiny"
          networks:
          - network : { get_resource: demo-net }