easy-utils-dev 2.160__tar.gz → 2.161__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/PKG-INFO +1 -1
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/ne1830PSS.py +19 -6
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/uiserver.py +1 -2
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev.egg-info/PKG-INFO +1 -1
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/setup.py +1 -1
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/MANIFEST.in +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/EasySsh.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/Events.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/FastQueue.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/NameObject.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/__init__.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/abortable.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/brevosmtp.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/check_license.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/cplib.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/custom_env.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/debugger.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/easy_oracle.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/encryptor.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/ept.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/ept_sql/create_dirs.sql +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/ept_sql/create_ept_tables.sql +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/exceptions.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/filescompressor.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/generate_license.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/keycloakapi.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/lralib.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/nsp_kafka.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/openid_server.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/optics_utils.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/require_auth.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/simple_sqlite.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/temp_memory.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/utils.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/winserviceapi.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/wsnoclib.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev/wsselib.py +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev.egg-info/SOURCES.txt +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev.egg-info/dependency_links.txt +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev.egg-info/requires.txt +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/easy_utils_dev.egg-info/top_level.txt +0 -0
- {easy_utils_dev-2.160 → easy_utils_dev-2.161}/setup.cfg +0 -0
|
@@ -61,6 +61,7 @@ class PSS1830 :
|
|
|
61
61
|
self.screenBuffer = ""
|
|
62
62
|
self.main_controller_client : paramiko.SSHClient = None
|
|
63
63
|
self.standby_controller_client : paramiko.SSHClient = None
|
|
64
|
+
self.verify_node_reachability_by_ping = False
|
|
64
65
|
self.create_jumphost = self.nfmtJumpServer
|
|
65
66
|
if self.auto_enable_tcp_forward :
|
|
66
67
|
self.logger.info(f'***WARNING*** : Auto enable tcp forwarding is enabled. This will allow tcp fowarding in target machine then restarting sshd service agent.')
|
|
@@ -439,6 +440,8 @@ class PSS1830 :
|
|
|
439
440
|
|
|
440
441
|
|
|
441
442
|
def verify_node_reachability(self , neip ) :
|
|
443
|
+
if not self.verify_node_reachability_by_ping :
|
|
444
|
+
return True
|
|
442
445
|
self.logger.debug(f"verify_node_reachability from jhost={self.isjumpserver}")
|
|
443
446
|
if self.isjumpserver == False :
|
|
444
447
|
if not pingAddress(neip) :
|
|
@@ -509,26 +512,33 @@ class PSS1830 :
|
|
|
509
512
|
return client
|
|
510
513
|
|
|
511
514
|
def port_switcher( self , mode ) :
|
|
512
|
-
if
|
|
513
|
-
|
|
515
|
+
if self.sim :
|
|
516
|
+
return 22
|
|
517
|
+
if mode == 'direct_cli':
|
|
518
|
+
# real be
|
|
519
|
+
# root cli@19.19,19,9
|
|
520
|
+
return 22
|
|
514
521
|
else:
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
return port
|
|
522
|
+
# real NE
|
|
523
|
+
# ssh root@10.0.0.1 -p 5122
|
|
524
|
+
return 5122
|
|
519
525
|
|
|
520
526
|
def _connect(self , mode='cli' , neip=None , rootpw='QUx1MTIj') :
|
|
521
527
|
self.client = self.createClient()
|
|
522
528
|
port = self.port_switcher(mode)
|
|
529
|
+
self.logger.debug(f"Auto switch to port : {port}")
|
|
523
530
|
try :
|
|
524
531
|
jhostserver = self.createJhostInstance(neip , port)
|
|
525
532
|
self.verify_node_reachability(neip)
|
|
526
533
|
ok = False
|
|
527
534
|
self.logger.debug(f"connecting to {neip} with mode={mode} and port={port}")
|
|
528
535
|
if mode == 'direct_cli' :
|
|
536
|
+
self.logger.debug("Mode direct_cli detected")
|
|
529
537
|
self.client.connect(neip , port , "cli" , '' , sock=jhostserver)
|
|
530
538
|
ok = True
|
|
531
539
|
elif mode == 'cli' or mode == 'ssh' :
|
|
540
|
+
self.logger.debug("Mode cli or ssh detected")
|
|
541
|
+
port = 22
|
|
532
542
|
self.client.connect( neip , port , "root" , rootpw , sock=jhostserver )
|
|
533
543
|
ok = True
|
|
534
544
|
self.logger.debug(f"client={self.client} ok={ok} port={port} mode={mode}")
|
|
@@ -580,6 +590,7 @@ class PSS1830 :
|
|
|
580
590
|
self.logger.debug(f"rootpw specified is obfuscated. Switch to plain text ...")
|
|
581
591
|
rootpw = self.encryptor.dec_base64(rootpw)
|
|
582
592
|
self.logger.debug(f"pw specified is obfuscated. Switch to plain text result {rootpw}")
|
|
593
|
+
# self.logger.info(f'root password is {rootpw}')
|
|
583
594
|
self.logger.debug(f'Opening SSH connection to NE {neip} mode={mode}, resetRequired={resetRequired}')
|
|
584
595
|
self.cliUser = user
|
|
585
596
|
self.mode = mode
|
|
@@ -640,6 +651,8 @@ class PSS1830 :
|
|
|
640
651
|
if mode == 'ssh' :
|
|
641
652
|
self.logger.debug(f"ssh mode detected. returning self.client object with no switch_to_cli_shell()")
|
|
642
653
|
self.connected = True
|
|
654
|
+
if return_channel :
|
|
655
|
+
return self.client , None
|
|
643
656
|
return self.client
|
|
644
657
|
self.channel = self.switch_to_cli_shell()
|
|
645
658
|
self.logger.debug(f'set timeout in rcv channel to {self.TIMEOUT}')
|
|
@@ -248,7 +248,6 @@ class UISERVER :
|
|
|
248
248
|
if request :
|
|
249
249
|
return Response().ok(
|
|
250
250
|
message='Result of async request found' ,
|
|
251
|
-
internalid=id ,
|
|
252
251
|
result=request.result ,
|
|
253
252
|
in_progress=request.in_progress ,
|
|
254
253
|
async_request=request.async_request ,
|
|
@@ -427,7 +426,7 @@ class UISERVER :
|
|
|
427
426
|
def _wait_th(self , t ) :
|
|
428
427
|
# t.join()
|
|
429
428
|
while True :
|
|
430
|
-
time.sleep(
|
|
429
|
+
time.sleep(36000)
|
|
431
430
|
|
|
432
431
|
|
|
433
432
|
def thrStartUi(self , suppress_prints=True) :
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|