VCP-CMA 2024 Question 210
Select 2You are tasked with creating a VMware Aria Automation template to provision a virtual machine with an NSX-T on-demand network. The template must include an input for the network CIDR and ensure the YAML syntax and constructs are valid. Which of the following YAML code snippets meet the requirements?
- A
resources: MyNetwork: type: NSX-T.Networks.OnDemand properties: networkCIDR: '${input.networkCIDR}' inputs: networkCIDR: type: string
- B
resources: MyNetwork: type: NSX-T.Networks.OnDemand properties: networkCIDR: '${input.networkCIDR}' inputs: networkCIDR: type: integer
- C
resources: MyNetwork: type: NSX-T.Networks.OnDemand properties: subnet: '${input.networkCIDR}' inputs: networkCIDR: type: string
- D
resources: MyNetwork: type: NSX-T.Networks.OnDemand properties: networkCIDR: '${input.networkCIDR}'
- E
resources: MyNetwork: type: NSX-T.Networks.OnDemand properties: networkCIDR: '${input.networkCIDR}' inputs: networkCIDR: type: string description: "Provide the CIDR for the network"
Show answer and explanation
Correct answers: A, E
Explanation
The valid YAML snippets must include a properly defined NSX-T on-demand network resource with the correct syntax and property ('networkCIDR'). Inputs must be explicitly defined with the appropriate type (string for network CIDR). Options 1 and 5 satisfy these criteria, while the others either have incorrect input types, missing sections, or invalid property names.
- A. Correct.
This YAML snippet includes the correct definition of an NSX-T on-demand network with a valid property for 'networkCIDR' and ensures the input type is defined as a string, matching the network CIDR format.
- B. Incorrect.
This YAML snippet incorrectly defines the input type as an integer, which is not valid for a network CIDR since CIDR values include both numbers and special characters like '/'.
- C. Incorrect.
This YAML snippet uses the incorrect property name 'subnet' instead of 'networkCIDR', which is not aligned with NSX-T On-Demand Network constructs.
- D. Incorrect.
This YAML snippet is missing the 'inputs' section entirely, making it invalid as it does not define the required input for 'networkCIDR'.
- E. Correct.
This YAML snippet is valid as it includes a correct 'inputs' section with a description and properly references the 'networkCIDR' input in the 'properties' section of the resource.