script.json 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {
  2. "variables": [{
  3. "type": "prefix",
  4. "name": "fullPrefix",
  5. "cidr": "fd00:8e13:ce5d::/48"
  6. }, {
  7. "type": "array",
  8. "name": "used",
  9. "value": [{
  10. "type": "prefix",
  11. "name": "Lab 4e90",
  12. "assignment": "customers",
  13. "cidr": "fd00:8e13:ce5d:4e90::/60"
  14. }, {
  15. "type": "prefix",
  16. "name": "Lab cb00",
  17. "assignment": "customers",
  18. "cidr": "fd00:8e13:ce5d:cb00::/56"
  19. }, {
  20. "type": "prefix",
  21. "assignment": "internal",
  22. "cidr": "fd00:8e13:ce5d:cb00::/56"
  23. }]
  24. },
  25. {
  26. "type": "array/prefixLength",
  27. "name": "allowedLengths",
  28. "value": [56, 60]
  29. },
  30. {
  31. "type": "array/string",
  32. "name": "includes",
  33. "value": ["dn42.json"]
  34. }
  35. ],
  36. "actions": [
  37. ["for", {
  38. "through": "$includes",
  39. "as": "filename",
  40. "do": [
  41. ["print", {
  42. "value": "$filename",
  43. "prefix": "%Include file ",
  44. "postfix": "%..."
  45. }],
  46. ["include", {
  47. "file": "$filename",
  48. "catch": false
  49. }]
  50. ]
  51. }],
  52. ["print", {
  53. "value": "$fullPrefix",
  54. "prefix": "%Full prefix: "
  55. }],
  56. ["print", {
  57. "value": "%Used prefixes:"
  58. }],
  59. ["print", {
  60. "value": "$used",
  61. "prefix": "%- "
  62. }],
  63. ["generate", {
  64. "count": 40,
  65. "lengths": "$allowedLengths",
  66. "in": "$fullPrefix",
  67. "exclude": "$used"
  68. }]
  69. ]
  70. }