|
| 1 | +from ...testgres.operations.os_opsimportOsOperations |
| 2 | +from ...testgres.operations.os_opsimportConnectionParams |
| 3 | +from ...testgres.operations.local_opsimportLocalOperations |
| 4 | +from ...testgres.operations.remote_opsimportRemoteOperations |
| 5 | + |
| 6 | +importos |
| 7 | + |
| 8 | + |
| 9 | +classOsOpsDescr: |
| 10 | +os_ops:OsOperations |
| 11 | +sign:str |
| 12 | + |
| 13 | +def__init__(self,os_ops:OsOperations,sign:str): |
| 14 | +assertisinstance(os_ops,OsOperations) |
| 15 | +asserttype(sign)==str# noqa: E721 |
| 16 | +self.os_ops=os_ops |
| 17 | +self.sign=sign |
| 18 | + |
| 19 | + |
| 20 | +classOsOpsDescrs: |
| 21 | +sm_remote_conn_params=ConnectionParams( |
| 22 | +host=os.getenv('RDBMS_TESTPOOL1_HOST')or'127.0.0.1', |
| 23 | +username=os.getenv('USER'), |
| 24 | +ssh_key=os.getenv('RDBMS_TESTPOOL_SSHKEY')) |
| 25 | + |
| 26 | +sm_remote_os_ops=RemoteOperations(sm_remote_conn_params) |
| 27 | + |
| 28 | +sm_remote_os_ops_descr=OsOpsDescr(sm_remote_os_ops,"remote_ops") |
| 29 | + |
| 30 | +sm_local_os_ops=LocalOperations() |
| 31 | + |
| 32 | +sm_local_os_ops_descr=OsOpsDescr(sm_local_os_ops,"local_ops") |