summaryrefslogtreecommitdiff
path: root/src/helpers/simple-download.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-12-12 22:26:47 -0600
committerJohn Estabrook <jestabro@vyos.io>2023-12-13 19:53:13 -0600
commit90f2d9865051b00290dd5b7328a046e823b658dc (patch)
tree97ba9747db4fcb9d04aee22ca6f00a48b35378f1 /src/helpers/simple-download.py
parenta2b9477a3484999ca5d1acd65fbb19af4a5c1162 (diff)
downloadvyos-1x-90f2d9865051b00290dd5b7328a046e823b658dc.tar.gz
vyos-1x-90f2d9865051b00290dd5b7328a046e823b658dc.zip
image-tools: T5821: restore vrf-aware add system image
Diffstat (limited to 'src/helpers/simple-download.py')
-rwxr-xr-xsrc/helpers/simple-download.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/helpers/simple-download.py b/src/helpers/simple-download.py
new file mode 100755
index 000000000..501af75f5
--- /dev/null
+++ b/src/helpers/simple-download.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+import sys
+from argparse import ArgumentParser
+from vyos.remote import download
+
+parser = ArgumentParser()
+parser.add_argument('--local-file', help='local file', required=True)
+parser.add_argument('--remote-path', help='remote path', required=True)
+
+args = parser.parse_args()
+
+try:
+ download(args.local_file, args.remote_path,
+ check_space=True, raise_error=True)
+except Exception as e:
+ print(e)
+ sys.exit(1)
+
+sys.exit()