Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
orchard
/
CSCS
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
132ca5ff
authored
Nov 12, 2018
by
jajapi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed updatePM.py
parent
9381e8e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
28 deletions
Mgmt/cmsmgmt/test.txt
Mgmt/cmsmgmt/updatePM.py
Mgmt/cmsmgmt/updatePM.py.bak
Mgmt/cmsmgmt/test.txt
deleted
100644 → 0
View file @
9381e8e4
192.168.0.172
Mgmt/cmsmgmt/updatePM.py
View file @
132ca5ff
...
...
@@ -4,7 +4,7 @@ import paramiko
import
getpass
### read serverlists
serverlist
=
open
(
"serverlist.txt"
,
'r'
)
serverlist
=
open
(
"
cms_
serverlist.txt"
,
'r'
)
serverhost
=
serverlist
.
readlines
()
...
...
@@ -28,9 +28,11 @@ for svrhost in serverhost:
sftp
=
paramiko
.
SFTPClient
.
from_transport
(
transport
)
filepath
=
'/home/orchard/Integration_uxen_check.sh'
localpath
=
'/home/
developer/Project
/CSCS/GuestPM/Integration/Integration_uxen_check.sh'
localpath
=
'/home/
orchard
/CSCS/GuestPM/Integration/Integration_uxen_check.sh'
sftp
.
put
(
localpath
,
filepath
)
print
(
"
%
s Successful updates"
%
host
)
sftp
.
close
()
transport
.
close
()
Mgmt/cmsmgmt/updatePM.py.bak
deleted
100644 → 0
View file @
9381e8e4
import paramiko
import getpass
serverlist = open("cms_serverlist.txt", 'r')
serverhost = serverlist.readlines()
password = getpass.getpass("orchard password :")
username = "orchard"
port = 22
for name in serverhost:
host = name.strip()
transport = paramiko.Transport((host,port))
transport.connect(username=username, password=password)
sftp=paramiko.SFTPClient.from_transport(transport)
filepath = '/home/orchard/Integration_uxen_check.sh'
localpath = '/home/developer/Project/CSCS/GuestPM/Integration/Integration_uxen_check.sh'
sftp.put(localpath,filepath)
sftp.close()
transport.close()
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