Skip to content

Commit 7f465f7

Browse files
committed
asking pass
1 parent 96d720a commit 7f465f7

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

netsim_wrapper/nso.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
2+
import getpass
33
from pathlib import Path
44
from collections import defaultdict
55

@@ -206,6 +206,8 @@ def fetch_neds(self):
206206
return set(self.default['device-mode']['name-based'].keys())
207207

208208
def download_neds(self):
209+
if not (self.default['username'] and self.default['password']):
210+
self.default['password'] = getpass.getpass('enter the user {}\'s password: '.format(self.default['username']))
209211
if not (self.default['username'] and self.default['password']):
210212
self.log.error("required <username> and <password> to download")
211213
self.utils.exit

netsim_wrapper/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def get_tar(self, file):
291291

292292
class Download(metaclass=Singleton):
293293
name = __name__
294-
cmd = ["curl", "-k"]
294+
cmd = ["curl", "--progress-bar", "-k"]
295295

296296
def __init__(self) -> None:
297297
self.utils = Utils()

tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# custom file ignore from tests folder
22
nso-run/
3+
*.bin
34
*cisco*

0 commit comments

Comments
 (0)