* Deploy openstack with heat enabled
$ bzr branch lp:openstack-charm-testing
$ cd openstack-charm-testing
$ juju deployer -c default.yaml -d -v -s 10 wily-liberty
$ juju action do heat/0 domain-setup
$ ./configure
$ cat << EOF > minimal_portneutron.yaml
heat_template_version: 2014-10-16
description: "Works well in Darmstadt Liberty LAB"
resources:
network:
type: network.yaml
properties:
name:
list_join:
- '_'
- [ heat, { get_param: 'OS::stack_name' } ]
port:
type: OS::Neutron::Port
properties:
network_id: { get_attr: [ network, network ] }
EOF
$ cat << EOF > minimal_portnested.yaml
heat_template_version: 2014-10-16
description: "ERROR: Failed to validate: : resources.port: : At least one of the following properties must be specified: network, network_id"
resources:
network:
type: network.yaml
properties:
name:
list_join:
- '_'
- [ heat, { get_param: 'OS::stack_name' } ]
port:
type: port.yaml # Fails with 'Either network or network_id should be specified.'
properties:
network_id: { get_attr: [ network, network ] }
$ source novarc
$ heat stack-create -f minimal_portneutron.yaml minimal_portneutron
$ heat stack-create -f minimal_portnested.yaml minimal_portnested
Expected:
The nested port is created
Actual result:
Traceback (most recent call last):
File "/usr/bin/heat", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.7/dist-packages/heatclient/shell.py", line 705, in main
HeatShell().main(args)
File "/usr/lib/python2.7/dist-packages/heatclient/shell.py", line 655, in main
args.func(client, args)
File "/usr/lib/python2.7/dist-packages/heatclient/v1/shell.py", line 140, in do_stack_create
hc.stacks.create(**fields)
File "/usr/lib/python2.7/dist-packages/heatclient/v1/stacks.py", line 136, in create
data=kwargs, headers=headers)
File "/usr/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 176, in post
return self.request(url, 'POST', **kwargs)
File "/usr/lib/python2.7/dist-packages/heatclient/common/http.py", line 317, in request
raise exc.from_response(resp)
heatclient.exc.HTTPBadRequest: ERROR: Failed to validate: : resources.port: : At least one of the following properties must be specified: network, network_id
[Regression Potential]
* This patch was tested in a production environment and also it was already merged in the Liberty stable branch https://review.openstack.org/306293 , so the regression potential is minimum.
[Impact]
when a user tries to
[Test Case]
* Deploy openstack with heat enabled charm-testing portneutron. yaml version: 2014-10-16 portnested. yaml version: 2014-10-16 portneutron. yaml minimal_portneutron portnested. yaml minimal_portnested
$ bzr branch lp:openstack-charm-testing
$ cd openstack-
$ juju deployer -c default.yaml -d -v -s 10 wily-liberty
$ juju action do heat/0 domain-setup
$ ./configure
$ cat << EOF > minimal_
heat_template_
description: "Works well in Darmstadt Liberty LAB"
resources:
network:
type: network.yaml
properties:
name:
list_join:
- '_'
- [ heat, { get_param: 'OS::stack_name' } ]
port:
type: OS::Neutron::Port
properties:
network_id: { get_attr: [ network, network ] }
EOF
$ cat << EOF > minimal_
heat_template_
description: "ERROR: Failed to validate: : resources.port: : At least one of the following properties must be specified: network, network_id"
resources:
network:
type: network.yaml
properties:
name:
list_join:
- '_'
- [ heat, { get_param: 'OS::stack_name' } ]
port:
type: port.yaml # Fails with 'Either network or network_id should be specified.'
properties:
network_id: { get_attr: [ network, network ] }
$ source novarc
$ heat stack-create -f minimal_
$ heat stack-create -f minimal_
Expected:
The nested port is created
Actual result:
Traceback (most recent call last): exit(main( )) python2. 7/dist- packages/ heatclient/ shell.py" , line 705, in main ).main( args) python2. 7/dist- packages/ heatclient/ shell.py" , line 655, in main func(client, args) python2. 7/dist- packages/ heatclient/ v1/shell. py", line 140, in do_stack_create stacks. create( **fields) python2. 7/dist- packages/ heatclient/ v1/stacks. py", line 136, in create python2. 7/dist- packages/ keystoneclient/ adapter. py", line 176, in post python2. 7/dist- packages/ heatclient/ common/ http.py" , line 317, in request response( resp) exc.HTTPBadRequ est: ERROR: Failed to validate: : resources.port: : At least one of the following properties must be specified: network, network_id
File "/usr/bin/heat", line 10, in <module>
sys.
File "/usr/lib/
HeatShell(
File "/usr/lib/
args.
File "/usr/lib/
hc.
File "/usr/lib/
data=kwargs, headers=headers)
File "/usr/lib/
return self.request(url, 'POST', **kwargs)
File "/usr/lib/
raise exc.from_
heatclient.
[Regression Potential]
* This patch was tested in a production environment and also it was already merged in the Liberty stable branch https:/ /review. openstack. org/306293 , so the regression potential is minimum.
[Other Info]
* Upstream bug 1518676