Advertisement
Guest User

Untitled

a guest
Jun 24th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.50 KB | None | 0 0
  1. """
  2. Note:
  3. Network device's `username` and `password`
  4. are assumed to have been setup on the device already
  5. Eg: username: bodscript password: F842016!717
  6. """
  7.  
  8. #
  9. # Given a circuit ID, the following JSON below can be returned
  10. #
  11.  
  12. [
  13. #
  14. # Example of Huawei
  15. #
  16. {
  17. "hostname": "Huawei at CODIUM", # String: can be anything
  18. "protocol": "telnet", # String: ["telnet", "ssh"]
  19. "device_ip": "192.168.2.10", # String: IP address
  20. "physical_interface": "GigabitEthernet0/0/1", # String: network device physical interface
  21. "vendor": "huawei", # String: ["huawei", "juniper"]
  22. "model": "s5328", # String: network device model name
  23. "sw_version": "v1r2", # String: network device software version
  24. "service": "inet", # String: service name
  25. "vlan": "100", # String: VLAN
  26. "is_shaping": false, # Boolean: true or false (indicating if we are doing shaping). Huawei will always be false
  27. "networkscript_parameters": { # Object: (or a dictionary with key: String, and value: String
  28. # You can put anything in here. Each key/value will be matched to networkscript parameters
  29. "traffic_behavior_name": "20m", # String: behavior name
  30. "traffic_policy_name": "EPL" # String: policy name
  31. }
  32. },
  33.  
  34. #
  35. # Example of Juniper with policer and shaping
  36. #
  37. {
  38. "hostname": "Juniper at BigC", # String: can be anything
  39. "protocol": "ssh", # String: ["telnet", "ssh"]
  40. "device_ip": "10.1.5.23", # String: IP address
  41. "physical_interface": "ge-1/3/0", # String: network device physical interface
  42. "vendor": "juniper", # String: ["huawei", "juniper"]
  43. "model": "mx480", # String: network device model name
  44. "sw_version": "v1.0", # String: network device software version
  45. "service": "ccc", # String: service name
  46. "vlan": "12304", # String: VLAN
  47. "is_shaping": true, # Boolean: true or false (indicating if we are doing shaping). Juniper can be true or false
  48. "networkscript_parameters": { # Object: (or a dictionary with key: String, and value: String
  49. # You can put anything in here. Each key/value will be matched to networkscript parameters
  50. "policer_name_in_and_out": "abc-20m", # String: policer name
  51. "shape_rate": "100k", # String: shape rate
  52. }
  53. },
  54.  
  55. #
  56. # Example of Juniper with only shaping
  57. #
  58. {
  59. "hostname": "Juniper at BigC", # String: can be anything
  60. "protocol": "ssh", # String: ["telnet", "ssh"]
  61. "device_ip": "10.1.5.23", # String: IP address
  62. "physical_interface": "ge-1/3/0", # String: network device physical interface
  63. "vendor": "juniper", # String: ["huawei", "juniper"]
  64. "model": "mx480", # String: network device model name
  65. "sw_version": "v1.0", # String: network device software version
  66. "service": "ccc", # String: service name
  67. "vlan": "12304", # String: VLAN
  68. "is_shaping": true, # Boolean: true or false (indicating if we are doing shaping). Juniper can be true or false
  69. "networkscript_parameters": { # Object: (or a dictionary with key: String, and value: String
  70. # You can put anything in here. Each key/value will be matched to networkscript parameters
  71. "shape_rate": "100k", # String: shape rate
  72. }
  73. },
  74.  
  75. #
  76. # Example of Juniper with only policer
  77. #
  78. {
  79. "hostname": "Juniper at BigC", # String: can be anything
  80. "protocol": "ssh", # String: ["telnet", "ssh"]
  81. "device_ip": "10.1.5.23", # String: IP address
  82. "physical_interface": "ge-1/3/0", # String: network device physical interface
  83. "vendor": "juniper", # String: ["huawei", "juniper"]
  84. "model": "mx480", # String: network device model name
  85. "sw_version": "v1.0", # String: network device software version
  86. "service": "ccc", # String: service name
  87. "vlan": "12304", # String: VLAN
  88. "is_shaping": false, # Boolean: true or false (indicating if we are doing shaping). Juniper can be true or false
  89. "networkscript_parameters": { # Object: (or a dictionary with key: String, and value: String
  90. # You can put anything in here. Each key/value will be matched to networkscript parameters
  91. "policer_name_in_and_out": "abc-20m", # String: policer name
  92. }
  93. }
  94. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement