Added TR181 2.15 datamodel json and xml

This commit is contained in:
vdutta 2022-01-28 11:29:33 +05:30
parent a2801fa0f0
commit 3bfb443fa3
7 changed files with 90178 additions and 25258 deletions

View file

@ -738,14 +738,14 @@ It is a [python script](./tools/convert_dm_xml_to_json.py) to convert Data Model
$ ./convert_dm_xml_to_json.py
Usage: ./convert_dm_xml_to_json.py <tr-xxx cwmp xml data model> <tr-xxx usp xml data model> [Object path]
Examples:
- ./convert_dm_xml_to_json.py tr-181-2-14-1-cwmp-full.xml tr-181-2-14-1-usp-full.xml Device.
- ./convert_dm_xml_to_json.py tr-181-2-15-0-cwmp-full.xml tr-181-2-15-0-usp-full.xml Device.
==> Generate the json file of the sub tree Device. in tr181.json
- ./convert_dm_xml_to_json.py tr-104-2-0-2-cwmp-full.xml tr-104-2-0-2-usp-full.xml Device.Services.VoiceService.
==> Generate the json file of the sub tree Device.Services.VoiceService. in tr104.json
- ./convert_dm_xml_to_json.py tr-106-1-2-0-full.xml Device.
==> Generate the json file of the sub tree Device. in tr106.json
Example of xml data model file: https://www.broadband-forum.org/cwmp/tr-181-2-14-1-cwmp-full.xml
Example of xml data model file: https://www.broadband-forum.org/cwmp/tr-181-2-15-0-cwmp-full.xml
```
### XML generator

File diff suppressed because it is too large Load diff

View file

@ -46,7 +46,7 @@ echo "Validate X_IOPSYS_EU_WiFi JSON Plugin"
check_ret $?
echo "Validate TR-181 JSON Plugin after generating from XML"
json_path=$(./tools/convert_dm_xml_to_json.py test/tools/tr-181-2-14-1-cwmp-full.xml test/tools/tr-181-2-14-1-usp-full.xml Device.)
json_path=$(./tools/convert_dm_xml_to_json.py test/tools/tr-181-2-15-0-cwmp-full.xml test/tools/tr-181-2-15-0-usp-full.xml Device.)
./tools/validate_json_plugin.py $json_path
check_ret $?

View file

@ -685,7 +685,7 @@ def printusage():
sys.argv[0] + " <tr-xxx cwmp xml data model> <tr-xxx usp xml data model> [Object path]")
print("Examples:")
print(" - " + sys.argv[0] +
" tr-181-2-14-1-cwmp-full.xml tr-181-2-14-1-usp-full.xml Device.")
" tr-181-2-15-0-cwmp-full.xml tr-181-2-15-0-usp-full.xml Device.")
print(" ==> Generate the json file of the sub tree Device. in tr181.json")
print(" - " + sys.argv[0] +
" tr-104-2-0-2-cwmp-full.xml tr-104-2-0-2-usp-full.xml Device.Services.VoiceService.")
@ -693,7 +693,7 @@ def printusage():
print(" - " + sys.argv[0] + " tr-106-1-2-0-full.xml Device.")
print(" ==> Generate the json file of the sub tree Device. in tr106.json")
print("")
print("Example of xml data model file: https://www.broadband-forum.org/cwmp/tr-181-2-14-1-cwmp-full.xml")
print("Example of xml data model file: https://www.broadband-forum.org/cwmp/tr-181-2-15-0-cwmp-full.xml")
exit(1)

View file

@ -47,7 +47,7 @@ def generate_bbf_xml_file(output_file):
root.set("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance")
root.set("xsi:schemaLocation", "urn:broadband-forum-org:cwmp:datamodel-1-8 https://www.broadband-forum.org/cwmp/cwmp-datamodel-1-8.xsd urn:broadband-forum-org:cwmp:datamodel-report-0-1 https://www.broadband-forum.org/cwmp/cwmp-datamodel-report.xsd")
root.set("spec", "urn:broadband-forum-org:tr-181-2-14-1-cwmp")
root.set("file", "tr-181-2-14-1-cwmp-full.xml")
root.set("file", "tr-181-2-15-0-cwmp-full.xml")
model = ET.SubElement(root, "model")
model.set("name", "Device:2.14")