Isilon: Using the OneFS API with NFS Exports

Summary: This article provides sample code that shows how to use the curl tool to access the OneFS API to manage NFS exports.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

N/A

Cause

N/A

Resolution

NOTE: This topic is part of the Isilon SDK Info Hub

The following sample code shows how to use the curl tool to access the OneFS API to manage NFS exports.

You can modify this sample code for your own use by replacing the example IP address 1.2.3.4 with the IP address or hostname of your cluster, or with 'localhost' if you are running these commands locally on a node in your cluster. In addition, you must replace user1 and password1 with appropriate account information for your cluster.

 

NFS Exports

In the following examples, requests are sent to the OneFS API to list, create, update, and delete NFS exports on the system.

  • The --insecure (-k) argument allows connection through SSL without certificates.
  • The --verbose (-v) argument displays the full headers of the HTTP request and response.
  • The --basic argument specifies basic authentication. The following sample code shows how to access the OneFS

The create example below assumes that an /ifs/example_path path exists on your system and that the user sending the request has the ISI_PRIV_NFS privilege.

 

List all NFS exports (GET)

Example commands:

curl https://1.2.3.4:8080/platform/1/protocols/nfs/exports --insecure --basic --user user1:password1 --verbose

 

List all NFS exports with reader-friendly indenting by piping the response body through the Python json tool module.

curl https://1.2.3.4:8080/platform/1/protocols/nfs/exports --insecure --basic --user user1:password1 | python -m json.tool

 

Create a new export (POST)

curl https://1.2.3.4:8080/platform/1/protocols/nfs/exports -k -u user1:password1 -v --data '{"paths": ["/ifs/example_path"]}'

 

Modify an export (PUT)

Note that the response body from your POST above must contain the ID of the newly created export. In the following example, the export ID is '2'.

curl https://1.2.3.4:8080/platform/1/protocols/nfs/exports/2 -X PUT -k -u user1:password1 -v --data '{"description": "An example export."}'

 

Delete an export (DELETE)

This command will delete the export with ID '2'.

curl https://1.2.3.4:8080/platform/1/protocols/nfs/exports/2 -X DELETE -k -u user1:password1 -v

Affected Products

Isilon, PowerScale OneFS
Article Properties
Article Number: 000129386
Article Type: Solution
Last Modified: 23 Feb 2024
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.