Device/Group Actions

Description

These interfaces allow users to perform actions on a specific device in NEO

Request URL

http://<NEO_SERVER_ADDRESS>/neo/actions

Main Operations

  • Switch Software Upgrade

  • Switch Reboot

  • Host OFED Install

  • Apply Configuration

  • Docker Actions

  • NEOhost Management

  • Generate Dump

Description

Performs software upgrade on systems

Request URL

POST /neo/actions

Response

HTTP Response Location Header will contain URI with Job ID Created for software upgrade on specified switch

Request:

Copy
Copied!
            

{ "action": "sw_upgrade", "params": { "description": "", "protocol": "scp", "server": "<host_name>", "path": "<image_path>", "image": "<selected_image>", "username": "<username>", "password": "<password>" }, "object_ids": ["<system_IP>"], "description": "", "object_type": "System" }

Warning

This action can also be performed on groups that contain only Mellanox switches. To perform this action on a group, make sure to modify the following attributes:

  • "object_ids": ["<group_name>"]

  • "object_type": "Group"

Description

Performs switch reboot action

Request URL

POST /neo/actions

Response

HTTP Response Location Header will contain URI with Job ID created for performing reboot on the specified switch.

Request Data:

Copy
Copied!
            

{ "action": "reboot", "params": {}, "description": "Switch reboot", "object_ids": ["<system_IP>"], "object_type": "System" }

Warning

This action can also be performed on groups that contain only Mellanox switches. To perform this action on a group, make sure to modify the following attributes:

  • "object_ids": ["<group_name>"]

  • "object_type": "Group"

Host OFED Install via Shared Folder

Description

Performs OFED installation on hosts. The image is fetched from a shared folder that the host can access

Request URL

POST /neo/actions

Response

HTTP Response Location Header will contain URI with job ID created from OFED installation on specified host

Request Data:

Copy
Copied!
            

{ "action": "ofed_install", "params": { "protocol": "shared_folder", "image_path": "<image path>", "image_name": "<image name>" }, "object_ids": ["<system IP>"], "description": "<description>", "object_type": "System" }

Warning

This action can also be performed on groups that contain only hosts. To perform this action on a group, make sure to modify the following attributes:

  • "object_ids": ["<group_name>"]

  • "object_type": "Group"


Host OFED Install via SFTP

HTTP Response Location Header will contain a URI with a job ID created from OFED installation on a specified host

Description

Performs OFED installation on hosts. The image is fetched from a remote SFTP server

Request URL

POST /neo/actions

Response

HTTP Response Location Header will contain a URI with a job ID created from OFED instal­lation on a specified host

Request Data:

Copy
Copied!
            

{ "action": "ofed_install", "params": { "protocol": "sftp", "server": "<SFTP server IP>", "username": "<SFTP server username>", "password": "<SFTP server password>", "image_path": "<image path>", "image_name": "<image name>" }, "object_ids": ["<system IP>"], "description": "<description>", "object_type": "System" }


Load Docker Image

Description

Performs Docker Image Loading on a single switch or on multiple devices groups.

Request URL

POST /neo/actions/docker

Response

HTTP Response Location Header will contain URI with a job ID created from OFED installation on a specified host

Request Data:

Copy
Copied!
            

{ { "action": "load_docker", "params": { "protocol": "scp", "server": "127.0.0.1", "path": "/path", "image": "image_name", "username": "<username>", "password": "<password>" }, "object_ids": ["system_ids"], "description": "Load image", "object_type": "System/Groups" }, }

Warning

This action can also be performed on groups that contain only hosts. To perform this action on a group, make sure to modify the following attributes:

  • "object_ids": ["<group_name>"]

  • "object_type": "Group"


Remove Docker Image Action

Description

Removes docker image on a single or multiple device groups

Request URL

POST /neo/actions/docker

Response

HTTP Response Location Header will contain URI with a job ID created from OFED installation on a specified host

Request Data:

Copy
Copied!
            

{ "action": " remove_docker", "params": { "image_name": "image_name", "version": "version" }, "object_ids": ["<system IP>"], "description": "<description>", "object_type": "System" }


Start Instance Action

HTTP Response Location Header will contain a URI with a job ID created from OFED installation on a specified host

