Add conditional trunk port

When vm is created, the trunk port may not have been created first.
By adding this conditional, vm depends on the existing trunk port.

Change-Id: I069698b869633007f49110463658c858236c9f32
(cherry picked from commit 715d6c93612067fa89ad66c5e52b9d1cd14480f8)
This commit is contained in:
Fiorella Yanac 2023-09-22 14:51:35 +01:00
parent bd3e8fdd46
commit 9b36b53e08

View File

@ -136,7 +136,10 @@ resources:
image: {get_param: image} image: {get_param: image}
flavor: {get_param: flavor} flavor: {get_param: flavor}
networks: networks:
- port: {get_resource: port} if:
- "has_vlan"
- [port: {get_attr: [trunk, port_id]}]
- [port: {get_resource: port}]
scheduler_hints: {get_param: scheduler_hints} scheduler_hints: {get_param: scheduler_hints}
config_drive: {get_param: config_drive} config_drive: {get_param: config_drive}
user_data_format: RAW user_data_format: RAW