Remove the 'ietf' prefix in front of the YANG modules
Change-Id: Ib932f6fb0f81b5731a9080234552d650245482a8
diff --git a/netconf/protoc_plugins/proto2yang.py b/netconf/protoc_plugins/proto2yang.py
index e9bf614..5d101af 100755
--- a/netconf/protoc_plugins/proto2yang.py
+++ b/netconf/protoc_plugins/proto2yang.py
@@ -26,7 +26,7 @@
$ python -m grpc.tools.protoc -I.
--plugin=protoc-gen-custom=./proto2yang.py --custom_out=. <proto file>.proto
- - the above will produce a ietf-<proto file>.yang file formatted for yang
+ - the above will produce a <proto file>.yang file formatted for yang
- two examples of proto that can be used in the same directory are
yang.proto and addressbook.proto
@@ -75,7 +75,7 @@
""")
template_yang = env.from_string("""
-module ietf-{{ module.name }} {
+module {{ module.name }} {
{% macro set_module_prefix(type) %}
{% set found = [] %}
@@ -129,11 +129,11 @@
{% endmacro %}
- namespace "urn:opencord:params:xml:ns:voltha:ietf-{{ module.name }}";
+ namespace "urn:opencord:params:xml:ns:voltha:{{ module.name }}";
prefix {{ module.name }};
{% for imp in module.imports %}
- import ietf-{{ imp.name }} { prefix {{ imp.name }} ; }
+ import {{ imp.name }} { prefix {{ imp.name }} ; }
{% endfor %}
organization "CORD";
@@ -892,7 +892,7 @@
all_proto_data.append(
{
- 'file_name': '{}-{}'.format('ietf', proto_file.name.split(
+ 'file_name': '{}'.format(proto_file.name.split(
'/')[-1].replace('.proto', '.yang')),
'module': yang_data
}