API 要求を使用したスイッチファームウェアとメンテナンス ポリシーの管理例を示します。これらの例は、管理者がスイッチのアップグレードとモニタリングのステータスを自動化する際に役立ちます。
このトピックでは、スイッチのファームウェア グループ、メンテナンス ポリシーの構成、およびアップグレード ステータス情報の取得に関する API リクエストの例を示します。
スイッチのファームウェア グループ: スイッチで同じファームウェア ポリシー グループ
POST URL: http://trunk6-ifc1/api/node/mo/uni/fabric.xml
<firmwareFwGrp name="AllswitchesFwGrp" >
<fabricNodeBlk name="Blk101to104" from_="101" to_="104" />
<firmwareRsFwgrpp tnFirmwareFwPName="AllswitchesFwP" />
</firmwareFwGrp>
スイッチのファームウェアのファームウェア ポリシー: セットが必要なバージョン
POST URL: http://trunk6-ifc1/api/node/mo/fabric.xml
<firmwareFwP name="AllswitchesFwP" version="n9000-11.0(0.775)"
ignoreCompat="true">
</firmwareFwP>
スイッチのメンテナンス グループ: スイッチで同じメンテナンス ポリシー グループ
POST URL: http://trunk6-ifc1/api/node/mo/uni/fabric.xml
<maintMaintGrp name="AllswitchesMaintGrp">
<fabricNodeBlk name="Blk101to104" from_="101" to_="104" />
<maintRsMgrpp tnMaintMaintPName="AllswitchesMaintP" />
</maintMaintGrp>
スイッチのメンテナンス ポリシー: maitenance のセットアップのスケジュール
POST URL: http://trunk6-ifc1/api/node/mo/uni/fabric.xml
<maintMaintP name="AllswitchesMaintP" runMode="pauseOnlyOnFailures" >
</maintMaintP>
今すぐ開始: メンテナンス グループでトリガーのアップグレード
POST URL: http://trunk6-ifc1/api/node/mo/uni/fabric.xml
<maintMaintP name="AllswitchesMaintP" adminSt="triggered">
</maintMaintP>
スイッチで現在実行中のバージョンを取得します。
(all switches) GET UR :
http://trunk6-ifc1.insieme.local/api/node/class/firmwareRunning.xml
(a switch) GET URL:
http://trunk6-ifc1.insieme.local/api/node/mo/topology/pod-1/node-101/sys/
fwstatuscont/running.xml
スイッチのアップグレードのステータスを取得します。
(all switches) GET URL:
http://trunk6-ifc1.insieme.local/api/node/class/maintUpgJob.xml
(a switch) GET URL:
http://trunk6-ifc1.insieme.local/api/node/mo/topology/pod-1/node-101/sys/
fwstatuscont/upgjob.xml