Connectrix Brocade:REST API 指令碼 - FOS v8.2.x 和 FOS v9.x 中的 GET 命令要求差異

Summary: 「POST」命令要求的運作沒有任何問題。 但是,在 FOS v8.2.x 和 FOS v9.x 中,「GET」命令要求語法的具象狀態傳輸應用程式程式設計介面指令檔執行會有所不同。

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


問題發生在使用 FOS v8.2.x 的 SAN 交換器上執行的 REST API 指令檔時,命令執行成功。
父命令:
curl -X POST -H “Accept=\”application/yang-data+json\“ content-Type=\”'application/yang-data+json\“ --user ”user:password“ -i https://switch/rest/login

從回應標頭。可以毫無問題地解壓縮「Authorization」標頭。

繼承「Authorization-header」後,必須執行以下命令:
curl -X GET -H “Accept=\”application/yang-data+json\“ content-Type=\”'application/yang-data+json\“ Authorization=\”Custom_Basic 'Authorization-header from above'\“ ” -i https://switch/rest/running/fabric/fabric-switch

在 FOS 9.1.x 上,上述命令執行失敗,並顯示錯誤:
收到的錯誤訊息為「HTTP/1.1 401 Unauthorized」

Cause


問題的原因是「fabric-switch」的「GET」查詢未新增到 FOS v9.x 命令執行的「fabric」類別中。

Resolution


FOS v8.2.x
在 8.2.3x 中,「fabric-switch」的「GET」查詢位於「fabric」和 brocade-fabric」類別中 ,因此查詢適用於命令:「
https://switch/rest/running/ fabric/fabric-switch [switch]」
https://switch/rest/running/ brocade-fabric/fabric-switch [switch]」

FOS v9.x:
但在 9.x 的後續版本中,這已從「架構」類別中移除,僅包含在「brocade-fabric」類別中並可使用。
因此,查詢為「https://switch/rest/running/ [switch]brocade-fabric/fabric-switch」可成功運作。

 

Additional Information

我們會向 Broadcom 提供意見回饋,以便在 Broadcom REST API 指南中新增這些詳細資料。
但是,他們已經針對正在進行的此行為變更建立了客戶層級知識庫文件 FAQ-14293。

Affected Products

Connectrix B-Series Fabric OS 9.X

Products

Connectrix B-Series
Article Properties
Article Number: 000224736
Article Type: Solution
Last Modified: 03 May 2024
Version:  1
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.