Provisioning
|
Description |
Allows users to perform actions on a specific switch in NEO |
|
Request URL |
http://<NEO_SERVER_ADDRESS>/neo/actions |
|
Main Operations |
|
|
Notes |
For more REST API actions, please read the 'Switch Actions REST API' |
|
Description |
Performs a provisioning job on a switch using explicit CLI commands |
|
Request URL |
POST /neo/actions |
|
Request Content Type |
application/json |
|
Response |
HTTP Response Location Header will contain URI with Job ID created for running the CLI command on the specified switches. |
Request Data:
{
"action": "run_cli",
"params": {
"commandline": ["<CLI_COMMAND_LINE1>",
"<CLI_COMMAND_LINE2>"],
"arguments": {
"globals": {
"<global_arg1>": "<global_arg_val1>"
},
"devices": {
"<system_IP>": {
"<local_arg1>": "<local_arg_val1>"
}
}
}
},
"description": "",
"object_ids": ["<system_IP>"]
}
|
Description |
Performs a provisioning job on a switch using template name |
|
Request URL |
POST /neo/actions/provisioning/<template_name> |
|
Request Content Type |
application/json |
|
Response |
HTTP Response Location Header will contain URI with Job ID created for running the CLI command on the specified switches. |
Request Data:
{
"params": {
"arguments": {
"globals": {
"<global_arg1>": "<global_arg_val1>"
},
"devices": {
"<system_IP>": {
"<local_arg1>": "<local_arg_val1>"
}
}
}
},
"description": "",
"object_ids": ["<system_IP>"]
}
|
Description |
Examples of provisioning using template name |
Create Hybrid VLAN
|
Description |
Sets port VLAN mode as 'hybrid' and adds an allowed VLAN to it |
||
|
Request URL |
PO ST /neo/actions/provisioning/Set-Hybrid-Vlan-Port |
||
|
Arguments |
Name |
Type |
Description |
|
vlan_number |
Global (for all devices) |
The VLAN number to add |
|
|
port_number |
Local (per device) |
The number of the port to add VLAN to |
|
Request Data:
{
"params": {
"arguments": {
"globals": {
"VLAN_ID": "5"
},
"devices": {
"10.209.24.39": {
"interface_ID": "1/4"
}
}
}
},
"object_ids": ["10.209.24.39"],
"object_type": "System"
}
Set Access VLAN Port
|
Description |
Setting Access VLAN on port |
||
|
Request URL |
POST /neo/actions/provisioning/Set-Access-VLAN-Port |
||
|
Arguments |
Name |
Type |
Description |
|
VLAN_ID |
Global (for all devices) |
VLAN number to set as access VLAN |
|
|
port_name |
Local (per device) |
Number of interface to set access VLAN on. |
|
Request Data:
{
"params": {
"arguments": {
"globals": {
"VLAN_ID": "5"
},
"devices": {
"10.209.24.39": {
"port_name": "1/5"
}
}
}
},
"object_ids": ["10.209.24.39"],
"object_type": "System"
}
Create LAG
|
Description |
Creates a LAG from two interfaces and defines its mode |
||
|
Request URL |
POST /neo/actions/provisioning/Create-LAG |
||
|
Arguments |
Name |
Type |
Description |
|
LAG_ID |
Global (for all devices) |
Number of LAG to create |
|
|
LAG_mode |
Global (for all devices) |
The mode of the interface (active/passive/on) |
|
Request Data:
{
"params": {
"arguments": {
"globals": {
"LAG_Number": "1",
"LAG_member1": "1/4",
"LAG_Mode": "on",
"LAG_member2": "1/5"
},
"devices": {}
}
},
"object_ids": ["10.224.14.248"],
"object_type": "System"
}
Enable LLDP
|
Description |
Enables LLDP |
|
Request URL |
POST /neo/actions/provisioning/Enable-LLDP |
Request Data:
{
"params": {
"arguments": {
"globals": {},
"devices": {
"10.209.24.39": {}
}
}
},
"object_ids": ["10.209.24.39"],
"object_type": "System"
}
Enable OSPF
|
Description |
Enables OSPF on the switch and activates the OSPF router |
|
Request URL |
POST /neo/actions/provisioning/Enable-OSPF |
Request Data:
{
"params": {
"arguments": {
"globals": {},
"devices": {
"10.209.24.39": {}
}
}
},
"object_ids": ["10.209.24.39"],
"object_type": "System"
}
Set Hostname
|
Description |
Sets hostname of the switch |
||
|
Request URL |
POST /neo/actions/provisioning/Set-Hostname |
||
|
Arguments |
Name |
Type |
Description |
|
switch_hostname |
Local (per device) |
Hostname to set |
|
Request Data:
{
"params": {
"arguments": {
"globals": {},
"devices": {
"10.209.24.39": {
"switch_hostname": "r-smg-sw18"
}
}
}
},
"object_ids": ["10.209.24.39"],
"object_type": "System"
}
Shutdown Port
|
Description |
Shutting-down a port |
||
|
Request URL |
POST /neo/actions/provisioning/Disable-Ports |
||
|
Arguments |
Name |
Type |
Description |
|
port_name |
Global (for all devices) |
Number of interface to shut down |
|
Request Data:
{
"params": {
"arguments": {
"globals": {
"interface_range": "1/1"
},
"devices": {}
}
},
"object_ids": ["10.209.24.39"],
"object_type": "System"
}