Introduction
# Python examples use the jsonrpc-requests library
# (https://pypi.org/project/jsonrpc-requests/)
from jsonrpc_requests import Server
fusion = Server("http://myfusion/jsonrpc")
This page describes the Fusion JSON-RPC interface. This interface allows you to programatically control the ExaLINK Fusion from a remote host via the Ethernet management interface. This interface is enabled from the command line using:
configure http enable
Commands are then sent via HTTP POST requests to the Fusion web interface, accessible via the Fusion network address. Authentication is performed by the Fusion server by first sending a login request containing a username and password. After authentication is complete, the Fusion web server will open and maintain an HTTP session, through which JSON RPC requests can be made. The address for requests to the RPC interface is:
http://<mgmt-addr>/jsonrpc
The remainder of this document lists the RPC calls that can be made, the arguments you must provide with them, and the return values.
Authentication
Clients must be authenticated prior to being able to issue commands. Once authenticated an HTTP session is opened, with a cookie stored at the client end. It is the user’s responsibility to store this cookie and provide it with subsequent requests. The following commands handle this authentication.
Management Interface
login
>>> fusion.login(username="admin", password="admin")
True
// Request
{
"method": "login",
"params": {
"username":"admin",
"password":"admin"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Log in to the ExaLINK Fusion. The username and password must be supplied as strings to this command. Returns success if supplied credentials are valid, error otherwise
Parameters
Field | Type | Description |
---|---|---|
username | string | Username to log in as |
password | string | Password for user |
Result
True if successful
logout
>>> fusion.logout()
True
// Request
{
"method": "logout",
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Log out of the ExaLINK Fusion
Parameters
None
Result
True if successful
whoami
>>> fusion.whoami()
{u'username': u'admin'}
// Request
{
"method": "whoami",
"id": 1
}
// Response
{
"result": {
"username": "admin"
},
"id": 1
}
Returns the username of the current session
Parameters
None
Result
The username of the current user
set_password
>>> fusion.set_password(username="admin", password="mynewpassword")
True
// Request
{
"method": "set_password",
"params": {
"password":"mynewpassword"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method can be used to change the user’s password
Parameters
Field | Type | Description |
---|---|---|
username | string | Username of the user whose password will be changed |
password | string | The new password |
Result
True if successful
get_hostname
>>> fusion.get_hostname()
{u'hostname': u'EXALINK-FUSION'}
// Request
{
"method": "get_hostname",
"id": 1
}
// Response
{
"result": {
"hostname": "EXALINK-FUSION"
},
"id": 1
}
This method returns the hostname of the ExaLINK Fusion
Parameters
None
Result
The current hostname
set_hostname
>>> fusion.set_hostname(hostname="myFusion")
True
// Request
{
"method": "set_hostname",
"params": {
"hostname":"myFusion"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method sets the hostname of the ExaLINK Fusion
Parameters
Field | Type | Description |
---|---|---|
hostname | string | The new hostname |
Result
True if successful
get_management_address_ipv4
>>> fusion.get_management_address_ipv4()
{u'mode': u'static', u'netmask': u'255.255.255.0', u'gateway': u'', u'address': u'172.16.0.153'}
// Request
{
"method": "get_management_address_ipv4",
"id": 1
}
// Response
{
"result": {
"mode": "static",
"netmask": "255.255.255.0",
"gateway": "",
"address": "172.16.0.153"
},
"id": 1
}
Get information on the IPv4 management address configuration of the ExaLINK Fusion
Parameters
None
Result
Field | Type | Description |
---|---|---|
mode | string | IPv4 configuration mode: static or dhcp |
netmask | string | Network mask in dot-decimal notation |
gateway | string | Gateway address in dot-decimal notation |
address | string | IPv4 address in dot-decimal notation |
set_management_address_ipv4
>>> fusion.set_management_address_ipv4(mode="static", static={"address":"172.16.0.153","netmask":"255.255.255.0", "gateway":""})
True
// Request
{
"method": "set_management_address_ipv4",
"params": {
"mode": "static",
"netmask": "255.255.255.0",
"gateway": "",
"address": "172.16.0.153"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method can be used to set the IPv4 management address configuration of the ExaLINK Fusion
Parameters
Field | Type | Description |
---|---|---|
mode | string | IP address assignment mode to use: static or dhcp |
In the case of setting a static IP address, additional required parameters are:
Field | Type | Description |
---|---|---|
address | string | IPv4 address to use in dot-decimal notation |
netmask | string | Network mask in dot-decimal notation |
gateway | string | Gateway address in dot-decimal notation |
Result
True if successful
get_version
>>> fusion.get_version()
{u'mainboard': {u'serial': u'EXALINK-FUSION', u'type': u'EBFSN-02'}, u'line_card': {u'A': {u'type': u'LC10G-03'}, u'C': {u'type': u'LC10G-03'}, u'B': {u'type': u'LC10G-03'}}, u'module': {u'X': {u'firmware': {u'hash': u'f9120423', u'datecode': 1465301675, u'type': u'mux'}, u'type': u'KU115-03'}}, u'software': {u'date': u'2016-06-08 11:40:15 +1000 (f305efa)', u'version': u'1.4.2'}}
// Request
{
"method": "get_version",
"id": 1
}
// Response
{
"mainboard": {
"serial": "EXALINK-FUSION",
"type": "EBFSN-02"
},
"line_card": {
"A": {
"type": "LC10G-03"
},
"C": {
"type": "LC10G-03"
},
"B": {
"type": "LC10G-03"
}
},
"module": {
"X": {
"firmware": {
"hash": "f9120423",
"datecode": 1465301675,
"type": "mux"
},
"type": "KU115-03"
}
},
"software": {
"date": "2016-06-08 11:40:15 +1000 (f305efa)",
"version": "1.4.2"
},
"id": 1
}
This method returns version details for the ExaLINK fusion along with a summary of installed hardware.
Parameters
None
Result
Field | Type | Description |
---|---|---|
mainboard | array | A list of strings describing the Mainboard in the Fusion |
serial | string | The serial number of this Mainboard |
type | string | The type of Mainboard installed into this Fusion |
line_card | array | A list of strings describing the Line Cards installed in the Fusion |
module | array | A list of the modules describing the Internal Modules installed in the Fusion and their firmware setting |
software | array | A list containing the version and date of creation of the current software installed in the Fusion |
get_session_timeout
>>> fusion.get_session_timeout()
600
// Request
{
"method": "get_session_timeout",
"id": 1
}
// Response
{
"result": 600,
"id": 1
}
This methods returns the current time (in seconds) of idle while logged in before being logged out automatically.
Parameters
None
Result
An integer of the current session timeout value (in seconds).
set_session_timeout
>>> fusion.set_session_timeout(600)
True
// Request
{
"method": "set_session_timeout",
"params": ["600"],
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Set the maximum idle time (in seconds) before automatic logging out of the Fusion.
Parameters
Field | Type | Description |
---|---|---|
timeout | integer | The number of seconds of idle activity before logging the user out |
Result
True if successful.
check_user_permission
>>> fusion.check_user_permissions("user")
2
// Request
{
"method": "check_user_permissions",
"params": ["admin"],
"id": 1
}
// Response
{
"result": 2,
"id": 1
}
Parameters
Field | Type | Description |
---|---|---|
user | string | Name of the account to check the permission level of |
Result
Field | Type | Description |
---|---|---|
access_level | integer | Value of the access level of the account |
get_management_access_list
>>> fusion.get_management_access_list()
{u'deny': [], u'allow': []}
// Request
{
"method": "get_management_access_list",
"id": 1
}
// Response
{
"result": {
"allow": [ ],
"deny": [ ]
},
"id": 1
}
Parameters
None
Result
Field | Type | Description |
---|---|---|
allow | array | A list of IPs allowed to access the management interface |
deny | array | A list of IPs not allowed to access the management interface |
set_time_sync_mode
>>> fusion.set_time_sync_mode(ntp_config={"server":"172.160.0.147"}, mode="ntp")
True
// Request
{
"method": "set_time_sync_mode",
"params": {
"ntp_config": {
"server": "172.160.0.147"
},
"mode": "ntp"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Parameters
Field | Type | Description |
---|---|---|
ntp_config | object | An array holding the data required for NTP configuration |
server | string | The IP address of the NTP device to base time off |
mode | string | The timesync method to be used on the Fusion |
Result
True if successful
get_time_sync_status
>>> fusion.get_time_sync_status()
{u'pps': {u'signal_detected': True, u'last_time': 1506489752}, u'gps': {u'time_accuracy': 7, u'position': {u'latitude': -33.8672081, u'altitude': 93.153, u'longitude': 151.2053761}, u'fix': True, u'num_satellites': 12}}
// Request
{
"method": "get_time_sync_output",
"id": 1
}
// Response
{
"pps": {
"signal_detected": true,
"last_time": 1506489752
},
"gps": {
"time_accuracy": 7,
"position": {
"latitude": -33.8672081,
"altitude": 93.153,
"longitude": 151.2053761
},
"fix": true,
"num_satellites": 12
}
}
This method returns the details of the timesync mode currently in use on the Fusion (in the event of multiple modes used in tandem, both will be returned in the same query).
Parameters
None
Result
Based on the timesync modes selected the return value will vary.
PPS return value is as below:
Field | Type | Description |
---|---|---|
signal_detected | bool | Whether or not the Fusion has acquired a PPS signal currently or not. |
last_time | float | The last time indicated via the PPS signal. |
NTP return value is as below:
Field | Type | Description |
---|---|---|
server | string | The IP of the NTP server selected. |
poll_interval | unsigned | The interval in seconds between server polls. |
offset | double | The time offset on the NTP time. |
stratum | unsigned | The stratum the NTP server currently belongs to. |
PTP return value is as below:
Field | Type | Description |
---|---|---|
domain | unsigned | The PTP domain connected to in the network. |
clock | array | Consists of entries with corresponding interface name fields, all contain their state variable (below). |
state | string | FREERUN or otherwise indicated, dictates the status of the PTP clock. |
adev | double | The Allan deviation for the clock on the specific interface. |
master | string | The IP of the PTP master defined. |
state | string | The PTP role of the Fusion. |
offset | string | The PTP offset in the current system. |
GPS return value is as below:
Field | Type | Description |
---|---|---|
time_accuracy | unsigned | The accuracy of the GPS timing. |
position | array | The set of coordinates for the GPS signal (containing longitude, latitude and altitude values). |
longitude | double | The longitudal coordinate of the device. |
latitude | double | The latitudal coordinate of the device. |
altitude | double | The altitude coordinate of the device. |
fix | bool | The status of positional fix for the Fusion’s GPS setting. |
num_satellites | unsigned | The number of satellites found through the GPS signal. |
get_time_sync_output
>>> fusion.get_time_sync_output()
{u'pps': {u'edge': u'rising'}}
// Request
{
"method": "get_time_sync_output",
"id": 1
}
// Response
{
"result": {
"pps": {
"edge": "rising"
}
},
"id": 1
}
Parameters
None
Result
Field | Type | Description |
---|---|---|
edge | string | Either ‘rising’ or 'falling’ based on edge being used for PPS output |
set_time_sync_output_pps
>>> fusion.set_time_sync_output_pps()
True
// Request
{
"method": "set_time_sync_output_pps",
"params": {
"enable": true,
"edge": "rising"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Parameters
Field | Type | Description |
---|---|---|
enable | boolean | True to enable PPS output, False to disable |
edge | string | Either rising or failling |
Result
update_file
>>> fusion.update_file(tarball="exalink_fusion_1.1.1.tar")
True
// Request
{
"method": "update_file",
"params": {
"tarball":"exalink_fusion_1.1.1.tar"
},
"id": 1
}
This method can be used to update the ExaLINK Fusion’s firmware with a file already placed onto the Fusion via SFTP.
Parameters
Field | Type | Description |
---|---|---|
tarball | string | Filename of the tarball to be used in the update |
Result
None
update_tftp
fusion.update_tftp(server="172.16.0.160", file="exalink_fusion_1.1.1.tar")
True
// Request
{
"method": "update_tftp",
"params": {
"server":"172.16.0.160",
"file":"exalink_fusion_1.1.1.tar"
},
"id": 1
}
This method updates the Fusion from a file taken from a TFTP server.
Parameters
Field | Type | Description |
---|---|---|
server | string | Address of the device hosting the TFTP service |
file | string | Filename of the tarball on the TFTP server |
Result
None
update_usb
fusion.update_usb(tarball="exalink_fusion_1.1.1.tar")
True
// Request
{
"method": "update_usb",
"params": {
"tarball":"exalink_fusion_1.1.1.tar"
},
"id": 1
}
This method is used to update the fusion via a connected USB storage device.
Parameters
Field | Type | Description |
---|---|---|
tarball | string | Filename of the tarball on the storage device |
Result
True if successful
reboot
>>> fusion.reboot()
True
// Request
{
"method": "reboot",
"id": 1
}
This method reboots the ExaLINK Fusion
Parameters
None
Result
None
schedule_reboot
>>> fusion.schedule_reboot(after=200)
True
// Request
{
"method": "schedule_reboot",
"params": {
"after": 200
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to schedule a reboot after a number of seconds.
Parameters
Field | Type | Description |
---|---|---|
after | integer | Time (in seconds) to begin reboot sequence (starting from after receiving the call) |
Result
True if successful.
set_port_lldp
>>> fusion.set_port_lldp(port="A1", transmit=1)
True
// Request
{
"method": "set_port_lldp",
"params": {
"port": "A1",
"transmit": 1
},
"id" : 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to enable or disable transmission of LLDP frames on a specified port.
Parameters
Field | Type | Description |
---|---|---|
port | string | Name of the port to modify LLDP status on |
transmit | boolean | Set to 1 to enable LLDP frame transmission, 0 to disable |
Result
True if successful
get_port_lldp_neighbors
>>> fusion.get_port_lldp_neighbors(port="A1")
[{u'lldp': True, u'neighbors': [{u'system_name': u'fusion2', u'system_description': u'ExaLINK Fusion', u'chassis_id': [100, 63, 95, 128, 25, 128], u'port_id_subtype': 5, u'management_address': [{u'address_subtype': 1, u'interface': 0, u'interface_subtype': 1, u'address': [172, 16, 0, 152]}], u'chassis_id_subtype': 4, u'port_id': [65, 49]}], u'port': u'A2'}]
// Request
{
"method": "get_port_lldp_neighbors",
"params": "A1",
"id": 1
}
// Response
{
"result": {
"lldp": true,
"neighbors": [
{
"system_name": "fusion2",
"system_description": "ExaLINK Fusion",
"chassis_id": [
100,
63,
95,
128,
25,
128
],
"port_id_subtype": 5,
"management_address": [
{
"address_subtype": 1,
"interface": 0,
"interface_subtype": 1,
"address": [172, 16, 0, 152]
}
],
"chassis_id_subtype": 4,
"port_id": [
65,
49
]
}
]
},
"port": "A2",
"id": 1
}
This method returns the LLDP entries for the port from the Fusion’s LLDP agent.
Parameters
Field | Type | Description |
---|---|---|
port | string | The port to request LLDP information from |
Results
Field | Type | Description |
---|---|---|
port | string | Port the following information references |
lldp | boolean | True if LLDP is set to transmit |
mgmt_addr | array | See below |
neighbor | array | See below |
The management address field contains some or all of the following values:
Field | Type | Description |
---|---|---|
address_subtype | number | Value determines the format of the address field (MAC address or otherwise) |
address | string | The address based on the substype |
interface_subtype | number | The type of description of the management interface |
interface | string | The name of the interface, based on the interface_subtype |
oid | number | The OID of the system |
A neighbor in the Fusion’s LLDP agent will be returned with some or all of these fields:
Field | Type | Description |
---|---|---|
chassis_id_subtype | number | The category of chassis ID used in the LLDP entry |
chassis_id | string | Corresponding string to the subtype of ID being provided |
port_id | string | Name of the port connected to the neightbor |
port_description | string | Description of the port connected to the neighbor |
system_name | string | Name of the neighbor system |
system_description | string | Description of the neighbor system |
system_capabilities | string | All the capabilities of a neighbor system |
enabled_capabilities | string | Capabilities of the neighbor currently enabled |
management_address | string | Address of the neighbor |
get_license
>>> fusion.get_license()
{u'serial': u'EXAFSN-A-00198', u'support_end': 1577836800, u'features': [u'switch'], u'expiry': 1577836800}
// Request
{
"method": "get_license",
"id": 1
}
// Response
{
"result": {
"serial": "EXAFSN-A-00198",
"support_end": 1577836800,
"features": ["switch"],
"expiry": 1577836800
},
"id": 1
}
This method gets the licensed features and serial number of the Fusion.
Parameters
None
Result
Field | Type | Description |
---|---|---|
serial | string | The serial number of the Fusion being queried |
support_end | integer | The date support for this Fusion will end, as a Unix timestamp in seconds |
features | array | A set of strings detailing the licensed features on the Fusion. |
expiry | integer | The date any features being evaluated will end, as a Unix timestamp in seconds |
set_license
>>> fusion.set_license("license_string")
True
// Request
{
"method": "set_license",
"params": ["my_license_key_here"],
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to set the license of the Fusion
Parameters
Field | Type | Description |
---|---|---|
key | string | The license key to be given to the Fusion |
Result
True if successful.
get_running_config
>>> fusion.get_running_config("patch")
{u'version': 1, u'patch': [[u'B1', u'C15'], [u'B2', u'Y9'], [u'B3', u'C5'], [u'B5', u'C13']]}
// Request
{
"method": "get_running_config",
"params": "patch",
"id": 1
}
// Response
{
"patch": [
[
"B1",
"C15"
],
[
"B2",
"Y9"
],
[
"B3",
"C5"
],
[
"B5",
"C13"
]
],
"id": 1
}
This method returns information from the specified part of the running configuration.
Parameters
Field | Type | Description |
---|---|---|
category | string | The specific aspect of the running configuration to obtain information for. |
Available categories: mgmt_net, session, users, roles, ports, patch, tap, module, switch, mux, mirror, time, service, tacacs
Result
The result format is based on the argument provided to the method, consult other sections for sections like TACACS or Modules.
get_startup_config
>>> fusion.get_startup_config("patch")
{u'version': 1, u'patch': [[u'B1', u'C15'], [u'B2', u'Y9'], [u'B3', u'C5'], [u'B5', u'C13']]}
// Request
{
"method": "get_startup_config",
"params": "patch",
"id": 1
}
// Response
{
"patch": [
[
"B1",
"C15"
],
[
"B2",
"Y9"
],
[
"B3",
"C5"
],
[
"B5",
"C13"
]
],
"id": 1
}
This method returns information from the specified part of the startup configuration.
Parameters
Field | Type | Description |
---|---|---|
category | string | The specific aspect of the running configuration to obtain information for. |
Available categories: mgmt_net, session, users, roles, ports, patch, tap, module, switch, mux, mirror, time, service, tacacs
Result
The result format is based on the argument provided to the method, consult other sections for sections like TACACS or Modules.
erase_running_config
>>> fusion.erase_running_config(all=False, management=False, module=False, data_plane=True)
True
// Request
{
"method": "erase_running_config",
"params": {
"all": false,
"management": false,
"data_plane": true,
"module": false
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method erases parts of the running configuration based on the arguments specified
Parameters
Field | Type | Description |
---|---|---|
all | boolean | True to erase all configuration on the Fusion, False to not erase. |
management | boolean | True to erase all settings related to accessing the management interface, False to not erase. |
data_plane | boolean | True to erase all settings related to object configuration, False to not erase. |
module | boolean | True to erase all settings related to an internal module, False to not erase. |
Result
True if successful.
erase_startup_config
>>> fusion.erase_startup_config()
True
// Request
{
"method": "erase_startup_config",
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method will erase the startup configuration, restoring it to default settings. Unlike erase_running_config(), this will erase all of the config without needing to specify.
Parameters
None
Result
True if successful
load_startup_config
>>> fusion.load_startup_config()
True
// Request
{
"method": "load_startup_config",
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method will copy the current startup configuration to the running configuration. Note: This will reload the network settings, please wait some time before calling anymore methods.
Parameters
None
Result
True if successful
save_startup_config
>>> fusion.save_startup_config()
True
// Request
{
"method": "save_startup_config",
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method will copy the current running configuration to the starting configuration.
Parameters
None
Result
True if sucessful
Diagnostics and Logging
read_current_sensors
>>> fusion.read_current_sensors()
{u'line_card_a': {u'current': 0.43359375, u'voltage': 12.1875}, u'line_card_c': {u'current': 0, u'voltage': 12.265625}, u'line_card_b': {u'current': 0.6171875, u'voltage': 12.1875}, u'module_y': {u'current': 0, u'voltage': 12.265625}, u'module_x': {u'current': 2.5078125, u'voltage': 12.1875}}
// Request
{
"method": "read_current_sensors",
"id": 1
}
// Response
{
"result": {
"line_card_a": {
"current": 0.4609375,
"voltage": 12.1875
},
"line_card_c": {
"current": 0.44140625,
"voltage": 12.2265625
},
"line_card_b": {
"current": 0.97265625,
"voltage": 12.1484375
},
"module_y": {
"current": 0,
"voltage": 12.2265625
},
"module_x": {
"current": 2.73046875,
"voltage": 12.1875
}
},
"id": 1
}
This method can be used to return the reading from various voltage and current sensors within the ExaLINK Fusion.
Parameters
None
Result
This will return an array of devices that are connected to the Fusion, their fields are as below:
Field | Type | Description |
---|---|---|
current | number | The current being drawn by the device |
voltage | number | The voltage read at the device |
read_power_supplies
>>> fusion.read_power_supplies()
{u'psu_0': {u'pin': 105, u'vout': 12.171875, u'pout': 97, u'iout': 8.125, u'vin': 239, u'temp_2': 31.5, u'model': u'DS460', u'iin': 0.4375, u'temp_1': 25.5, u'present': True, u'manufacturer': u'EMERSON'}, u'psu_1': {u'pin': 0, u'vout': 0, u'pout': 0, u'iout': 0, u'vin': 0, u'temp_2': 30.5, u'model': u'DS460', u'iin': 0, u'temp_1': 29, u'present': True, u'manufacturer': u'EMERSON'}}
// Request
{
"method": "read_power_supplies",
"id": 1
}
// Response
{
"result": {
"psu_0": {
"pin": 85,
"vout": 12.234375,
"pout": 67,
"iout": 5.875,
"vin": 217.5,
"temp_2": 31.5,
"model": "DS460",
"iin": 0.390625,
"temp_1": 25,
"present": true,
"manufacturer": "EMERSON"
},
"psu_1": {
"pin": 0,
"vout": 0,
"pout": 0,
"iout": 0,
"vin": 0,
"temp_2": 24.5,
"model": "DS460",
"iin": 0,
"temp_1": 23.5,
"present": true,
"manufacturer": "EMERSON"
}
},
"id": 1
}
This method can be used to query status information from the Power Supplies
Parameters
None
Result
This method returns two sets of results for both power supply slots in the Fusion.
Field | Type | Description |
---|---|---|
pin | number | Input power drawn by the power supply |
vout | number | Output voltage from the power supply |
pout | number | Output power from the power supply |
iout | number | Output current from the power supply |
vin | number | Input voltage to the power supply |
temp_2 | number | Internal temperature of the power supply |
model | string | Model number of the power supply |
iin | number | Input current drawn by the power supply |
temp_1 | number | External temperature of the power supply |
present | boolean | True if power supply has been plugged into the appropriate slot |
manufacturer | string | Manufacturer of the power supply |
read_temperature_sensors
>>> fusion.read_temperature_sensors()
{u'crosspoint': [39.50, 40.41, 38.67, 37.8], u'module_x': [36, 41], u'mainboard': [29.625, 33], u'line_card_a': [37.4], u'line_card_c': [35.1], u'line_card_b': [31.6]}
// Request
{
"method": "read_temperature_sensors",
"id": 1
}
// Response
{
"result": {
"crosspoint": [39.50, 40.41, 38.67, 37.8],
"module_x": [37, 41],
"mainboard": [29.625, 33],
"line_card_a": [37.4],
"line_card_c": [35.1],
"line_card_b": [31.6]
},
"id": 1
}
This method can be used to query the various temperature sensors within the ExaLINK Fusion
Parameters
None
Result
This returns an array of devices in the Fusion, each with their temperature reading. NB some devices have multiple sensors.
read_fan_speeds
>>> fusion.read_fan_speeds()
{u'fan_3': 7108, u'fan_2': 7113, u'fan_1': 7155, u'fan_0': 7199}
// Request
{
"method": "read_fan_speeds",
"id": 1
}
// Response
{
"result": {
"fan_3": 7108,
"fan_2": 7113,
"fan_1": 7155,
"fan_0": 7199
},
"id": 1
}
This method can be used to query the speed of the fan modules installed in the ExaLINK Fusion
Parameters
None
Result
Returns a list of the four fans and their RPM.
get_port_latency_histogram
>>> fusion.get_port_latency_histogram(port="B1", interval=1)
// Request
{
"method": "get_port_latency_histogram",
"params": {
"interval": 1,
"port": "B1"
},
"id": 1
}
// Response
{
"result": {
"port": "B1",
"data": [
[
[ 81, 86.714285714285708 ],
3722813
]
]
},
"id": 1
}
Obtain a tabulated set of histogram data of latency for a specific port.
Parameters
Field | Type | Description |
---|---|---|
port | string | The port to obtain latency statistics for |
interval | integer | Class width of the histogram to obtain |
Result
An array of sets of data, representing the percentile, latency number and packet count.
set_tacacs_servers
>>> fusion.set_tacacs_servers("172.16.0.13")
0
// Request
{
"method": "set_tacacs_servers",
"params": ["172.16.0.13"],
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to set the server the TACACS is being hosted on.
Parameters
Field | Type | Description |
---|---|---|
server | string | The IP address of the TACACS server |
Result
0
if successful.
set_tacacs_secret
>>> fusion.set_tacacs_secret("asdasdasdasd")
0
// Request
{
"method": "set_tacacs_secret",
"params": ["asdasdasdasd"],
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to set the TACACS secret key to be used on the Fusion.
Parameters
Field | Type | Description |
---|---|---|
secret | string | Key to be used to try and access the TACACS server |
Result
0
if succesfully set the key on the Fusion
set_tacacs_accounting
>>> fusion.set_tacacs_accounting()
0
// Request
{
"method": "set_tacacs_accounting",
"params": ["verbose"],
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to set the SNMP field
Parameters
Field | Type | Description |
---|---|---|
mode | string | The level of logging to be used on the TACACS server (disabled , standard , verbose ) |
Result
0
if successful.
set_tacacs_timeout
>>> fusion.set_tacacs_timeout(100.0)
0
// Request
{
"method": "set_tacacs_timeout",
"params": [100.0],
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to set the TACACS request timeout.
Parameters
Field | Type | Description |
---|---|---|
timeout | float | Number (in seconds) for TACACS request timeouts (limited to 1 decimal place) |
Result
0
if successful.
set_tacacs_periodic
>>> fusion.set_tacacs_periodic(120)
0
// Request
{
"method": "set_tacacs_periodic",
"params": [120],
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to set the time between periodic permission checking with the TACACS server and Fusion.
Parameters
Field | Type | Description |
---|---|---|
time | integer | Time (in seconds) between regular checking of user permissions with the TACACS server and Fusion |
Result
0
if successful.
set_snmp_location
>>> fusion.set_snmp_location("Server room")
0
// Request
{
"method": "set_snmp_location",
"params": ["Server room"],
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to set the SNMP field
Parameters
Field | Type | Description |
---|---|---|
location | string | Name to be used in the SNMP Location field. |
Result
0
if successful.
set_snmp_contact
>>> fusion.set_snmp_contact("Admin")
0
// Request
{
"method": "set_snmp_contact",
"params": ["Admin"],
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to set the SNMP Contact field
Parameters
Field | Type | Description |
---|---|---|
contact | string | Name to be used in the SNMP Contact field. |
Result
0
if successful
set_snmp_read_community
>>> fusion.set_snmp_read_community("test-community")
0
// Request
{
"method": "set_snmp_read_community",
"params": "test-community",
"id": 1
}
// Response
{
"result": "0",
"id": 1
}
Use this to set the community name to be used in the Fusion’s SNMP setting.
Parameters
Field | Type | Description |
---|---|---|
community | string | Name of the community name to be used in the SNMP setting. |
Result
0 if successful.
set_snmp_port
>>> fusion.set_snmp_port()
0
// Request
{
"method": "set_snmp_port",
"params": ["161"],
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
Parameters
Field | Type | Description |
---|---|---|
port | integer | Port number to communicate with the SNMP destination on |
Result
0
if successful
enable_service_tacacs
>>> fusion.enable_service_tacacs()
0
// Request
{
"method": "enable_service_tacacs",
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to enable TACACS on the Fusion.
Parameters
None
Result
0
if successful.
enable_service_snmp
>>> fusion.enable_service_snmp()
0
// Request
{
"method": "enable_service_snmp",
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to enable SNMP on the Fusion.
Parameters
None
Result
0
if successful.
enable_service_snmptrap
>>> fusion.enable_service_snmptrap()
0
// Request
{
"method": "enable_service_snmptrap",
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method is used to enable SNMP traps targetting configured hosts.
Parameters
None
Result
0
if successful
disable_service_tacacs
>>> fusion.disable_service_tacacs()
0
// Request
{
"method": "disable_service_tacacs",
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method disables TACACS on the Fusion (reverting to internal authentication).
Parameters
None
Result
0
if successful.
disable_service_snmp
>>> fusion.disable_service_snmp()
0
// Request
{
"method": "disable_service_snmp",
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method disables SNMP on the Fusion.
Parameters
None
Result
0
if successful.
disable_service_snmptrap
>>> fusion.disable_service_snmptrap()
0
// Request
{
"method": "disable_service_snmptrap",
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
This method disables SNMP Traps on the Fusion.
Parameters
None
Result
0
if successful.
get_service_snmp
>>> fusion.get_service_snmp()
0
// Request
{
"method": "get_service_snmp",
"id": 1
}
// Response
{
"result": {
"service": "snmp",
"enabled": true
},
"id": 1
}
This method is used to determine the status of SNMP on the Fusion.
Parameters
None
Result
Field | Type | Description |
---|---|---|
service | string | Name of the service (i.e. SNMP) |
enabled | boolean | True if enabled, False if not |
set_snmptrap_target
>>> fusion.set_snmptrap_target()
0
// Request
{
"method": "set_snmptrap_target",
"params": {
"community": "public",
"address": "172.16.0.229"
},
"id": 1
}
// Response
{
"result": 0,
"id": 1
}
Parameters
Field | Type | Description |
---|---|---|
community | string | Name of the community to be used for SNMP traps |
address | string | The IP address to target for SNMP traps |
Result
0
if successful.
get_snmptrap_config
>>> fusion.get_snmptrap_config()
{u'to': [{u'community': u'public', u'address': u'172.16.0.220'}, {u'community': u'private-ro', u'address': u'172.16.0.121'}, {u'community': u'public', u'address': u'172.16.0.229'}, {u'community': u'public', u'address': u'172.16.0.229'}, {u'community': u'public', u'address': u'172.16.0.229'}], u'enabled': True}
// Request
{
"method": "get_snmptrap_config",
"id": 1
}
// Response
{
"result": {
"to":
[
{
"address": "172.16.0.220",
"community": "public"
},
{
"address": "172.16.0.121",
"community": "private-ro"
},
{
"address": "172.16.0.229",
"community": "public"
}
],
"enabled": true },
"id": 1
}
Get current SNMP Trap configuration.
Parameters
None
Result
Field | Type | Description |
---|---|---|
to | object | An array containing entries that consist of address and community (if present) |
address | string | The IP address targetted for SNMP traps |
community | string | The community being used on the host |
get_messages
>>> fusion.get_messages()
{u'warning': [], u'error': []}
// Request
{
"method": "get_messages",
"id": 1
}
// Response
{
"result": {
"error": [ ],
"warning": [ ]
},
"id": 1
}
Get a list of error and warning messages from the Fusion.
Parameters
Result
Field | Type | Description |
---|---|---|
error | string | Any messages pertaining to any errors having occurred on the Fusion. |
warning | string | Any messages pertaining to any warnings generated by the Fusion. |
get_switch_stats
>>> fusion.get_switch_stats()
{u'used_memory': 0}
// Request
{
"method": "get_switch_stats",
"id": 1
}
// Response
{
"result": {
"used_memory": 0
},
"id": 1
}
Get switch statistics from the Fusion.
Parameters
None
Result
Field | Type | Description |
---|---|---|
used_memory | integer | Packet buffer memory usage (Fusion HPT only) |
debug_dump
>>> fusion.debug_dump()
debug/debug_info_20161021T032122.tar.gz
// Request
{
"method": "debug_dump",
"id": 1
}
// Response
{
"result": "debug\/debug_info_20161021T032122.tar.gz",
"id": 1
}
This method generates a debug file on the Fusion that can be retrieved via SFTP.
Parameters
None
Result
The name and path to the debug file on the Fusion.
Port Status and Configuration
get_ports
>>> fusion.get_ports("A1")
[{u'data_rate': u'ethernet_10g', u'name': u'A1', u'sfp_type': u'auto', u'enabled': False, u'alias': u'myalias', u'address': u'643F5F000000', u'has_signal': True, u'autoneg': True, u'present': True, u'description': u''}]
>>>
>>>
>>> fusion.get_ports("A10","A11","B16")
[{u'lldp_transmit': False, u'data_rate': u'ethernet_10g', u'description': u'', u'in_use': False, u'sfp_type': u'auto', u'enabled': True, u'alias': u'', u'address': u'643F5F801999', u'has_signal': False, u'autoneg': True, u'present': False, u'name': u'A10'}, {u'lldp_transmit': False, u'data_rate': u'ethernet_10g', u'description': u'', u'in_use': False, u'sfp_type': u'auto', u'enabled': True, u'alias': u'', u'address': u'643F5F80199A', u'has_signal': False, u'autoneg': True, u'present': False, u'name': u'A11'}, {u'lldp_transmit': False, u'data_rate': u'ethernet_10g', u'description': u'', u'in_use': False, u'sfp_type': u'auto', u'enabled': True, u'alias': u'', u'address': u'643F5F8019AF', u'has_signal': True, u'autoneg': True, u'present': True, u'name': u'B16'}]
// Request
{
"method": "get_ports",
"params": [
"A1"
],
"id": 1
}
// Response
{
"result": [
{
"data_rate": "ethernet_10g",
"name": "A1",
"sfp_type": "auto",
"enabled": false,
"alias": "myalias",
"address": "643F5F000000",
"has_signal": false,
"autoneg": true,
"present": false,
"description": ""
}
],
"id": 1
}
This method can be used to get status information for one or more ports
Parameters
This method can be provided with a list of port names as an array of strings. If no parameters are provided, information is returned for all ports.
Result
This method returns an array of objects with the following fields:
Field | Type | Description |
---|---|---|
name | string | The name of the port the data is being returned for |
alias | string | The alias of the port |
address | string | The MAC address of the port(s) being requested |
description | string | The description of the port |
data_rate | string | Port data rate, either ethernet_10g or ethernet_1g |
sfp_type | string | Configured SFP type, either auto or active or passive |
enabled | boolean | True if the port is enabled |
autoneg | boolean | True if autonegotiation is enabled on the port |
present | boolean | True if the SFP is present |
has_signal | boolean | True if the SFP is not reporting loss-of-signal |
in_use | boolean | True if the port is in use in the current configuration |
set_port_alias
>>> fusion.set_port_alias(port="A1",alias="myalias")
True
// Request
{
"method": "set_port_alias",
"params": {
"port": "A1",
"alias": "myalias"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method can be used to set the alias for a port. The alias can be used on the ExaLINK Fusion command line to identify the port in place of the port name.
Note that the alias cannot be used to identify the port in API calls.
Parameters
Field | Type | Description |
---|---|---|
port | string | The port you wish to set the alias for, in Exablaze standard format, eg A1 |
alias | string | The alias you wish to use for this port. Note only the alias can only consist of A-Z, a-z, 0-9, - and _ characters. An alias must not be a normal port name (eg A1 ). It must also not be a number, or a number with a single letter prefix and/or suffix |
Result
True if successful
set_port_description
>>> fusion.set_port_description(port="A1",description="A verbose description of this port")
True
// Request
{
"method": "set_port_description",
"params": {
"port": "A1",
"description": "a verbose description of this port"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method can be used to set a description associated with a particular port.
Parameters
Field | Type | Description |
---|---|---|
port | string | The port you wish to set the description for, in Exablaze standard format, eg A1 |
description | string | The description you wish to set for this port |
Result
True if successful
get_port_sfp_info
>>> fusion.get_port_sfp_info(port="B1")
{u'vendor_pn': u'BN-CKM-SP-SR', u'date_code': u'120717', u'vendor_oui': [0, 23, 106], u'serial_encoding': 6, u'vendor_sn': u'AD1229A0112', u'nominal_bit_rate': 10300, u'connector_type': 7, u'vendor_rev': u'G2.3', u'wavelength': 850, u'vendor_name': u'Blade Network', u'port': u'B1', u'transceiver_code': [16, 0, 0, 0, 0, 0, 0, 0]}
// Request
{
"method": "get_port_sfp_info",
"params": {
"port": "B1"
},
"id": 1
}
// Response
{
"result": {
"vendor_pn": "BN-CKM-SP-SR",
"date_code": "120717",
"vendor_oui": [
0,
23,
106
],
"serial_encoding": 6,
"vendor_sn": "AD1229A0112",
"nominal_bit_rate": 10300,
"connector_type": 7,
"vendor_rev": "G2.3",
"wavelength": 850,
"vendor_name": "Blade Network",
"port": "B1",
"transceiver_code": [
16,
0,
0,
0,
0,
0,
0,
0
]
},
"id": 1
}
This method can be used to query the diagnostic interface on a SFP. The fields in the returned data closely follow the fields as defined in the SFP MSA. Please refer to the SFP MSA Specification for further details.
Parameters
Field | Type | Description |
---|---|---|
port | string | The name of the port to be queried |
Result
Field | Type | Description |
---|---|---|
port | string | Port name |
vendor_oui | array | SFP vendor IEEE company identifier, as an array of 3 bytes |
vendor_name | string | SFP vendor name |
vendor_pn | string | Part number provided by SFP vendor |
vendor_rev | string | Revision level provided by SFP vendor |
connector_type | integer | Connector type code provided by SFP |
transceiver_code | array | Transceiver code provided by SFP |
serial_encoding | integer | Serial encoding used by SFP |
nominal_bit_rate | integer | Nominal bit rate reported by SFP |
wavelength | integer | Laser wavelength reported by SFP |
get_port_sfp_diagnostics
>>> fusion.get_port_sfp_diagnostics(port="A1")
{u'vcc': 3.2734, u'temperature': 34.81640625, u'tx_bias': 3.791, u'tx_power': 0.6558, u'rx_power': 0.641, u'port': u'A1'}
// Request
{
"method": "get_port_sfp_diagnostics",
"params": {
"port": "A1"
},
"id": 1
}
// Response
{
"result": {
"vcc": 3.2734,
"temperature": 34.81640625,
"tx_bias": 3.791,
"tx_power": 0.6558,
"rx_power": 0.641,
"port": "A1"
},
"id": 1
}
This method returns diagnostic information retreived from a SFP inserted into a port.
Parameters
Field | Type | Description |
---|---|---|
Port | string | The name of the port to be queried |
Result
Field | Type | Description |
---|---|---|
port | string | Port name |
temperature | number | Temperature (degC) |
vcc | number | Supply voltage (V) |
tx_bias | number | Measured TX bias current (mA) |
tx_power | number | Measured TX output power (mW) |
rx_power | number | Measured RX input power (mW) |
set_port_data_rate
>>> fusion.set_port_data_rate(port="A1", data_rate="ethernet_1g")
True
>>> fusion.set_port_data_rate(port="V1A", data_rate="ethernet_10g")
True
// Request
{
"method": "set_port_data_rate",
"params": {
"port":"A1",
"data_rate":"ethernet_1g"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method can be used to configure the data rate that a port should operate at.
Parameters
Field | Type | Description |
---|---|---|
port | string | The name of the port you wish to retrieve SFP status info for |
data_rate | string | The data rate you wish the port to operate at: ethernet_10g or ethernet_1g |
Result
True if successful
get_port_stats
>>> fusion.get_port_stats("A1")
{u'rx_128_255b': 3653009, u'tx_64b': 0, u'tx_256_511b': 0, u'rx_65_127b': 1713621, u'rx_256_511b': 7307595, u'rx_link_changes': 0, u'tx_multicast': 0, u'port': u'A1', u'tx_512_1023b': 0, u'rx_multicast': 0, u'rx_1024_1518b': 14123282, u'rx_link': True, u'tx_1519_1522b': 0, u'rx_runt': 0, u'tx_packets': 0, u'lldp_rx': True, u'rx_packets': 41411108, u'rx_unicast': 0, u'rx_1519_1522b': 0, u'tx_128_255b': 0, u'rx_broadcast': 41411108, u'tx_bytes': 0, u'rx_dropped': 13669377, u'tx_unicast': 0, u'rx_bytes': 32835757254, u'tx_errors': 0, u'rx_64b': 0, u'rx_pause': 0, u'rx_512_1023b': 14613601, u'tx_broadcast': 0, u'rx_errors': 0, u'tx_1024_1518b': 0, u'tx_65_127b': 0}
>>>
>>>
>>> fusion.get_port_stats("B2", "B1")
[{u'rx_128_255b': 3653009, u'tx_64b': 0, u'tx_256_511b': 0, u'rx_65_127b': 1713621, u'rx_256_511b': 7307595, u'rx_link_changes': 0, u'tx_multicast': 0, u'port': u'B1', u'tx_512_1023b': 0, u'rx_multicast': 0, u'rx_1024_1518b': 14123282, u'rx_link': True, u'tx_1519_1522b': 0, u'rx_runt': 0, u'tx_packets': 0, u'lldp_rx': True, u'rx_packets': 41411108, u'rx_unicast': 0, u'rx_1519_1522b': 0, u'tx_128_255b': 0, u'rx_broadcast': 41411108, u'tx_bytes': 0, u'rx_dropped': 13669377, u'tx_unicast': 0, u'rx_bytes': 32835757254, u'tx_errors': 0, u'rx_64b': 0, u'rx_pause': 0, u'rx_512_1023b': 14613601, u'tx_broadcast': 0, u'rx_errors': 0, u'tx_1024_1518b': 0, u'tx_65_127b': 0}, {u'rx_128_255b': 0, u'tx_64b': 0, u'tx_256_511b': 22949296, u'rx_65_127b': 1110, u'rx_256_511b': 530, u'rx_link_changes': 0, u'tx_multicast': 0, u'port': u'B2', u'tx_512_1023b': 45979983, u'rx_multicast': 1110, u'rx_1024_1518b': 0, u'rx_link': True, u'tx_1519_1522b': 378861, u'rx_runt': 0, u'tx_packets': 131227642, u'rx_packets': 1640, u'rx_unicast': 0, u'rx_1519_1522b': 0, u'tx_128_255b': 11461092, u'rx_broadcast': 530, u'tx_bytes': 106789190969, u'rx_dropped': 0, u'tx_unicast': 0, u'rx_bytes': 277952, u'tx_errors': 0, u'rx_64b': 0, u'rx_pause': 0, u'rx_512_1023b': 0, u'tx_broadcast': 131227642, u'rx_errors': 0, u'tx_1024_1518b': 45373309, u'tx_65_127b': 3946960}]
// Request
{
"method":"get_port_stats",
"params": [
"B2", "B1"
],
"id": 1
}
// Response
{
"result": [
{
"port":"B1",
"rx_link":true,
"rx_link_changes":0,
"lldp_rx":true,
"rx_packets":41411108,
"rx_unicast":0,
"rx_multicast":0,
"rx_broadcast":41411108,
"rx_64b":0,
"rx_65_127b":1713621,
"rx_128_255b":3653009,
"rx_256_511b":7307595,
"rx_512_1023b":14613601,
"rx_1024_1518b":14123282,
"rx_1519_1522b":0,
"rx_bytes":32835757254,
"rx_errors":0,
"rx_dropped":13669377,
"rx_runt":0,
"rx_pause":0,
"tx_packets":0,
"tx_unicast":0,
"tx_multicast":0,
"tx_broadcast":0,
"tx_64b":0,
"tx_65_127b":0,
"tx_128_255b":0,
"tx_256_511b":0,
"tx_512_1023b":0,
"tx_1024_1518b":0,
"tx_1519_1522b":0,
"tx_bytes":0,
"tx_errors":0
},
{
"port":"B2",
"rx_link":true,
"rx_link_changes":0,
"lldp_rx":true,
"rx_packets":1640,
"rx_unicast":0,
"rx_multicast":1110,
"rx_broadcast":530,
"rx_64b":0,
"rx_65_127b":1110,
"rx_128_255b":0,
"rx_256_511b":530,
"rx_512_1023b":0,
"rx_1024_1518b":0,
"rx_1519_1522b":0,
"rx_bytes":277952,
"rx_errors":0,
"rx_dropped":0,
"rx_runt":0,
"rx_pause":0,
"tx_packets":131227642,
"tx_unicast":0,
"tx_multicast":0,
"tx_broadcast":131227642,
"tx_64b":0,
"tx_65_127b":3946960,
"tx_128_255b":11461092,
"tx_256_511b":22949296,
"tx_512_1023b":45979983,
"tx_1024_1518b":45373309,
"tx_1519_1522b":378861,
"tx_bytes":106789190969,
"tx_errors":0
}
]
}
This method obtains the port statistics from a specific port.
Parameters
This method can be provided with a list of port names as an array of strings.
Results
field | type | description |
---|---|---|
port | string | Port name |
rx_link | boolean | True if port has link with another interface |
rx_link_changes | number | Counter of times rx_link has changed state |
lldp_rx | boolean | True if LLDP traffic is received on this port |
rx_packets | number | Number of packets received on the port |
rx_unicast | number | Number of unicast packets received on the port |
rx_multicast | number | Number of multicast packets recevied on the port |
rx_broadcast | number | Number of broadcast packets recevied on the port |
rx_64b | number | Number of 64b frames received on the port |
rx_65_127b | number | Number of 65-127b frames received on the port |
rx_128_255b | number | Number of 128-255b frames received on the port |
rx_256_511b | number | Number of 256-511b frames received on the port |
rx_512_1023b | number | Number of 512-1023b frames received on the port |
rx_1024_1518b | number | Number of 1024-1518b frames received on the port |
rx_1519-1522b | number | Number of 1519-1522b frames received on the port |
rx_bytes | number | Raw number of bytes received on the port |
rx_errors | number | Number of corrupt packets received on the port |
rx_dropped | number | Number of packets dropped by the port |
rx_runt | number | Number of runt frames received on the port |
rx_pause | number | Number of pause frames received on the port |
tx_packets | number | Number of packets sent by the port |
tx_unicast | number | Number of unicast packets sent by the port |
tx_multicast | number | Number of multicast packets sent by the port |
tx_broadcast | number | Number of broadcast packets sent by the port |
tx_64b | number | Number of 64b frames sent by the port |
tx_65_127b | number | Number of 65-127b frames sent by the port |
tx_128_255b | number | Number of 128-255b frames sent by the port |
tx_256_511b | number | Number of 256-511b frames sent by the port |
tx_512_1023b | number | Number of 512-1023b frames sent by the port |
tx_1024_1518b | number | Number of 1024-1518b frames sent by the port |
tx_1519_1522b | number | Number of 1519-1522b frames sent by the port |
tx_bytes | number | Raw number of bytes sent by the port |
tx_errors | number | Number of corrupt packets sent by the port |
All fields are optional. A field will be omitted if the statistic is not available for the port.
Note when querying the stats of multiple ports will return an array consisting of entries in this format. Order of the entries is dependant on the order given when calling get_port_stats().
create_virtual_port
>>> fusion.create_virtual_port(name="V1")
True
// Request
{
"method":"create_virtual_port",
"params": {
"name":"V1"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method creates a virtual port with a specified name. Note that if the virtual port is going to be used in a switch, mux or mirror object, the data rate must be set using the set_port_data_rate
function.
Parameters
Field | Type | Description |
---|---|---|
name | string | The name of the virtual port to be created |
Result
True if successful
delete_virtual_port
>>> fusion.create_virtual_port(name="V1")
True
// Request
{
"method":"delete_virtual_port",
"params": {
"name":"V1"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to delete a specified virtual port. Note: The virtual port must be removed from all network objects before this can be used.
Parameters
Field | Type | Description |
---|---|---|
name | string | The name of the virtual port to be deleted |
Result
True if successful
get_virtual_ports
>>> fusion.get_virtual_ports()
[{u'alias': u'', u'data_rate': u'ethernet_10g', u'name': u'V1A', u'description': u''}, {u'alias': u'', u'data_rate': u'ethernet_10g', u'name': u'V1B', u'description': u''}, {u'alias': u'', u'data_rate': u'ethernet_10g', u'name': u'V2A', u'description': u''}, {u'alias': u'', u'data_rate': u'ethernet_10g', u'name': u'V2B', u'description': u''}]
// Request
{
"method":"get_virtual_port",
"id": 1
}
// Response
{
"result": [
{
"alias": "",
"data_rate": "ethernet_10g",
"name": "V1A",
"description": ""
},
{
"alias": "",
"data_rate": "ethernet_10g",
"name": "V1B",
"description": ""
},
{
"alias": "",
"data_rate": "ethernet_10g",
"name": "V2A",
"description": ""
},
{
"alias": "",
"data_rate": "ethernet_10g",
"name": "V2B",
"description": ""
}
],
"id": 1
}
This method is used to see all current virtual ports and the descriptions for them
Parameters
None
Result
Each virtual port entry consists of the following fields:
Field | Type | Description |
---|---|---|
alias | string | The alias assigned to the virtual port |
data_rate | string | The data rate of the virtual port, either ethernet_10g or ethernet_1g |
name | string | The name of the virtual port given when it was created |
description | string | The description assigned to the virtual port |
set_port_enable
>>> fusion.set_port_enable(port="A1", enable=0)
True
// Request
{
"method":"set_port_enable",
"params": {
"port":"A1",
"enable":0
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method can be used to enable or disable a port. Disabled ports remain members of any objects they were part of (for example a downstream port in a mux object), however the receiver and transmitter within that port are disabled.
Parameters
Field | Type | Description |
---|---|---|
port | string | The port name to set the state of |
enable | boolean | True if the port should be enabled |
Result
True if successful
reset_port_stats
>>> fusion.reset_port_stats("A1")
True
// Request
{
"method":"reset_port_stats",
"params":"A1",
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is to reset all packet statistics on a port to zero.
Parameters
Field | Type | Description |
---|---|---|
port | string | The port name to reset |
Result
True if successful
Patches and Taps
create_patch
>>> fusion.create_patch(ports=["A10","C1"])
true
// Request
{
"method":"create_patch",
"params": {
"ports": ["A10", "C1"]
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Create a new patch between two ports.
Parameters
field | type | description |
---|---|---|
ports | array | The pair of ports to be patched. This must be an array of 2 |
elements.
Result
True if successful
delete_patch
>>> fusion.delete_patch(ports=["A10","C1"])
True
// Request
{
"method":"delete_patch",
"params": {
"ports": ["A10", "C1"]
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Remove an existing patch between two ports.
Parameters
Field | Type | Description |
---|---|---|
ports | array | The ports of an existing patch |
Result
True if successful
get_patch
>>> fusion.get_patch()
[[u'A10', u'C1']]
// Request
{
"method": "get_patch",
"id": 1
}
// Response
{
"result": [
[
"A10",
"C1"
]
],
"id": 1
}
Get the list of currently configured patches.
Parameters
None
Result
A list of the currently active patches.
create_tap
>>> fusion.create_tap(port="A16", src_port="A10", direction="output")
True
// Request
{
"method": "create_tap",
"params": {
"port":"A16",
"src_port": "A10",
"direction": "output"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Create a tap on a port.
A tap replicates data flow at layer 1 and sends it out another port. The data flow on the tapped port is not disturbed.
Parameters
Field | Type | Description |
---|---|---|
port | string | Output port for tapped data |
src_port | string | Port to be tapped |
direction | string | Data direction to be tapped, either input or output |
Result
True if successful
delete_tap
>>> fusion.delete_tap(port="A16", src_port="A10", direction="output")
True
// Request
{
"method": "delete_tap",
"params": {
"port":"A16",
"src_port": "A10",
"direction": "output"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Remove an existing tap on a port.
Parameters
Field | Type | Description |
---|---|---|
port | string | Output port of the tap |
src_port | string | Tapped port |
direction | string | Data direction of the tap, either input or output |
Result
True if successful
get_tap
>>> fusion.get_tap()
[{u'direction': u'output', u'src_port': u'A10', u'port': u'A16'}]
// Request
{
"method": "get_tap",
"id": 1
}
// Response
{
"result": [
{ "direction":"output", "src_port":"A10", "port":"A16" }
],
"id": 1
}
Get the list of currently configured taps.
Result
This method returns an array of objects with the following fields:
Field | Type | Description |
---|---|---|
port | string | Output port of the tap |
src_port | string | Tapped port |
direction | string | Data direction of the tap, either input or output |
Switches and Muxes
get_object
>>> fusion.get_object()
[{u'object': {u'type': u'switch', u'name': u'my_switch'}, u'ports': [{u'port': u'A1'}, {u'port': u'A2'}, {u'port': u'A3'}, {u'port': u'A4'}]}, {u'object': {u'type': u'mux', u'name': u'my_mux'}, u'mode': u'layer2', u'ports': [{u'port': u'B1', u'side': u'up'}, {u'port': u'B2', u'side': u'down'}, {u'port': u'B3', u'side': u'down'}, {u'port': u'B4', u'side': u'down'}]}]
// Request
{
"method": "get_object",
"id": 1
}
// Response
{
"result": [
{
"object": {
"type": "switch",
"name": "my_switch"
},
"ports": [
{
"port": "A1"
},
{
"port": "A2"
},
{
"port": "A3"
},
{
"port": "A4"
}
]
},
{
"object": {
"type": "mux",
"name": "my_mux"
},
"mode": "layer2",
"ports": [
{
"port": "B1",
"side": "up"
},
{
"port": "B2",
"side": "down"
},
{
"port": "B3",
"side": "down"
},
{
"port": "B4",
"side": "down"
}
]
}
],
"id": 1
}
This method returns a list of currently configured objects.
Parameters
None
Result
The returned data is an array of objects with the following fields:
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of object |
mode | string | Object mode if applicable: raw or layer2 for mux objects |
enable_vlan | boolean | True if VLAN support is enabled for this object, omitted otherwise |
ports | array | Information about ports in the object |
Each entry in the ports array has the following fields:
Field | Type | Description |
---|---|---|
port | string | Port name |
side | string | up for upstream port, or down for downstream port (mux only) |
vlan_id | integer | VLAN ID used by this port (VLAN tagging ports only) |
block | array | A list of blocked output ports (omitted if no ports are blocked) |
create_object
>>> fusion.create_object(type="mux", name="my_mux", mode="layer2")
True
// Request
{
"method":"create_object",
"params": {
"type":"mux",
"name":"my_mux",
"mode":"layer2"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Create a new switch or mux object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of new object |
mode | string | Object mode: raw or layer2 for mux objects, omitted for switch objects |
enable_vlan | boolean | Set to true if VLAN support is desired (optional) |
Result
True if successful
delete_object
>>> fusion.delete_object(type="switch", name="my_switch")
True
// Request
{
"method":"delete_object",
"params": {
"type":"switch",
"name":"my_switch",
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Delete a switch or mux object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of object to be deleted |
Result
True if successful
add_object_port
>>> fusion.add_object_port(object={"type":"mux","name":"my_mux"}, port="B12", side="up", vlan_id=str(11))
True
// Request
{
"method":"add_object_port",
"params": {
"object": {
"type": "mux",
"name": "my_mux"
},
"port": "B12",
"side": "up",
"vlan_id": "11"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Add a port to a switch or mux object.
For mux objects, the side
field must be provided to specify whether the port
is an upstream or downstream port. If VLAN is enabled and a VLAN is to be assigned to
the port, the vlan_id field must be filled as well.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of object |
port | string | Port to be added to the object |
side | string | up for upstream ports or down for downstream ports (mux objects only) |
vlan_id | integer | VLAN ID used by this port (optional) |
Result
True if successful
remove_object_port
>>> fusion.remove_object_port(object={"type":"mux":"name":"my_mux"}, port="B12")
True
// Request
{
"method":"remove_object_port",
"params": {
"object": {
"type": "mux",
"name": "my_mux"
},
"port": "B12"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Remove a port from a switch or mux object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of object |
port | string | Port to be removed from the object |
Result
True if successful
set_object_mode
>>> fusion.set_object_mode(object={"type":"mux","name":"my_mux"}, mode="raw")
True
// Request
{
"method": "set_object_mode",
"params": {
"object": {
"type": "mux",
"name": "my_mux"
},
"mode": "raw"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Change the mode attribute of a mux object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: mux |
name | string | Name of mux object |
mode | string | New mode of the mux object: raw or layer2 |
Result
True if successful
set_object_vlan
>>> fusion.set_object_vlan(object={"type":"mux","name":"my_mux"}, enable_vlan=True)
True
// Request
{
"method": "set_object_vlan",
"params": {
"object": {
"type": "mux",
"name": "my_mux"
},
"enable_vlan": true
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Enable or disable VLAN support on a switch or mux object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of object |
enable_vlan | boolean | Set to true to enable VLAN support, or false to disable |
Result
True if successful
set_object_unknown_unicast
fusion.set_object_unknown_unicast(object={"type":"switch", "name":"my_switch"}, port="B2", unknown_unicast=0)
>>> True
// Request
{
"method":"set_object_unknown_unicast",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
},
"port": "B1",
"unknown_unicast": "0"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Allow transmission of unknown unicast packets on a specified port
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of the object |
port | string | Port to associate the behaviour to |
unknown_unicast | bool | '0’ to disallow unknown unicast, '1’ to accept |
Result
True if successful
add_object_static_mac
>>> fusion.add_object_static_mac(object={"type":"switch", "name":"my_switch"}, port="B1", static_mac="643F5F011630")
True
// Request
{
"method":"add_object_static_mac",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
},
"port": "B1",
"static_mac": "643F5F011630"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Add a static MAC address to a single port on an object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of the object |
port | string | Port to associate the static MAC address with |
static_mac | string | 12 hex chars representing the MAC address to be assigned |
Result
True if successful
remove_object_static_mac
>>> fusion.remove_object_static_mac(object={"type":"switch", "name":"my_switch"}, port="B1", static_mac="643F5F011630")
True
// Request
{
"method":"remove_object_static_mac",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
},
"port": "B1",
"static_mac": "643F5F011630"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Remove a static MAC address from a single port on an object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of the object |
port | string | Port to remove static MAC address from |
static_mac | string | MAC address to be removed |
Result
True if successful
get_object_static_mac
>>> fusion.get_object_static_mac(object={"type":"switch","name":"my_switch"})
{u'static_mac': {u'643F5F011630': [u'B1']}, u'object': {u'type': u'switch', u'name': u'my_switch'}
// Request
{
"method": "get_object_static_mac",
"params": {
"type": "switch",
"name": "my_switch"
},
"id": 1
}
// Response
{
"result": {
"static_mac": {
"643F5F011630": [
"B1"
]
},
"object": {
"type": "switch",
"name": "my_switch"
}
},
"id": 1
}
Retrieve all static MAC addresses assigned to a specified object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of the object |
Result
This returns a list of all static MAC addresses currently assigned to the specified object.
add_object_igmp_static_group
>>> fusion.add_object_igmp_static_group(object={"type":"switch","name":"my_switch"}, port="A1", group="224.1.1.1")
True
// Request
{
"method": "add_object_igmp_static_group",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
},
"port": "A1",
"group": "224.1.1.1"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Adds a static route of a multicast group to a port for a given mux/switch object
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of the object |
port | string | The port to add a static route to |
group | string | The IGMP group to add |
Result
True if successful
remove_object_igmp_static_group
>>> fusion.remove_object_igmp_static_group(object={"type":"switch","name":"my_switch"}, port="A1", group="224.1.1.1")
True
// Request
{
"method": "remove_object_igmp_static_group",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
},
"port": "A1",
"group": "224.1.1.1"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Removes a static route of a multicast group to a port for a given mux/switch object
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of the object |
port | string | The port to remove a static route from |
group | string | The IGMP group to remove |
Result
True if successful
get_object_mac_table
>>> fusion.get_object_mac_table(object={"type":"switch", "name":"my_switch"})
{u'mac_table': {u'643F5F011630': [{u'learned_routes': [u'B1'], u'port': u'B2', u'static_routes': []}, {u'learned_routes': [u'B1'], u'port': u'B3', u'static_routes': []}], u'102233445566': [{u'learned_routes': [], u'lock': True, u'port': u'B1', u'static_routes': [u'B1']}, {u'learned_routes': [], u'lock': True, u'port': u'B2', u'static_routes': [u'B1']}, {u'learned_routes': [], u'lock': True, u'port': u'B3', u'static_routes': [u'B1']}]}, u'object': {u'type': u'switch', u'name': u'my_switch'}}
// Request
{
"method": "get_object_mac_table",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
}
},
"id": 1
}
// Response
{
"mac_table": {
"643F5F011630": [
{
"learned_routes": [
"B1"
],
"port": "B2",
"static_routes": []
},
{
"learned_routes": [
"B1"
],
"port": "B3",
"static_routes": []
}
],
"102233445566": [
{
"learned_routes": [],
"lock": true,
"port": "B1",
"static_routes": [
"B1"
]
},
{
"learned_routes": [],
"lock": true,
"port": "B2",
"static_routes": [
"B1"
]
},
{
"learned_routes": [],
"lock": true,
"port": "B3",
"static_routes": [
"B1"
]
}
]
},
"object": {
"type": "switch",
"name": "my_switch"
},
"id": 1
}
This method allows for retrieval of all MAC address table entries for a specific object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of the object |
Result
Returns an array of the MAC address table of the requested object, noting static and dynamically learned routes
set_object_mac_learning
>>> fusion.set_object_mac_learning(object={"type":"switch","name":"my_switch"}, mac_address_learning="False")
True
// Request
{
"method": "set_object_mac_learning",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
},
"mac_address_learning": false
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method will allow for the enabling or disabling of MAC address learning on objects that support it. Note: MAC address learning is enabled by default for objects that support it
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of the object |
mac_address learning | boolean | Set to enable or disable MAC address learning |
Result
True if successful
set_object_igmp
>>> fusion.set_object_igmp(object={"type":"switch","name":"my_switch"},snooping="enabled",flood_unknown="true",fast_leave="true",querier="192.168.10.37",version="2");
True
// Request
{
"method": "set_object_igmp",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
},
"snooping": "enabled",
"flood_unknown": "true",
"fast_leave": "true",
"querier": "192.168.10.37",
"version": "2"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method allows for setting of an object’s IGMP snooping setting and associated features
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | Name of the object |
snooping | string | Enables IGMP Snooping for the object |
flood_uknown | string | Determines if unknown multicast traffic is broadcast or dropped |
fast_leave | string | If true, IGMP leave messages will result in immediate removal of the group, else wait for a timeout |
querier | string | If specified, sets the Fusion as an IGMP querier with the specified source IP address |
version | string | IGMP protocol version to use: 1 , 2 or 3 |
Result
True if successful
get_object_igmp
>>> fusion.get_object_igmp(object={"type":"switch","name":"my_switch"})
{u'snooping': True, u'object': {u'type': u'switch', u'name': u'my_switch'}, u'version': 2, u'querier': u'192.168.10.37', u'fast_leave': True, u'flood_unknown': True}
// Request
{
"method": "get_object_igmp",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
}
},
"id": 1
}
// Response
{
"result": {
"snooping": true,
"object": {
"type": "switch",
"name": "my_switch"
},
"version": 2,
"querier": "192.168.10.37",
"fast_leave": true,
"flood_unknown": true
},
"id": 1
}
Read the current IGMP settings for an object
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch or mux |
name | string | The name of the object |
Result
Field | Type | Description |
---|---|---|
snooping | boolean | Based on whether IGMP Snooping has been enabled for an object or not |
type | string | Object type: switch or mux |
name | string | Name of the object |
version | number | The version number of the IGMP protocol in use |
querier | string | The source the IP address the querier’s messages will be given |
fast_leave | boolean | If true, IGMP leave messages will result in immediate removal of the group, else wait for a timeout |
add_object_block
>>> fusion.add_object_block(object={"type":"switch","name":"my_switch"}, port="A1", dst_port="A2")
True
// Request
{
"method": "add_object_block",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
},
"port": "A1",
"dst_port": "A2"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Adds an output port to the blocked routes of a port in a switch object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch only |
name | string | Object name |
port | string | Input port to block traffic from |
dst_port | string | Output port to block traffic to |
Result
True if successful
remove_object_block
>>> fusion.remove_object_block(object={"type":"switch","name":"my_switch"}, port="A1", dst_port="A2")
True
// Request
{
"method": "remove_object_block",
"params": {
"object": {
"type": "switch",
"name": "my_switch"
},
"port": "A1",
"dst_port": "A2"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Removes an output port from the blocked routes of a port in a switch object.
Parameters
Field | Type | Description |
---|---|---|
type | string | Object type: switch |
name | string | Object name |
port | string | Input port to block traffic from |
dst_port | string | Output port to block traffic to |
Result
True if successful
Mirrors
get_mirror
>>> fusion.get_mirror("my_mirror")
[{u'timestamp_mode': u'fcs', u'output': [u'A1'], u'objects': {u'switch': [u'my_switch']}, u'name': u'my_mirror', u'ports': [u'B10']}]
// Request
{
"method": "get_mirror",
"params": "my_mirror",
"id": 1
}
// Response
{
"timestamp_mode": "fcs",
"output": [
"A1"
],
"objects": {
"switch": [
"my_switch"
]
},
"name": "my_mirror",
"ports": [
"B10"
],
"id": 1
}
This method gets the current status and structure of a mirror.
Parameters
Field | Type | Description |
---|---|---|
name | string | Name of the mirror |
Result
Field | Type | Description |
---|---|---|
name | string | Name of the mirror |
output | string | The port the mirror will output its traffic to |
ports | string | The ports that have their traffic mirrored to the output |
objects | string | The objects that are having their traffic mirrored to the output |
timestamp_mode | string | Reports the timestamping mode (i.e. format) in use with a particular mirror |
create_mirror
>>> fusion.create_mirror(name="my_mirror")
True
// Request
{
"method": "create_mirror",
"params": {
"name": "my_mirror"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method creates a mirror object on the Fusion with the specified name.
Parameters
Field | Type | Description |
---|---|---|
name | string | Name of the mirror |
Result
True if successful
delete_mirror
>>> fusion.delete_mirror(name="my_mirror")
True
// Request
{
"method": "delete_mirror",
"params": {
"name": "my_mirror"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method removes a mirror object on the Fusion with the specified name.
Parameters
Field | Type | Description |
---|---|---|
name | string | Name of the mirror |
Result
True if successful
set_mirror_timestamp_mode
>>> fusion.set_mirror_timestamp_mode(mirror="my_mirror", mode="fcs")
True
// Request
{
"method": "set_mirror_timestamp_mode",
"params": {
"mirror": "my_mirror",
"mode": "fcs"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method enables or disables the timestamping mode of a mirror object.
Parameters
Field | Type | Description |
---|---|---|
mirror | string | Name of the mirror to modify |
mode | string | Timestamping mode to use: fcs or fcs-compat or none |
Result
True if successful
add_mirror_output
>>> fusion.add_mirror_output(mirror="my_mirror", port="B8")
True
// Request
{
"method": "add_mirror_output",
"params": {
"mirror": "my_mirror",
"port": "B8"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Use this method to specify the output port for all of the mirror’s traffic
Parameters
Field | Type | Description |
---|---|---|
mirror | string | Name of the mirror |
port | string | Name of the port to add as output |
Result
True if successful
remove_mirror_output
>>> fusion.remove_mirror_output(mirror="my_mirror", port="B8")
True
// Request
{
"method": "remove_mirror_output",
"params": {
"mirror": "my_mirror",
"port": "B8"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
Removes the output port from a specified mirror object.
Parameters
Field | Type | Description |
---|---|---|
mirror | string | Name of the mirror |
port | string | Name of the port to remove as output |
Result
True if successful
add_mirror_port
>>> fusion.add_mirror_port(mirror="my_mirror", port="C1")
True
// Request
{
"method": "add_mirror_port",
"params": {
"mirror":"my_mirror",
"port":"C1"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to add a singular port to a mirror object.
Parameters
Field | Type | Description |
---|---|---|
mirror | string | Name of the mirror |
port | string | Name of the port whose traffic is to be mirrored |
Result
True if successful
remove_mirror_port
>>> fusion.remove_mirror_port(mirror="my_mirror", port="C1")
True
// Request
{
"method": "remove_mirror_port",
"params": {
"mirror":"my_mirror",
"port":"C1"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to remove specific ports from a mirror object.
Parameters
Field | Type | Description |
---|---|---|
mirror | string | Name of the mirror |
port | string | Name of the port to remove from mirroring |
Result
True if successful
add_mirror_object
>>> fusion.add_mirror_object(mirror="my_mirror", type="switch", object="my_switch")
True
// Request
{
"method": "add_mirror_object",
"params": {
"mirror": "my_mirror",
"type": "switch",
"object": "my_switch"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to add a whole object to a mirror object.
Parameters
Field | Type | Description |
---|---|---|
mirror | string | Name of the mirror to add the object to |
type | string | The type of the object to add: switch or mux |
object | string | Name of the object to add |
Result
True if successful
remove_mirror_object
>>> fusion.remove_mirror_object(mirror="foo", type="my_mirror", object="my_switch")
True
// Request
{
"method": "remove_mirror_object",
"params": {
"mirror": "my_mirror",
"type": "switch",
"object": "my_switch"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to remove objects currently assigned to a mirror.
Parameters
Field | Type | Description |
---|---|---|
mirror | string | Name of the mirror to remove the object from |
type | string | The Type of the object to add: switch or mux |
object | string | Name of the object to remove |
Result
True if successful
Internal Module Configuration
power_on_module
>>> fusion.power_on_module(module="Y")
True
// Request
{
"method": "power_on_module",
"params": {"module": "X"},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to turn on a specific internal module. Note: this does not apply to FPGA internal modules.
Parameters
Field | Type | Description |
---|---|---|
module | string | Name of the module to power on (“X” or “Y”) |
Results
True if successful
power_off_module
>>> fusion.power_off_module(module="Y")
True
// Request
{
"method": "power_off_module",
"params": {
"module": "X"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to turn off a specific internal module. Note: this does not apply to FPGA internal modules.
Parameters
Field | Type | Description |
---|---|---|
module | string | Name of the module to power off (“X” or “Y”) |
Results
True if successful
set_module_xvc_server
>>> fusion.set_module_xvc_server(module="X", enable=True, port=80)
True
// Request
{
"method": "set_module_xvc_server",
"params": {
"enable": true,
"port": 6767,
"module": "X"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to enable or disable the XVC server of an FPGA module.
Parameters
Field | Type | Description |
---|---|---|
module | string | Name of the module to enable the XVC server on |
enable | boolean | Set to 1 to enable XVC, 0 to disable |
port | int | Port number to be assigned to the XVC connection |
Results
True if successful
set_module_serial_server
>>> fusion.set_module_serial_server(enable=True, port=6768, module="X")
True
// Request
{
"method": "set_module_serial_server",
"params": {
"enable": true,
"port": 6768,
"module": "X"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to enable or disable the serial server of an internal module.
Parameters
Field | Type | Description |
---|---|---|
module | string | Name of the module to enable the serial server connection on |
enable | boolean | Set to 1 to enable the serial server on the module |
Results
True if successful
set_module_serial_console
>>> fusion.set_module_serial_console(module="X", enable=True)
True
// Request
{
"method": "set_module_serial_console",
"params": {
"enable": true,
"port": 6769,
"module": "X"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method is used to enable or disable the serial console interface for an internal module.
Parameters
Field | Type | Description |
---|---|---|
module | string | Name of the module to enable the serial console on |
enable | boolean | Set to 1 to enable to serial console connection for the module, 0 to disable |
Results
True if successful
get_modules
>>> fusion.get_modules()
[{u'function': u'switch', u'state': u'running', u'name': u'X'}]
// Request
{
"method": "get_modules",
"id": 1
}
// Response
{
"result": [
{
"function": "switch",
"state": "running",
"name": "X"
}
],
"id": 1
}
This method shows information about the Internal Modules installed in the ExaLINK Fusion
Parameters
None
Result
Field | Type | Description |
---|---|---|
function | string | The function of the internal module: switch , mux , or custom |
state | string | The current state of the internal module: running , stopped , or initializing |
name | string | The position of the internal module: X or Y |
set_module_function
>>> fusion.set_module_function(module="X", function="switch")
True
>>> fusion.set_module_function(module="Y", function="custom")
True
// Request
{
"method": "set_module_function",
"params": {
"module": "X",
"function": "switch"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method sets the firmware that should be used on a FPGA Internal Module
Parameters
Field | Type | Description |
---|---|---|
module | string | Select which module the function is being set: X or Y |
function | string | The firmware type the internal module should run: switch , mux or custom |
Result
True if successful
set_module_fpga_bitstream
>>> fusion.set_module_fpga_bitstream(module="Y", bitstream="mybitfile.bit")
True
// Request
{
"method": "set_module_fpga_bitstream",
"params": {
"module": "Y",
"bitstream": "mytbitfile.bit"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method sets the bitfile that should be loaded on an FPGA module configured to run custom firmware
Parameters
Field | Type | Description |
---|---|---|
module | string | Select which internal module the bitstream should be loaded to |
bitstream | string | The filename of the bitfile |
Result
True if successful
reconfigure_module_fpga
>>> fusion.reconfigure_module_fpga(module="Y")
True
// Request
{
"method": "reconfigure_module_fpga",
"params": {
"module": "Y"
},
"id": 1
}
// Response
{
"result": true,
"id": 1
}
This method can be used to reload the configuration bitstream for an internal module
Parameters
Field | Type | Description |
---|---|---|
module | string | The module in which the FPGA should be configured: X or Y |
Result
True if successful