diff --git a/hyperglass/configuration/models/routers.py b/hyperglass/configuration/models/routers.py index ba5e83b..705fc8b 100644 --- a/hyperglass/configuration/models/routers.py +++ b/hyperglass/configuration/models/routers.py @@ -20,7 +20,6 @@ from hyperglass.configuration.models.vrfs import Vrf, Info from hyperglass.configuration.models.proxies import Proxy from hyperglass.configuration.models.networks import Network from hyperglass.configuration.models.credentials import Credential -from hyperglass.configuration.models.commands.common import CommandGroup _default_vrf = { "name": "default", @@ -51,7 +50,7 @@ class Router(HyperglassModel): port: StrictInt ssl: Optional[Ssl] nos: StrictStr - commands: Optional[CommandGroup] + commands: Optional[StrictStr] vrfs: List[Vrf] = [_default_vrf] display_vrfs: List[StrictStr] = [] vrf_names: List[StrictStr] = [] diff --git a/hyperglass/execution/construct.py b/hyperglass/execution/construct.py index 495693e..0bdc72b 100644 --- a/hyperglass/execution/construct.py +++ b/hyperglass/execution/construct.py @@ -134,7 +134,7 @@ class Construct: self.query_data.query_type, ) else: - cmd_paths = (self.device.nos, afi.protocol, self.query_data.query_type) + cmd_paths = (self.device.commands, afi.protocol, self.query_data.query_type) command = attrgetter(".".join(cmd_paths))(commands) return command.format(