Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Isilon: NFS 내보내기에 OneFS API 사용(영문)

Summary: 이 문서에서는 curl 툴을 통해 OneFS API에 액세스하여 NFS 내보내기를 관리하는 방법을 보여 주는 샘플 코드를 제공합니다.

This article may have been automatically translated. If you have any feedback regarding its quality, please let us know using the form at the bottom of this page.

Article Content


Symptoms

N/A

Cause

N/A

Resolution

참고: 이 항목은 Isilon SDK 정보 허브의 일부입니다

다음 샘플 코드는 curl 툴을 통해 OneFS API에 액세스하여 NFS 내보내기를 관리하는 방법을 보여줍니다.

예제 IP 주소 1.2.3.4를 클러스터의 IP 주소 또는 호스트 이름으로 바꾸거나, 클러스터의 노드에서 로컬로 이러한 명령을 실행하는 경우 'localhost'로 바꾸어 이 샘플 코드를 직접 사용할 수 있습니다. 또한 user1 및 password1을 클러스터에 적합한 계정 정보로 바꿔야 합니다.

 

NFS 내보내기

다음 예에서는 시스템에서 NFS 내보내기를 나열, 생성, 업데이트 및 삭제하기 위한 요청이 OneFS API로 전송됩니다.

  • --insecure(-k) 인수를 사용하면 인증서 없이 SSL을 통해 연결할 수 있습니다.
  • --verbose(-v) 인수는 HTTP 요청 및 응답의 전체 헤더를 표시합니다.
  • --basic 인수는 기본 인증을 지정합니다. 다음 샘플 코드는 OneFS에 액세스하는 방법을 보여줍니다

아래의 생성 예에서는 시스템에 /ifs/example_path 경로가 있고 요청을 전송하는 사용자에게 ISI_PRIV_NFS 권한이 있다고 가정합니다.

 

모든 NFS 내보내기 나열(GET)

명령 예:

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

 

Python json 툴 모듈을 통해 응답 본문을 파이핑하여 읽기 쉬운 들여쓰기로 모든 NFS 내보내기를 나열합니다.

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

 

새 내보내기 만들기(POST)

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

 

내보내기 수정(PUT)

위 POST의 응답 본문에는 새로 만든 내보내기의 ID가 포함되어야 합니다. 다음 예제에서 내보내기 ID는 '2'입니다.

curl https://1.2.3.4:8080/platform/1/protocols/nfs/exports/2 -X PUT -k -u user1:password1 -v --data '{"description": "내보내기의 예입니다."}'

 

내보내기 삭제(DELETE)

이 명령은 ID가 '2'인 내보내기를 삭제합니다.

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

Article Properties


Affected Product

Isilon, PowerScale OneFS

Last Published Date

23 Feb 2024

Version

5

Article Type

Solution