Comment 0 for bug 1451819

Revision history for this message
Oleksii Chuprykov (ochuprykov) wrote : resource validation fails

template:

heat_template_version: 2013-05-23

description: HOT template to create Neutron network.

parameters:
  ext_network:
    type: string
    description: External network for getting floating IPs

resources:
  server_port:
    type: OS::Neutron::Port
    properties:
      name: the_port
      network: {get_attr: [internal_network, name]}
      fixed_ips:
        - subnet: {get_attr: [internal_subnet, name] }

  internal_network:
    type: OS::Neutron::Net
    properties:
        name: the_internal_network

  internal_subnet:
    type: OS::Neutron::Subnet
    properties:
      name: the_internal_subnet
      network: {get_attr: [internal_network, name]}
      ip_version: 4
      cidr: 10.0.3.0/24
      allocation_pools:
        - {start: 10.0.3.20, end: 10.0.3.150}

  router:
    type: OS::Neutron::Router
    properties:
      name: the_router
      external_gateway_info:
        network: {get_param: ext_network}

  router_interface:
    type: OS::Neutron::RouterInterface
    properties:
      router: {get_attr: [router, name]}
      subnet: {get_resource: internal_subnet}

  floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network: {get_param: ext_network}

  floating_ip_assoc:
    type: OS::Neutron::FloatingIPAssociation
    properties:
      floatingip_id: {get_resource: floating_ip}
      port_id: {get_resource: server_port}

Traceback (most recent call last):
  File "/opt/stack/heat/heat_integrationtests/scenario/test_neutron_net.py", line 42, in test_resource_ref_by_names
  File "/opt/stack/heat/heat_integrationtests/scenario/scenario_base.py", line 55, in launch_stack
    expected_status=expected_status
  File "/opt/stack/heat/heat_integrationtests/common/test.py", line 405, in stack_create
    environment=env
  File "/opt/stack/python-heatclient/heatclient/v1/stacks.py", line 135, in create
    data=kwargs, headers=headers)
  File "/opt/stack/python-heatclient/heatclient/common/http.py", line 265, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/opt/stack/python-heatclient/heatclient/common/http.py", line 220, in _http_request
    raise exc.from_response(resp)
HTTPBadRequest: ERROR: At least one of the following properties must be specified: router, router_id