Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
cosmos
Advisor
Jump to solution

clish load configuration "merge"

Is there a way to merge a [partial] Gaia configuration file with existing? like "load sys config merge file" or "load config partial from x-path ... mode merge"?

I've started building a lab for a customer with about 200 sub-interfaces and literally thousands of static routes. Since it's a lab I've had to massage the config a bit. Now... pasting the config directly in clish is a bit hit-or-miss with partial lines resulting in errors, so I thought I'd throw the config into a file and load it instead.

Great in theory - impossible in practice if a command in the config is valid but clish would throw an exception e.g. "NMSETH0049 VLAN eth2.400 already exists.". 

So I'm stuck either editing my config file and removing the lines that already took from the CLI, or back to pasting in the shell. Neither of these are a productive use of my time.

Is there any way we can either a) force clish to continue to read the file if there was a line with an error or b) merge the config so something that already exists is not overwritten?

It's the same issue with vsx_provisioning_tool - if something broke in transaction 6 you have to modify the file to load from that transaction otherwise the previous ones result in an error.

I'm sensing another theme here... 🙂

0 Kudos
1 Solution

Accepted Solutions
Olavi_Lentso
Contributor

Look at sk102234, maybe this one is what you are looking for:

HostName > set clienv on-failure continue
HostName > load configuration <filename>
HostName > set clienv on-failure stop
HostName > save config

View solution in original post

2 Replies
cosmos
Advisor

I found a rather inelegent solution... copy/paste the "add interface .. vlan" commands, because the shell will accept input after error. Load the rest from file.

I'm sure there's a better way but going with what works now 🙂

 

0 Kudos
Olavi_Lentso
Contributor

Look at sk102234, maybe this one is what you are looking for:

HostName > set clienv on-failure continue
HostName > load configuration <filename>
HostName > set clienv on-failure stop
HostName > save config

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events