Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Commit

Permalink
Fixed minor issue with the dummy generator
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Apr 28, 2017
1 parent 015dd39 commit 56658e6
Show file tree
Hide file tree
Showing 28 changed files with 1,095 additions and 15 deletions.
28 changes: 13 additions & 15 deletions generate_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,20 @@ def process(model, r_config, r_state):
r_state[model._yang_name] = {"_process": "not_implemented"}
return

for k, v in ctr:
if model._yang_name == "config":
rr_config = r_config[model._yang_name]
rr_config["_process"] = "not_implemented"
rr_state = r_state
elif v._is_config:
rr_config = r_config[model._yang_name]
rr_config["_process"] = "not_implemented"
rr_state = r_state[model._yang_name]
rr_state["_process"] = "not_implemented"
else:
rr_config = r_config
rr_state = r_state[model._yang_name]
rr_state["_process"] = "not_implemented"
if model._yang_name == "config":
r_config = r_config[ctr._yang_name]
r_config["_process"] = "not_implemented"
elif model._is_config:
r_config = r_config[ctr._yang_name]
r_config["_process"] = "not_implemented"
r_state = r_state[ctr._yang_name]
r_state["_process"] = "not_implemented"
else:
r_state = r_state[ctr._yang_name]
r_state["_process"] = "not_implemented"

process_module(v, model._defining_module, rr_config, rr_state)
for k, v in ctr:
process_module(v, model._defining_module, r_config, r_state)


def process_module(model, module, r_config=None, r_state=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ aggregation:
_process: not_implemented
min-links:
_process: not_implemented
state:
_process: not_implemented
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ ethernet:
_process: not_implemented
port-speed:
_process: not_implemented
state:
_process: not_implemented
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ autoconf:
_process: not_implemented
temporary-valid-lifetime:
_process: not_implemented
state:
_process: not_implemented
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ipv4:
_process: not_implemented
ip:
_process: not_implemented
state:
_process: not_implemented
vrrp:
_process: not_implemented
vrrp-group:
Expand Down Expand Up @@ -44,6 +46,10 @@ ipv4:
_process: not_implemented
track-interface:
_process: not_implemented
state:
_process: not_implemented
state:
_process: not_implemented
virtual-router-id:
_process: not_implemented
config:
Expand All @@ -64,6 +70,10 @@ ipv4:
_process: not_implemented
ip:
_process: not_implemented
state:
_process: not_implemented
state:
_process: not_implemented
unnumbered:
_process: not_implemented
config:
Expand All @@ -78,3 +88,7 @@ ipv4:
_process: not_implemented
subinterface:
_process: not_implemented
state:
_process: not_implemented
state:
_process: not_implemented
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ipv6:
_process: not_implemented
ip:
_process: not_implemented
state:
_process: not_implemented
vrrp:
_process: not_implemented
vrrp-group:
Expand Down Expand Up @@ -46,6 +48,10 @@ ipv6:
_process: not_implemented
track-interface:
_process: not_implemented
state:
_process: not_implemented
state:
_process: not_implemented
virtual-router-id:
_process: not_implemented
config:
Expand All @@ -68,6 +74,10 @@ ipv6:
_process: not_implemented
ip:
_process: not_implemented
state:
_process: not_implemented
state:
_process: not_implemented
unnumbered:
_process: not_implemented
config:
Expand All @@ -82,3 +92,7 @@ ipv6:
_process: not_implemented
subinterface:
_process: not_implemented
state:
_process: not_implemented
state:
_process: not_implemented
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ interfaces:
_process: not_implemented
up:
_process: not_implemented
state:
_process: not_implemented
name:
_process: not_implemented
state:
_process: not_implemented
subinterfaces:
_process: not_implemented
subinterface:
Expand All @@ -44,3 +48,5 @@ interfaces:
_process: not_implemented
index:
_process: not_implemented
state:
_process: not_implemented
Loading

0 comments on commit 56658e6

Please sign in to comment.