Merge "Remove unnecessary check for pytest.skip"
[vvp/validation-scripts.git] / ice_validator / resolution_steps.json
1 [
2   {
3     "module": "test_get_file_only_reference_local_files",
4     "function": "test_get_file_only_reference_local_files",
5     "resolution_steps": "Make sure that any use of the get_file function only references local files.  Local files must be referenced by a local path, not via http, https, file, ftp, ftps funcitons. To do so: \n1) locate the use of get_file in your templates \n. - Ensure the file only contains local path plus the file name.",
6     "header": "Get file only references local files"
7   },
8   {
9     "module": "test_heat_pairs_provided",
10     "function": "test_heat_pairs_provided",
11     "resolution_steps": "Make sure that every yaml file is submitted with an associated environment (.env) file, and every environment file has an associated yaml file. Also make sure every volume template is paired to an incremental or base module. Do note that nested files do not require an associated environment file, but must be referenced in the templates.",
12     "header": "Every yaml has an env"
13   },
14   {
15     "module": "test_heat_template_parameters_contain_required_fields",
16     "function": "test_heat_template_parameters_contain_required_fields",
17     "resolution_steps": "Make sure that any defined parameter in a heat template contains the required fields type and description. Please go through the parameters section in the associated files to make sure all parameters have those two properties defined. To do so: \n1) Locate the parameters section of each yaml template file \n -  Ensure that for every parameter defined in this section, they have both a type, and description defined. \n -  Ensure that those definitions are properly aligned",
18     "header": "All parameters do not contain the required fields"
19   },
20   {
21     "module": "test_heat_template_structure",
22     "function": "test_heat_template_structure",
23     "resolution_steps": "Make sure only allowed heat template section are provided in heat template(s). \n\nTo do so please review the heat template(s) and verify only the sections 'heat_template_version', 'description', 'parameter_groups', 'parameters', 'resources', 'outputs',and  'conditions' are used and those sections declared contain values.",
24     "header": "Heat template including sections that are not allowed. "
25   },
26   {
27     "module": "test_heat_template_structure",
28     "function": "test_heat_template_structure_contains_required_sections",
29     "resolution_steps": "Make sure all required heat template sections are provided in heat template(s). \n\nTo do so please review the heat template(s) and verify the sections 'heat_template_version', 'description', 'parameters', and 'resources' are present, and those sections contain values.",
30     "header": "test_heat_template_structure_contains_required_sections"
31   },
32   {
33     "module": "test_heat_template_structure",
34     "function": "test_parameter_type",
35     "resolution_steps": "Make sure all parameters are an accepted 'type'.(\n'string',\n'number',\n'json',\n'comma_delimited_list',\n'boolean'\n)",
36     "header": "Test correct parameter types"
37   },
38   {
39     "module": "test_nested_templates",
40     "function": "test_all_nested_templates_provided",
41     "resolution_steps": "Make sure that all templates referenced as nested templates were provided in the git repo. To do so: \n\n 1) Look for any references to files within templates (likely in a resource group) \n  - Make sure that the file referenced is included in the repo, and named exactly the same",
42     "header": "All nested templates provided"
43   },
44   {
45     "module": "test_all_referenced_resources_exists",
46     "function": "test_all_referenced_resources_exists",
47     "resolution_steps": "Make sure that any resource referenced via get_resource in a heat template is also defined in the same heat template. Do note that a resource in a nested file is not directly accessible in the parent template. To do so: \n\n1) Please check the resources, and outputs sections of all yaml files for any references to the function get_resource \n\n2) Then check that those resources are also defined within in the resources section of the same heat template",
48     "header": "All referenced resources are not defined in the same heat template"
49   },
50   {
51     "module": "test_allowed_address_pairs_include_vm_type_network_role",
52     "function": "test_allowed_address__pairs_include_vm_type_network_role",
53     "resolution_steps": "Make sure that any map property ip_address under the allowed_address_pairs property for any OS::Neutron::Port meet the naming conventions specified in the guidelines. This includes using a consistent {network_role}. Do note that this naming convention is not enforced within nested files. To do so: \n\n1) Identify the network referenced in the port's definition. Do note that this may be a parameter or a resource. \n  - Ensure it follows naming conventions and that it's {network_role} is included in the port's resource id, and the ip_address map property of allowed_address_pairs",
54     "header": "Allowed address pairs include both {vm_type} and {network_role}"
55   },
56   {
57     "module": "test_availability_zone",
58     "function": "test_availability_zone_naming",
59     "resolution_steps": "Make sure all availability zones are properly formatted as per the guidelines. To do so: \n\nVerify the availability _zone property of all OS::Nova::Servers retrieves a parameter that is type string, and that each is appended with an index.",
60     "header": "Availability Zones correctly named"
61   },
62   {
63     "module": "test_base_template_names",
64     "function": "test_base_template_names",
65     "resolution_steps": "Make sure that only the the base template pair (.yaml and .env) contains the keyword 'base'. If the base template has an associated independent volume template those should also contain the keyword 'base'. To do so: \n\n1) Look at the file names for all templates of your VNF \n - Ensure that there are only one environment and yaml file have the word 'base' in them Do note that if the base heat template has an associated independent volume template, one additional environment and yaml file will also have 'base' in their filenames.",
66     "header": "Only the the base template pair (.yaml and .env) must contain the keyword base"
67   },
68   {
69     "module": "test_base_template_outputs_consumed",
70     "function": "test_base_template_outputs_consumed",
71     "resolution_steps": "Any output parameter defined in the base template must be consumed by another add-on module. Check that all parameters defined in your base template's output section are in the parameters and resources section of another template. To do so: \n\n1) Locate the outputs section of your base template \n\n2) Ensure that every output in that base template is defined as a parameter which is consumed in another template",
72     "header": "Base template outputs consumed"
73   },
74   {
75     "module": "test_heat_parameter_section",
76     "function": "test_default_values",
77     "resolution_steps": "Make sure no default values are set for any parameter in the heat templates.  Note any default value for a parameter should be specified in the ENV file. \n\nTo do so look at the parameters in the heat templates and look for the key default.",
78     "header": "Default key is specified for parameters in the heat templates. "
79   },
80   {
81     "module": "test_heat_parameter_section",
82     "function": "test_parameter_names",
83     "resolution_steps": "Make sure parameter names only contain alphanumberic characters or underscores",
84     "header": "Test acceptable parameter names"
85   },
86   {
87     "module": "test_env_and_yaml_same_name",
88     "function": "test_env_and_yaml_same_name",
89     "resolution_steps": "Make sure all ENV filenames are identical to an associated Heat template filename.  To do so: \n\n1) Locate all .env files \n2) Ensure there is a corresponding .yaml file; that is, both files should have the same name up to the file extension (.env or .yaml)",
90     "header": "ENV file names not matching heat template names."
91   },
92   {
93     "module": "test_env_files_provided",
94     "function": "test_env_files_provided",
95     "resolution_steps": "Make sure the necessary environment file(s) have been provided. Do note that the git repo must have a flat directory structure which means that no subfolders or compressed files are allowed in the repository. \n\nTo do so, please follow the instructions found in the Documentation section for how to commit or upload those environment file(s).",
96     "header": "Make sure the necessary environment file(s) has/have been provided"
97   },
98   {
99     "module": "test_environment_file_structure",
100     "function": "test_environment_file_contains_required_sections",
101     "resolution_steps": "Make sure environment filed have the required sections as per the guidelines. ",
102     "header": "Environment file is missing required section"
103   },
104   {
105     "module": "test_heat_template_and_env_file_extension",
106     "function": "test_environment_file_extension",
107     "resolution_steps": "Make sure that values of parameters in the environment file are valid per the guidelines. \n\nTo do so check that parameter values are not dictionaries.",
108     "header": "Parameter values are dictionaries"
109   },
110   {
111     "module": "test_environment_file_structure",
112     "function": "test_environment_structure",
113     "resolution_steps": "Make sure environment files only have the allowed sections as per the guidelines. ",
114     "header": "Environment file has invalid sections"
115   },
116   {
117     "module": "test_fixed_ips_format",
118     "function": "test_fixed_ips_format",
119     "resolution_steps": "Make sure that any map property ip_address under the fixed_ips property for any OS::Neutron::Port meet the naming conventions per as specified in the guidelines. This includes using a consistent {network_role}. Do note that this naming convention is not enforced within nested files. To do so: \n\n1) Identify the network referenced in the port's definition. Do note that this may be a parameter or a resource. \n - Ensure it follows naming conventions and that it's {network_role} is included in the port's resource ID, and the ip_address map property of fixed_ips",
120     "header": "The map property ip_address in fixed_ips do not follow the naming convention"
121   },
122   {
123     "module": "test_fixed_ips_include_vm_type_network_role",
124     "function": "test_fixed_ips_include_vm_type_network_role",
125     "resolution_steps": "Make sure that any map property ip_address under the fixed_ips property for any OS::Neutron::Port include using a consistent {vm-type}, and {network_role}. Do note that this naming convention is not enforced within nested files. To do so: \n\n1) Identify the network referenced in the port's definition. Do note that this may be a parameter or a resource. \n - Ensure it follows naming conventions and that it's {network_role} is included in the port's resource ID, and the ip_address map property of fixed_ips \n\n2) Identify the Nova server the port is attached to \n - Ensure that server's {vm_type} is properly included in all ip_address map property of fixed_ips",
126     "header": "Fixed IPs include both {vm_type} and {network_role}"
127   },
128   {
129     "module": "test_heat_templates_provided",
130     "function": "test_heat_templates_provided",
131     "resolution_steps": "Make sure the necessary Heat template(s) have been provided. Do note that the git repo must have a flat directory structure which means that no subfolders or compressed files are allowed in the repository. \n\nTo do so, please follow the instructions found in the Documentation section for how to commit or upload the Heat template(s).",
132     "header": "Make sure the necessary Heat template(s) have been provided"
133   },
134   {
135     "module": "test_network_format",
136     "function": "test_network_format",
137     "resolution_steps": "Make sure that any network property for any OS::Neutron::Port meets the naming conventions per as specified in the guidelines including a consistent {network_role}. Do note that there is no naming convention applied within nested files. To do so: \n\n1) Identify the network referenced in the port's definition. Do note that this may be a parameter or a resource. \n - Ensure that the network property is following the naming convention per as outlined in the guidelines. \n - Ensure that the required port property 'network' is used in the templates (not the commonly mistaken used network_id instead of network)",
138     "header": "The network port property do not follow the right format"
139   },
140   {
141     "module": "test_no_unused_parameters_between_env_and_templates",
142     "function": "test_no_unused_parameters_between_env_and_templates",
143     "resolution_steps": "Conditional (on the test result A OR B): \n\n A (Left set)): Make sure that all parameters defined in environment file are also defined as parameters corresponding heat template. To do so: \n1) Locate the parameters section of the environment file, and it's corresponding yaml file \n - Ensure that the parameters defined in the environment file are also defined in the yaml file \n\n OR ===================================================== \n\nB (Right set)): Make sure that all parameters defined in heat template are also defined as a parameter in the environment file. Do note that you should not comment out any parameters in the environment file. To do so: \n1) Locate the parameters section of the yaml file, and it's corresponding environment file \n - Ensure that the parameters defined in the yaml file are also defined, and not commented out in the environment file",
144     "header": "Parameters are either missing in the environment file or the corresponding heat template"
145   },
146   {
147     "module": "test_nova_servers_correct_parameter_types",
148     "function": "test_nova_servers_correct_parameter_types",
149     "resolution_steps": "Make sure all nova servers have properly assigned types for the parameters used for their name, image and flavor as per the guidelines. To do so: \n\n1) Identify the OS::Nova::Server properties Name, Image and Flavor. \n2) Identify the parameter passed to Name, Image and Flavor \n3) Verify the type for each parameter is correct.",
150     "header": "Server parameters correct types"
151   },
152   {
153     "module": "test_nova_servers_resource_ids",
154     "function": "test_nova_servers_valid_resource_ids",
155     "resolution_steps": "Make sure all OS::Nova::Servers have valid resource ID as per the guidelines. To do so: \n\n1) Identify the Image and Flavor property for the server \n - Ensure the {vm-type} of the Flavor and Image match the {vm-type} in the server resource ID.",
156     "header": "Nova server resource ID is valid"
157   },
158   {
159     "module": "test_heat_numeric_parameters",
160     "function": "test_numeric_parameter",
161     "resolution_steps": "Make sure that all parameters with the type number have the constraints either `range` or `allowed_values` defined.  To do so: \n\n1) Locate any parameter with the type 'number' in the parameters section of any yaml file of your VNF \n2) Ensure that each has either `range` or `allowed_values` properly defined",
162     "header": "Numeric parameter constraints"
163   },
164   {
165     "module": "test_heat_parameter_section",
166     "function": "test_parameter_valid_keys",
167     "resolution_steps": "Make sure the keys specified for parameters in the heat template are valid per the guidelines. To do so check the keys for parameter in the heat templates. ",
168     "header": "Heat template parameters using invalid keys"
169   },
170   {
171     "module": "test_parse_yaml",
172     "function": "test_parse_yaml",
173     "resolution_steps": "Make sure all files contain valid yaml.",
174     "header": "Invalid yaml"
175   },
176   {
177     "module": "test_port_resource_ids",
178     "function": "test_port_resource_ids",
179     "resolution_steps": "Make sure that all Port resource IDs follow the right naming convention to include the {vm_type} of the nova server its associated to and also contains the {network_role} of the network its associated with. To do so: \n\n1) Identify the Nova server the port is attached to \n - Ensure that server's {vm_type} is properly included in the resource id for the port \n2) Identify the network referenced in the port's definition. Do note that this may be a parameter or a resource. \n - Ensure it follows naming conventions and that it's {network_role} is included in the port's resource ID. \n3) If the port is associated with a single internal network, its resource id should include int_{network-role}",
180     "header": "Port resource IDs must include the {vm_type} and {network_role} they're associated with"
181   },
182   {
183     "module": "test_referenced_and_defined_parameters_match",
184     "function": "test_referenced_and_defined_parameters_match",
185     "resolution_steps": "Conditional (on the test result A OR B): \n\n(RIGHT SET) \nA) Make sure that any parameter which is referenced in the heat template is also defined in the parameter section in the same yaml heat template. \nTo do so: \n1) Locate any parameter referenced by the get_param function in the resources section of a yaml heat template \n - Ensure that each parameter is defined in the parameters section of that file \n\nOR ===================================================== \n\n(LEFT SET) \nB) Make sure that any parameter found in the parameter section is referenced in the same heat template. \n1) Locate the parameters section of the yaml heat template \n - Ensure that every parameter defined is referenced in the resource section of the template via the get_param function",
186     "header": "All referenced and defined parameters must match 1:1"
187   },
188   {
189     "module": "test_required_parameters_specified_in_env_files",
190     "function": "test_required_parameters_provided_in_env_file",
191     "resolution_steps": "Make sure that the required metadata (vnf_id, vf_module_id, and vnf_name) is defined in the environment file if the corresponding heat template contains any OS::Nova::Server resources. To do so: \n\n1) Check if any OS::Nova::Server resources are defined in a Heat template \n - If there are, ensure that the required parameters vnf_id, vf_module_id, and vnf_name are defined in the corresponding environment file",
192     "header": "The required metadata parameters are missing in the environment file"
193   },
194   {
195     "module": "test_required_parameters_specified_in_heat_templates",
196     "function": "test_required_parameters_provided_in_heat_template",
197     "resolution_steps": "Make sure that the required metadata (vnf_id, vf_module_id, and vnf_name) is defined in the same yaml file of the corresponding heat template that defines OS::Nova::Server resources. To do so: \n\n1) Check if any OS::Nova::Server resources are defined in a Heat template \n - If there are, ensure that the required parameters vnf_id, vf_module_id, and vnf_name are defined in that template's parameters section",
198     "header": "The required metadata parameters are missing in the yaml file"
199   },
200   {
201     "module": "test_reserve_port_fixed_ips_has_base_outputs",
202     "function": "test_reserve_port_fixed_ips_has_base_outputs",
203     "resolution_steps": "Make sure all fixed_ips specified in reserved ports are also exported as outputs in the same base template. To do so: \n\n1) Identify all OS::Neutron::Ports that are reserved ports by looking for 'reserve' at the. beginning of the resource id for the port. \n2) Verify each 'reserve' port has a corrisponding output parameter",
204     "header": "Reserve port fixed_ips have outputs in base template"
205   },
206   {
207     "module": "test_servers_have_required_metadata",
208     "function": "test_servers_have_required_metadata",
209     "resolution_steps": "Make sure that the required metadata (vnf_id, vf_module_id, and vnf_name) are specified as metadata for all OS::Nova::Server resources in a heat template. Do note that this also applies for any OS::Nova::Server resources specified in nested files. To do so: \n\n1) Identify each OS::Nova::Server resources in a Heat template \n - Ensure that the required parameters vnf_id, vf_module_id, and vnf_name are defined as metadata to the same resource",
210     "header": "Make sure all required parameters are specified properly in the heat template if a server resource is defined"
211   },
212   {
213     "module": "test_servers_metadata_use_get_param",
214     "function": "test_servers_metadata_use_get_param",
215     "resolution_steps": "Make sure that the required metadata fields (vnf_id, vf_module_id, and vnf_name) use the get_param function to assign their values. Do note that this also applies for any OS::Nova::Server resources specified in nested files. To do so: \n\n1) Identify each OS::Nova::Server resources in a Heat template \n2) Locate the metadata section for each server \n - Ensure that the required metadata vnf_id, vf_module_id, and vnf_name use the get_param function to assign their values \n - Ensure they are formatted as valid heat",
216     "header": "Server metadata uses get_param"
217   },
218   {
219     "module": "test_subnet_format",
220     "function": "test_subnet_format",
221     "resolution_steps": "Make sure that any map property subnet_id under the subnet property for any OS::Neutron::Port meet the naming conventions per as specified in the guidelines. This includes using a consistent {network_role}. Do note that this naming convention is not enforced within nested files. To do so: \n\n1)  Identify the network referenced in the port's definition. Do note that this may be a parameter or a resource. \n - Ensure it follows naming conventions and that it's {network_role} is included in the subnet_id map property of subnet",
222     "header": "The map property subnet_id in subnet do not follow the naming convention"
223   },
224   {
225     "module": "test_unique_name_resources",
226     "function": "test_unique_name_resources",
227     "resolution_steps": "Make sure that the property 'name' for each resource is unique across all templates in the VNF. To do so: \n\n1) Locate the property 'name' under any resource \n2) Ensure that parameter is not used for other resources across the template set",
228     "header": "Unique name properties for resources"
229   },
230   {
231     "module": "test_unique_name_str_replace_use_req_params",
232     "function": "test_unique_name_str_replace_use_req_params",
233     "resolution_steps": "Make sure any resource's property, name, which uses str_replace also uses the required parameters (vnf_name and/or vf_module_id) to construct the name. To do so: \n\n1) Locate any resource definition which uses str_replace in its name property \n - Ensure that vnf_name, vf_module_id, or both are used to construct the name",
234     "header": "Resources using str_replace to specific the name are not using the required params"
235   },
236   {
237     "module": "test_unique_name_str_replace_use_req_params_in_tmpl",
238     "function": "test_unique_name_str_replace_use_req_params_in_tmpl",
239     "resolution_steps": "Make sure that all parameters used to define the resource property name via str_replace is defined in the parameters section. To do so: \n\n1) Locate any resource definition which uses str_replace in its name property \n - Ensure that any parameter used in the template section of the str_replace function are in the parameters section of the str_replace function",
240     "header": "Resources using str_replace to specific the name are not using the required params"
241   },
242   {
243     "module": "test_unique_resources_across_all_templates",
244     "function": "test_unique_resources_across_all_yaml_files",
245     "resolution_steps": "Make sure all resource IDs are unique across all yaml files in your repository. To do so: 1) Locate all resource definitions in the template set - Ensure that the resource id is unique across all templates",
246     "header": "Resource IDs must be unique across all templates"
247   },
248   {
249     "module": "test_nova_servers_vm_types_use_get_param",
250     "function": "test_vm_type_assignments_on_nova_servers_only_use_get_param",
251     "resolution_steps": "Ensure that the OS::Nova::Server properties for name, flavor, and image only use the get_param function. To do so: \n\n1) Locate any OS::Nova::Server resource \n - Ensure that the properties: name, flavor, and image do not use any function other than get_param.",
252     "header": "Nova Server name, flavor, and image use get_param"
253   },
254   {
255     "module": "test_nova_servers_vm_types",
256     "function": "test_vm_type_consistent_on_nova_servers",
257     "resolution_steps": "Make sure a consistent {vm-type} is used across the server properties: name, flavor, and image. Also, ensure that they follow the guideline naming convention.  To do so: \n\n1)  Locate any OS::Nova::Server resource \n - Make sure that the parameter names for the image, flavor, and name use a consistent {vm-type}, and that they follow the defined naming conventions.",
258     "header": "Consistent VM type in key server properties"
259   },
260   {
261     "module": "test_volume_format_outputs",
262     "function": "test_volume_format_outputs",
263     "resolution_steps": "Make sure the format of output parameters in volume modules is valid as per the guidelines. To do so: \n\nVerify that each volume is output and that get_resource or get_attr is used to retrieve the resource.",
264     "header": "Volume output  format "
265   },
266   {
267     "module": "test_volume_outputs_consumed",
268     "function": "test_volume_outputs_consumed",
269     "resolution_steps": "Make sure that all volume template's outputs are consumed in the corresponding heat template. To do so: \n\n1) Locate the outputs of your independent volume templat \n2) Ensure that each output is defined as a parameter in the corresponding heat template (the corresponding heat template will have the same name, but not include _volume)",
270     "header": "Volume templates outputs consumed"
271   },
272   {
273     "module": "test_volume_templates_outputs",
274     "function": "test_volume_templates_contains_outputs",
275     "resolution_steps": "Make sure that all volume template's contain output values",
276     "header": "Volume templates outputs consumed"
277   },
278   {
279     "module": "test_volume_resource_ids",
280     "function": "test_volume_resource_ids",
281     "resolution_steps": "Make sure that all resource ids for cinder volumes follow the right naming convention to include the {vm_type} of the nova server it is associated to as per the guidelines.",
282     "header": "Volume resources IDs are valid"
283   },
284   {
285     "module": "test_volume_templates_outputs_match_resources",
286     "function": "test_volume_templates_outputs_match_resources",
287     "resolution_steps": "Make sure that all resource ids for cinder volumes follow the right naming convention to include the {vm_type} of the nova server it is associated to as per the guidelines.",
288     "header": "Volume resources referenced in volume template outputs do not exist."
289   }
290 ]