- # skip if resources are not defined
- if "resources" not in yml:
- pytest.skip("No resources specified in the heat template")
+RE_EXTERNAL_PARAM_FIPS = re.compile( # match pattern
+ r"(?P<vm_type>.+)_(?P<network_role>.+?)(_v6)?_ips$"
+)
+
+RE_INTERNAL_PARAM_FIP = re.compile( # match pattern
+ r"(?P<vm_type>.+)_int_(?P<network_role>.+?)(_v6)?_ip_(?P<ip_index>.+)$"
+)
+
+RE_INTERNAL_PARAM_FIPS = re.compile( # match pattern
+ r"(?P<vm_type>.+)_int_(?P<network_role>.+?)(_v6)?_ips$"
+)
+
+fip_regx_dict = {
+ "external": {
+ "string": {
+ "readable": "{vm-type}_{network-role}_ip_{ip-index} or {vm-type}_{network-role}_v6_ip_{ip-index}",
+ "machine": RE_EXTERNAL_PARAM_FIP,
+ },
+ "comma_delimited_list": {
+ "readable": "{vm-type}_{network-role}_ips or {vm-type}_{network-role}_v6_ips",
+ "machine": RE_EXTERNAL_PARAM_FIPS,
+ },
+ },
+ "internal": {
+ "string": {
+ "readable": "{vm-type}_int_{network-role}_ip_{ip-index} or {vm-type}_int_{network-role}_v6_ip_{ip-index}",
+ "machine": RE_INTERNAL_PARAM_FIP,
+ },
+ "comma_delimited_list": {
+ "readable": "{vm-type}_int_{network-role}_ips or {vm-type}_int_{network-role}_v6_ips",
+ "machine": RE_INTERNAL_PARAM_FIPS,
+ },
+ },
+ "parameter_to_resource_comparisons": ["vm_type", "network_role"],
+}
+