opendaylight - opendaylight RESTCONF 操作不接受 json 中的属性
问题描述
我正在尝试以 JSON 格式发送具有属性“inactive”:“inactive”的正文,但 opendaylight 控制器不接受以下格式。
curl --location --request POST 'http://10.13.82.108:8181/restconf/operations/network-topology:network-topology/topology/topology-netconf/node/denali-vpn-jess1/yang-ext:mount /ietf-netconf:edit-config'
--header '授权:基本 YWRtaW46YWRtaW4='
--header '内容类型:application/json'
--header '接受:application/xml' \
--data '{
"input": {
"target": {
"candidate": ""
},
"config": {
"configuration": {
"interfaces": {
"interface": {
"@" : {
"inactive" : "inactive"
},
"name": "ps1"
}
}
}
}
}
}'
--data '{
"input": {
"target": {
"candidate": ""
},
"config": {
"configuration": {
"interfaces": {
"interface": {
"-active": "active",
"name": "ps1"
}
}
}
}
}
}'
--data '{
"input": {
"target": {
"candidate": ""
},
"config": {
"configuration": {
"interfaces": {
"interface": {
"@inactive": "inactive",
"name": "ps1"
}
}
}
}
}
}'
控制器接受 XML 中的等效属性。
解决方案
推荐阅读
- verilog - ALU NOOP 案例推断闩锁:这可以吗?
- apache-spark - Pyspark 高阶函数 - 一次在结构数组中求和 2 个值?
- docker - 外部 IP 是
在 Kubernetes 服务中 - javascript - 仅在 Android React-Native (expo) 中的行首图像定位
- javascript - Vue - 仅对 v-for 数组中新添加的元素执行操作
- phpmyadmin - 如何解决那些 phpmyadmin 错误?
- google-apps-script - Google 表格应用程序脚本 | While 循环直到第一列中有两个连续的空单元格
- typescript - 将迭代器结果键入元组
- python - GeoPackage 格式的 Geopandas 快速读取切片
- gitlab - Gitlab CI/CD 通用包文件过期时间