Fixed ip_address handling for tosca_network_port.py

Closes-Bug: 1566081
Change-Id: I37bdc3e6147597d6c7d81c59699edc9cd5caacdb
This commit is contained in:
Bob Haddleton 2016-04-04 19:55:25 -05:00
parent 393a377265
commit 4d6db7f639
3 changed files with 5 additions and 2 deletions

View File

@ -55,9 +55,8 @@ class ToscaNetworkPort(HotResource):
port_props = {}
for key, value in tosca_props.items():
if key == 'ip_address':
fixed_ip = []
fixed_ip = {}
fixed_ip['ip_address'] = value
fixed_ip['subnet'] = ''
port_props['fixed_ips'] = [fixed_ip]
elif key == 'order':
self.order = value

View File

@ -16,6 +16,8 @@ resources:
CP1:
type: OS::Neutron::Port
properties:
fixed_ips:
- ip_address: '192.168.0.55'
network: { get_resource: VL1 }
VL1:
type: OS::Neutron::Net

View File

@ -23,6 +23,8 @@ topology_template:
version: 6.5
CP1:
type: tosca.nodes.nfv.CP
properties:
ip_address: 192.168.0.55
requirements:
- virtualLink:
node: VL1