COA Automation & Scripting 2 — Questions and Answers
Question 1: Which OpenStack CLI command lists all available Heat template versions?
- openstack orchestration template version list (Correct answer)
- openstack stack template list
- openstack heat template-version-list
- openstack orchestration version list
Correct answer: openstack orchestration template version list
The 'openstack orchestration template version list' command displays all HOT and CFN template versions supported by the Heat service.
Question 2: In a Heat Orchestration Template (HOT), which section defines reusable parameter groups for the UI?
- parameter_groups (Correct answer)
- parameters
- resources
- outputs
Correct answer: parameter_groups
The 'parameter_groups' section in HOT organizes parameters into logical groups, improving how they are presented in dashboard UIs.
Question 3: When using Ansible with OpenStack, which module creates a Cinder volume?
- os_volume (Correct answer)
- os_block_storage
- openstack_volume
- cinder_volume
Correct answer: os_volume
The 'os_volume' module in the openstack.cloud Ansible collection is used to create and manage Cinder block storage volumes.
Question 4: Which Python library is the standard SDK for interacting with OpenStack APIs programmatically?
- openstacksdk (Correct answer)
- python-openstackclient
- keystoneclient
- novaclient
Correct answer: openstacksdk
openstacksdk is the official unified Python library for OpenStack, abstracting individual service clients into a single interface.
Question 5: In a HOT template, which intrinsic function retrieves the value of a resource attribute after it is created?
- get_attr (Correct answer)
- get_resource
- get_param
- get_file
Correct answer: get_attr
'get_attr' retrieves an attribute value from a resource that has already been created within the same stack.
Question 6: Which command validates a Heat template file named stack.yaml without deploying it?
- openstack orchestration template validate -t stack.yaml (Correct answer)
- openstack stack validate stack.yaml
- heat template-validate stack.yaml
- openstack orchestration validate stack.yaml
Correct answer: openstack orchestration template validate -t stack.yaml
'openstack orchestration template validate' checks the template syntax and structure without creating any actual stack resources.
Question 7: Which Terraform provider is used to manage OpenStack resources in a Terraform configuration?
- terraform-provider-openstack (Correct answer)
- terraform-provider-nova
- openstack-terraform-provider
- provider-openstack-cloud
Correct answer: terraform-provider-openstack
The 'terraform-provider-openstack' is the official Terraform provider for managing OpenStack infrastructure resources.
Which OpenStack CLI command lists all available Heat template versions?