YAML AND JSON HANDS-ON
EXERCISES
For each exercise, create a YAML document with required data, and test its
validity. You can use yamllint or its online equivalent
(http://www.yamllint.com/).
Optional: create corresponding JSON data and validate it with online JSON
validator (for example, https://jsonlint.com/)
1. Create a dictionary containing hostname (a string), loopback (an IP
address), and maxint (number).
2. Create a dictionary containing hostname (a string), loopback (an IP
address), and interfaces (a list of strings).
3. Create list of username (string) / password (string) pairs.
4. Create a list of users having:
Mandatory1: username and password
Optional2: privilege (number) and autocommand (string) attributes
5. Create a list of BGP neighbors having:
Mandatory: address (IP address), description (string) and asn
Optional: state (present, absent or down) and policy (route map
name)
6. Create a list of BGP neighbors as above, add optional attribute prefixes
(list of IP prefixes).
7. Create a BGP router description containing:
hostname (string), loopback (IP address), asn (number)
interfaces: list of name / address pairs, where every address is an
IP address using CIDR prefix notation (for example, 192.168.1.1/24)
neighbors: list of BGP neighbors (see above)
1
Each element should have these values
2
Only some elements should have these values
© Copyright ipSpace.net 2015 Page 1
This material is copyrighted and licensed for the sole use by Mikel Maeso (mikel.maeso@gmail.com [85.87.178.33]). More information at http://www.ipSpace.net/Webinars