メイン コンテンツに進む
  • すばやく簡単にご注文が可能
  • 注文内容の表示、配送状況をトラック
  • 会員限定の特典や割引のご利用
  • 製品リストの作成とアクセスが可能
  • 「Company Administration(会社情報の管理)」では、お使いのDell EMCのサイトや製品、製品レベルでのコンタクト先に関する情報を管理できます。

Dell EMC SmartFabric OS10 User Guide Release 10.5.0

PDF

View XML structure of CLI commands

To use the RESTCONF API to configure and monitor an OS10 switch, create an HTTPS request with data parameters in JSON format. The JSON data parameters correspond to the same parameters in the XML structure of an OS10 command.

To display the parameter values in the XML code of an OS10 command as reference, use the debug cli netconf command in EXEC mode. In CONFIGURATION mode, use the do debug cli netconf command.

This command enables a CLI-to-XML display. At the prompt, enter the OS10 command of the XML request and the reply you need. To exit the CLI-to-XML display, use the no debug cli netconf command.

Locate the XML parameters values for the same JSON data arguments. For example, to configure VLAN 20 on an OS10 switch, enter the RESTCONF endpoint and JSON contents in the curl command. Note how the JSON type and name parameters are displayed in the XML structure of the interface vlan command.
  • RESTCONF endpoint: /restconf/data/interfaces
  • JSON data content:
    {
    	"interface": [{
    		"type": "iana-if-type:l2vlan",
    		"enabled": true,
    		“description”: “vlan20”,
    		"name": "vlan20"
    	}]
    }
  • curl command:
curl -X POST –u admin:admin –k "https://10.11.86.113/restconf/data/interfaces" 
-H "accept: application/json" -H "Content-Type: application/json" 
-d '{ "interface": [{ "type": "iana-if-type:l2vlan", "enabled": true, 
“description”:“vlan20”,  "name":"vlan20"}]}'
To display values for the type and name parameters in the curl command, display the XML structure of the interface vlan 20 configuration command:
OS10(config)# do debug cli netconf
OS10(config)# interface vlan 10

Request:
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <candidate/>
    </target>
    <default-operation>merge</default-operation>
    <error-option>stop-on-error</error-option>
    <test-option>set</test-option>
    <config>
      <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type" xmlns:dell-if="http://www.dellemc.com/networking/os10/dell-interface" xmlns:dell-eth="http://www.dellemc.com/networking/os10/dell-ethernet" xmlns:dell-lag="http://www.dellemc.com/networking/os10/dell-lag">
        <interface>
          <type>ianaift:l2vlan</type>
          <name>vlan10</name>
        </interface>
      </interfaces>
    </config>
  </edit-config>
</rpc>


Reply:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="10">
  <ok/>
</rpc-reply>
OS10(config)# do no debug cli netconf

このコンテンツを評価する

正確
有益
分かりやすい
この記事は役に立ちましたか?
0/3000 characters
  1~5個の星の数で評価してください。
  1~5個の星の数で評価してください。
  1~5個の星の数で評価してください。
  この記事は役に立ちましたか?
  コメントでは、以下の特殊文字は利用できません: <>()\