Heat templates for deploying OpenStack
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

85 lignes
2.5KB

  1. heat_template_version: rocky
  2. description: >
  3. Creates a port for a VIP on the undercloud ctlplane network.
  4. The IP address will be chosen automatically if FixedIPs is empty.
  5. parameters:
  6. ServiceName: # Here for compatibility with from_service.yaml
  7. description: Name of the service to lookup
  8. default: ''
  9. type: string
  10. NetworkName: # Here for compatibility with isolated networks
  11. description: Name of the network where the VIP will be created
  12. default: ctlplane
  13. type: string
  14. PortName:
  15. description: Name of the port
  16. default: ''
  17. type: string
  18. ControlPlaneIP: # Here for compatibility with noop.yaml
  19. description: IP address on the control plane
  20. default: ''
  21. type: string
  22. ControlPlaneSubnetCidr: # Here for compatibility with ctlplane_vip.yaml
  23. default: ''
  24. description: >
  25. The subnet CIDR of the control plane network. (The parameter is
  26. automatically resolved from the ctlplane subnet's cidr attribute.)
  27. type: string
  28. ControlPlaneNetwork:
  29. description: The name of the undercloud Neutron control plane
  30. default: ctlplane
  31. type: string
  32. ControlPlaneSubnet:
  33. description: The name of the undercloud Neutron control plane subnet
  34. default: ctlplane-subnet
  35. type: string
  36. FixedIPs:
  37. description: >
  38. Control the IP allocation for the VIP port. E.g.
  39. [{'ip_address':'1.2.3.4'}]
  40. default: []
  41. type: json
  42. conditions:
  43. fixed_ip_not_set:
  44. equals:
  45. - yaql:
  46. expression: $.data.where($.get('ip_address'))
  47. data: {get_param: FixedIPs}
  48. - []
  49. resources:
  50. VipPort:
  51. type: OS::TripleO::Network::Ports::ControlPlaneVipPort
  52. properties:
  53. network: {get_param: ControlPlaneNetwork}
  54. name: {get_param: PortName}
  55. fixed_ips:
  56. if:
  57. - fixed_ip_not_set
  58. - [{subnet: {get_param: ControlPlaneSubnet}}]
  59. - get_param: FixedIPs
  60. replacement_policy: AUTO
  61. outputs:
  62. ip_address:
  63. description: Virtual IP network IP
  64. value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
  65. ip_address_uri:
  66. description: Virtual IP network IP (for compatibility with vip_v6.yaml)
  67. value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
  68. ip_subnet:
  69. description: IP/Subnet CIDR for the ctlplane network.
  70. value:
  71. list_join:
  72. - ''
  73. - - {get_attr: [VipPort, fixed_ips, 0, ip_address]}
  74. - '/'
  75. - {str_split: ['/', {get_attr: [VipPort, subnets, 0, cidr]}, 1]}
  76. host_routes:
  77. description: Host routes of the ports subnet
  78. value:
  79. get_attr: [VipPort, subnets, 0, host_routes]