Description

Performs instance container starting on single or multiple devices groups.

Request URL

POST /neo/actions/docker

Response

HTTP Response Location Header will contain a URI with a job ID created from OFED installation on a specified host

Request Data:

Copy
Copied!
            

{ "action": " start_docker", "params": { "image_name": "image_name", "version": "version" "container_name": "container_name" }, "object_ids": ["<system IP>"], "description": "<description>", "object_type": "System" }

Remove Instance Action

Description

Performs instance container removing on single or multiple devices groups.

Request URL

POST /neo/actions/docker

Response

HTTP Response Location Header will contain a URI with a job ID created from OFED installation on a specified host

Request Data:

Copy
Copied!
            

{ "action": " stop_docker", "params": { "image_name": "container_name" }, "object_ids": ["<system IP>"], "description": "<description>", "object_type": "System" }

Description

Performs installation/uninstallation of NEO host on a Linux host

Request URL

POST /neo/actions

{"action":"neohost_install","params":{},"object_ids":["10.134.160.1"],"descrip-tion":"","object_type":"System","task_type":""}

Response

HTTP Response Location Header will contain a URI with a job ID created from OFED installation on a specified switch

Request Data:

Install

Copy
Copied!
            

{ "action": " neohost_install", "params": {}, "object_ids": ["<system_IP>"], "description": "", "object_type": "System" }

Uninstall

Copy
Copied!
            

{ "action": " neohost_uninstall", "params": {}, "object_ids": ["<system_IP>"], "description": "", "object_type": "System" }

Warning

This action can also be performed on groups that contain Linux hosts only. To perform this action on a group, make sure to modify the following attributes:

  • "object_ids": ["<group_name>"]

  • "object_type": "Group"

Description

Generate a debug dump file on an Onyx switch and upload it to a remote folder

Request URL

POST /neo/actions

Response

HTTP Response Location Header will contain a URI with a job ID created from OFED installation on a specified switch

Request Data:

Copy
Copied!
            

{ "action": "generate_dump", "params": { "description": "description", "protocol": "scp", "server": "10.224.14.231", "path": "/path/to/remote/folder", "username": "username", "password": "password" }, "object_type": "System", "object_ids": ["10.209.36.161"] }

Warning

This action can also be performed on groups that contain only Mellanox switches. To perform this action on a group, make sure to modify the following attributes:

  • "object_ids": ["<group_name>"]

  • "object_type": "Group"

Apply Configuration through Snapshots

Description

Updates the configuration on the switch to the configuration stored in a snapshot

Request URL

POST /neo/actions

Response

HTTP Response Location Header will contain a URI with a job ID created from OFED installation on a specified host

Request Data:

Copy
Copied!
            

{ "action": "apply_conf", "params": { "snapshot_name": "snapshot_name", }, "object_ids": ["<system IP>"], "description": "<description>", "object_type": "System" }


Apply Configuration Using Configuration Files with Parameters

Description

Updates the configuration on the switch to the configuration stored in a global/device-specific file

Request URL

POST /neo/actions

Response

HTTP Response Location Header will contain a URI with a job ID created from OFED installation on a specified host

Request Data:

Copy
Copied!
            

{ "action": "apply_conf", "params": { "file_id": "<file_id>", "arguments": { "globals": {}, "devices": { "10.209.37.30": { "switch_hostname": "r-sw56" }, "10.209.37.13": { "switch_hostname": "r-sw55" }, }, }, "object_ids": ["<system IP>"], "description": "<description>", "object_type": "System" }

Warning

This action can also be performed on groups that contain Linux hosts only. To perform this action on a group, make sure to modify the following attributes:

  • "object_ids": ["<group_name>"]

  • "object_type": "Group


Description

Checks the connectivity on the selected devices by ICMP, SSH, HTTPS, or SNMP.

Supported type: Onyx, Cumulus, Linux host.

Request URL

POST /neo/actions

Response

HTTP Response Location Header will contain a URI with a job ID created

Request Data:

Copy
Copied!
            

{ "action": "diagnose", "object_type": "System", "object_ids": [ "10.209.36.128" ], "description": "Connectivity Check", "params": {} }

© Copyright 2023, NVIDIA. Last updated on Nov 16, 2023.