naming
This commit is contained in:
parent
e399f2e9f9
commit
a9f0394696
Binary file not shown.
@ -19,7 +19,7 @@ def downLoadFile(sftp, remotePath, localPath):
|
||||
sftp.get(fileattr.filename, os.path.join(localPath, fileattr.filename))
|
||||
'''
|
||||
|
||||
class SyncAgent(BaseAgent):
|
||||
class SftpClientAgent(BaseAgent):
|
||||
'''
|
||||
it give to you a sftp client for using to compute remote hash
|
||||
and basic ftp command to synchronize local and remote
|
||||
|
Binary file not shown.
@ -9,14 +9,14 @@ import gzip
|
||||
import asyncio
|
||||
import functools
|
||||
|
||||
from lib.sclient.agent import SyncAgent
|
||||
from lib.sclient.agent import SftpClientAgent
|
||||
|
||||
class RHAgent():
|
||||
def __init__(self, hostname, username):
|
||||
## load ssh config and read the ip of hostname
|
||||
self.hostname = hostname
|
||||
self.username = username
|
||||
self.agent = SyncAgent(hostname, username)
|
||||
self.agent = SftpClientAgent(hostname, username)
|
||||
|
||||
def get_sftp_client():
|
||||
a = self.agent
|
||||
|
28
src/project_structure.txt
Normal file
28
src/project_structure.txt
Normal file
@ -0,0 +1,28 @@
|
||||
.
|
||||
├─ project_structure.txt
|
||||
├─ testing
|
||||
│ ├─ diff_snap.py
|
||||
│ └─ sync.py
|
||||
├─ lib
|
||||
│ ├─ sclient
|
||||
│ │ ├─ agent.py
|
||||
│ │ └─ base_agent.py
|
||||
│ ├─ snapshot
|
||||
│ │ ├─ generate
|
||||
│ │ │ ├─ remote.py
|
||||
│ │ │ └─ local.py
|
||||
│ │ └─ dump.py
|
||||
│ └─ diff
|
||||
│ ├─ mdiff.py
|
||||
│ └─ fdiff.py
|
||||
├─ tools
|
||||
│ ├─ pretty_print.py
|
||||
│ ├─ tree_repr.py
|
||||
│ └─ parse_conf.py
|
||||
├─ iface
|
||||
│ ├─ snap.py
|
||||
│ ├─ sync
|
||||
│ └─ sync_manager.py
|
||||
├─ masync.py
|
||||
└─ conf
|
||||
└─ snapshot.conf
|
@ -1,14 +0,0 @@
|
||||
src
|
||||
├── lib - contains low level libraries
|
||||
│ │
|
||||
│ │
|
||||
│ ├── snapshot - libraries for generating, dumping and read snapshot
|
||||
│ │ │
|
||||
│ │ ├── generate - dump the snapshot
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ └── dump.py - dump the snapshot
|
||||
│
|
||||
└── iface
|
||||
│
|
||||
└──snap.py - Interface to low level library
|
Loading…
x
Reference in New Issue
Block a user