summaryrefslogtreecommitdiff
path: root/src/helpers/simple-download.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-14 06:50:19 +0100
committerGitHub <noreply@github.com>2023-12-14 06:50:19 +0100
commita9ff143fc1e9a95ac2f375db0bd06a8a43fa860e (patch)
tree7d6bf8c584e73ab51091caf2acd5c5dc9862b0b3 /src/helpers/simple-download.py
parent8ae998da8aa000df389a7116bcca4f4d5d1e0698 (diff)
parent90f2d9865051b00290dd5b7328a046e823b658dc (diff)
downloadvyos-1x-a9ff143fc1e9a95ac2f375db0bd06a8a43fa860e.tar.gz
vyos-1x-a9ff143fc1e9a95ac2f375db0bd06a8a43fa860e.zip
Merge pull request #2624 from jestabro/vrf-aware-add-image
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()