Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Note:
- Network device's `username` and `password`
- are assumed to have been setup on the device already
- Eg: username: bodscript password: F842016!717
- """
- #
- # Given a circuit ID, the following JSON below can be returned
- #
- [
- #
- # Example of Huawei
- #
- {
- "hostname": "Huawei at CODIUM", # String: can be anything
- "protocol": "telnet", # String: ["telnet", "ssh"]
- "device_ip": "192.168.2.10", # String: IP address
- "physical_interface": "GigabitEthernet0/0/1", # String: network device physical interface
- "vendor": "huawei", # String: ["huawei", "juniper"]
- "model": "s5328", # String: network device model name
- "sw_version": "v1r2", # String: network device software version
- "service": "inet", # String: service name
- "vlan": "100", # String: VLAN
- "is_shaping": false, # Boolean: true or false (indicating if we are doing shaping). Huawei will always be false
- "networkscript_parameters": { # Object: (or a dictionary with key: String, and value: String
- # You can put anything in here. Each key/value will be matched to networkscript parameters
- "traffic_behavior_name": "20m", # String: behavior name
- "traffic_policy_name": "EPL" # String: policy name
- }
- },
- #
- # Example of Juniper with policer and shaping
- #
- {
- "hostname": "Juniper at BigC", # String: can be anything
- "protocol": "ssh", # String: ["telnet", "ssh"]
- "device_ip": "10.1.5.23", # String: IP address
- "physical_interface": "ge-1/3/0", # String: network device physical interface
- "vendor": "juniper", # String: ["huawei", "juniper"]
- "model": "mx480", # String: network device model name
- "sw_version": "v1.0", # String: network device software version
- "service": "ccc", # String: service name
- "vlan": "12304", # String: VLAN
- "is_shaping": true, # Boolean: true or false (indicating if we are doing shaping). Juniper can be true or false
- "networkscript_parameters": { # Object: (or a dictionary with key: String, and value: String
- # You can put anything in here. Each key/value will be matched to networkscript parameters
- "policer_name_in_and_out": "abc-20m", # String: policer name
- "shape_rate": "100k", # String: shape rate
- }
- },
- #
- # Example of Juniper with only shaping
- #
- {
- "hostname": "Juniper at BigC", # String: can be anything
- "protocol": "ssh", # String: ["telnet", "ssh"]
- "device_ip": "10.1.5.23", # String: IP address
- "physical_interface": "ge-1/3/0", # String: network device physical interface
- "vendor": "juniper", # String: ["huawei", "juniper"]
- "model": "mx480", # String: network device model name
- "sw_version": "v1.0", # String: network device software version
- "service": "ccc", # String: service name
- "vlan": "12304", # String: VLAN
- "is_shaping": true, # Boolean: true or false (indicating if we are doing shaping). Juniper can be true or false
- "networkscript_parameters": { # Object: (or a dictionary with key: String, and value: String
- # You can put anything in here. Each key/value will be matched to networkscript parameters
- "shape_rate": "100k", # String: shape rate
- }
- },
- #
- # Example of Juniper with only policer
- #
- {
- "hostname": "Juniper at BigC", # String: can be anything
- "protocol": "ssh", # String: ["telnet", "ssh"]
- "device_ip": "10.1.5.23", # String: IP address
- "physical_interface": "ge-1/3/0", # String: network device physical interface
- "vendor": "juniper", # String: ["huawei", "juniper"]
- "model": "mx480", # String: network device model name
- "sw_version": "v1.0", # String: network device software version
- "service": "ccc", # String: service name
- "vlan": "12304", # String: VLAN
- "is_shaping": false, # Boolean: true or false (indicating if we are doing shaping). Juniper can be true or false
- "networkscript_parameters": { # Object: (or a dictionary with key: String, and value: String
- # You can put anything in here. Each key/value will be matched to networkscript parameters
- "policer_name_in_and_out": "abc-20m", # String: policer name
- }
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement