Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
8d9a36e0
Commit
8d9a36e0
authored
Oct 04, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sshconnection class: copy files recursively
parent
42141d9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ci-scripts/sshconnection.py
ci-scripts/sshconnection.py
+4
-4
No files found.
ci-scripts/sshconnection.py
View file @
8d9a36e0
...
@@ -193,9 +193,9 @@ class SSHConnection():
...
@@ -193,9 +193,9 @@ class SSHConnection():
def
copyin
(
self
,
ipaddress
,
username
,
password
,
source
,
destination
):
def
copyin
(
self
,
ipaddress
,
username
,
password
,
source
,
destination
):
count
=
0
count
=
0
copy_status
=
False
copy_status
=
False
logging
.
debug
(
'scp '
+
username
+
'@'
+
ipaddress
+
':'
+
source
+
' '
+
destination
)
logging
.
debug
(
'scp
-r
'
+
username
+
'@'
+
ipaddress
+
':'
+
source
+
' '
+
destination
)
while
count
<
10
:
while
count
<
10
:
scp_spawn
=
pexpect
.
spawn
(
'scp '
+
username
+
'@'
+
ipaddress
+
':'
+
source
+
' '
+
destination
,
timeout
=
100
)
scp_spawn
=
pexpect
.
spawn
(
'scp
-r
'
+
username
+
'@'
+
ipaddress
+
':'
+
source
+
' '
+
destination
,
timeout
=
100
)
scp_response
=
scp_spawn
.
expect
([
'Are you sure you want to continue connecting (yes/no)?'
,
'password:'
,
pexpect
.
EOF
,
pexpect
.
TIMEOUT
])
scp_response
=
scp_spawn
.
expect
([
'Are you sure you want to continue connecting (yes/no)?'
,
'password:'
,
pexpect
.
EOF
,
pexpect
.
TIMEOUT
])
if
scp_response
==
0
:
if
scp_response
==
0
:
scp_spawn
.
sendline
(
'yes'
)
scp_spawn
.
sendline
(
'yes'
)
...
@@ -232,9 +232,9 @@ class SSHConnection():
...
@@ -232,9 +232,9 @@ class SSHConnection():
def
copyout
(
self
,
ipaddress
,
username
,
password
,
source
,
destination
):
def
copyout
(
self
,
ipaddress
,
username
,
password
,
source
,
destination
):
count
=
0
count
=
0
copy_status
=
False
copy_status
=
False
logging
.
debug
(
'scp '
+
source
+
' '
+
username
+
'@'
+
ipaddress
+
':'
+
destination
)
logging
.
debug
(
'scp
-r
'
+
source
+
' '
+
username
+
'@'
+
ipaddress
+
':'
+
destination
)
while
count
<
4
:
while
count
<
4
:
scp_spawn
=
pexpect
.
spawn
(
'scp '
+
source
+
' '
+
username
+
'@'
+
ipaddress
+
':'
+
destination
,
timeout
=
100
)
scp_spawn
=
pexpect
.
spawn
(
'scp
-r
'
+
source
+
' '
+
username
+
'@'
+
ipaddress
+
':'
+
destination
,
timeout
=
100
)
scp_response
=
scp_spawn
.
expect
([
'Are you sure you want to continue connecting (yes/no)?'
,
'password:'
,
pexpect
.
EOF
,
pexpect
.
TIMEOUT
])
scp_response
=
scp_spawn
.
expect
([
'Are you sure you want to continue connecting (yes/no)?'
,
'password:'
,
pexpect
.
EOF
,
pexpect
.
TIMEOUT
])
if
scp_response
==
0
:
if
scp_response
==
0
:
scp_spawn
.
sendline
(
'yes'
)
scp_spawn
.
sendline
(
'yes'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment