network gadget automation glorious environment
This is a joining of various automation scripts I've used in various places. As I switch things over to use this, I'll merge features and probably change some interfaces. Currently it should be considered a beta script as code is merged and tested. All components are used in production, but obviously the merge process may introduce bugs and growing pains.
Usage: ngage [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
commit commit changes on a device
config view and interact with the config
diff get diff from device
pull pull config from a device
push push config to a device
rollback rollback device config
Options:
--quiet no output at all
--verbose enable more verbose output
--home TEXT specify the home directory,
by default will check in order:
$NGAGE_HOME,
./.ngage,
~/.config/ngage
--debug enable extra debug output
Options:
--user TEXT username
--password TEXT password to use if not using key auth
--type TEXT type of connection, default eznc
--port TEXT port to connect to, default per platform
If auth fails, it will prompt for passowrd, for initial config to push users and ssh keys, you could do:
ngage push 00-system.conf --user=root $HOSTNAME
Usage: ngage push [OPTIONS] HOST [FILES]...
push config to a device
Options:
--quiet no output at all
--verbose enable more verbose output
--home TEXT specify the home directory, by default will
check in order: $NGAGE_HOME, ./.ngage,
/home/grizz/.config/ngage
--debug enable extra debug output
--password TEXT password to use if not using key auth
--user TEXT username
--type TEXT type of connection, default eznc
--port TEXT port to connect to, default per platform
--check / --no-check commit check config
--commit / --no-commit commit changes
--diff / --no-diff show diff of changes
--lock / --no-lock lock config for exclusive access
--rollback / --no-rollback rollback changes after push
--help Show this message and exit.
Usage: ngage pull [OPTIONS] HOST [FILENAME]
pull config from a device
Options:
--quiet no output at all
--verbose enable more verbose output
--home TEXT specify the home directory, by default will check in
order: $NGAGE_HOME, ./.ngage, /home/grizz/.config/ngage
--debug enable extra debug output
--password TEXT password to use if not using key auth
--user TEXT username
--type TEXT type of connection, default eznc
--port TEXT port to connect to, default per platform
--output-dir TEXT directory to save file to, will be named from filename
option
--help Show this message and exit.
Useful for debugging, working on device “directly” with a git log.
commit commit changes on a device
diff get diff from device
rollback rollback device config
By default ngage uses a native Junos client written with eznc, it also suppots
pushing config via a NAPALM plugin. To specify a NAPALM driver, use type=napalm:$driver
, for example type=napalm:ios
Documentation is created with mkdocs and available at http://ngage.readthedocs.io/en/latest/
Copyright 2015-2021 20C, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this softare except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.