diff options
author | Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> | 2021-06-15 13:33:50 +0000 |
---|---|---|
committer | Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> | 2021-06-18 07:40:46 +0000 |
commit | 313750bef0318c2204ce869fb2bdc4d4043a20e6 (patch) | |
tree | c7d4045cce3fe7a47284e20d97c6d47830238d22 /miss_htbt_service/mod | |
parent | d39331be3f55876a8a6fc31c5a10f2d68eefe0b0 (diff) |
Remove unused code
Just remove unused code
Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com>
Issue-ID: DCAEGEN2-2833
Change-Id: If81a5fcb918a2683e261807d6a3da5a8648e505d
Diffstat (limited to 'miss_htbt_service/mod')
-rw-r--r-- | miss_htbt_service/mod/trapd_runtime_pid.py | 4 | ||||
-rw-r--r-- | miss_htbt_service/mod/trapd_vnf_table.py | 21 |
2 files changed, 0 insertions, 25 deletions
diff --git a/miss_htbt_service/mod/trapd_runtime_pid.py b/miss_htbt_service/mod/trapd_runtime_pid.py index 7194b8f..d2db83d 100644 --- a/miss_htbt_service/mod/trapd_runtime_pid.py +++ b/miss_htbt_service/mod/trapd_runtime_pid.py @@ -56,11 +56,7 @@ def save_pid(_pid_file_name): except IOError: print("IOError saving PID file %s :" % _pid_file_name) return False - # except: - # print("Error saving PID file %s :" % _pid_file_name) - # return False else: - # print("Runtime PID file: %s" % _pid_file_name) return True diff --git a/miss_htbt_service/mod/trapd_vnf_table.py b/miss_htbt_service/mod/trapd_vnf_table.py index 001b566..81f1f3b 100644 --- a/miss_htbt_service/mod/trapd_vnf_table.py +++ b/miss_htbt_service/mod/trapd_vnf_table.py @@ -61,7 +61,6 @@ def hb_properties(): def verify_DB_creation_1(user_name,password,ip_address,port_num,db_name): connection_db = pm.postgres_db_open(user_name,password,ip_address,port_num,db_name) - # cur = connection_db.cursor() try: _db_status=pm.db_table_creation_check(connection_db,"vnf_table_1") except Exception as e: @@ -72,7 +71,6 @@ def verify_DB_creation_1(user_name,password,ip_address,port_num,db_name): def verify_DB_creation_2(user_name,password,ip_address,port_num,db_name): connection_db = pm.postgres_db_open(user_name,password,ip_address,port_num,db_name) - # cur = connection_db.cursor() try: _db_status=pm.db_table_creation_check(connection_db,"vnf_table_2") except Exception as e: @@ -83,7 +81,6 @@ def verify_DB_creation_2(user_name,password,ip_address,port_num,db_name): def verify_DB_creation_hb_common(user_name,password,ip_address,port_num,db_name): connection_db = pm.postgres_db_open(user_name,password,ip_address,port_num,db_name) - #cur = connection_db.cursor() try: _db_status=pm.db_table_creation_check(connection_db,"hb_common") except Exception as e: @@ -95,14 +92,12 @@ def verify_DB_creation_hb_common(user_name,password,ip_address,port_num,db_name) def verify_cbsPolling_required(): _cbspolling_status = True os.environ['pytest']='test' - #os.environ['CONSUL_HOST']='10.12.6.50' # Used this IP during testing os.environ['CONSUL_HOST']='localhost' os.environ['SERVICE_NAME']='mvp-dcaegen2-heartbeat-static' try: _cbspolling_status=cf.config_notif_run() except Exception as e: print("Config_notify error - %s" % e) - #return None os.unsetenv('pytest') os.unsetenv('CONSUL_HOST') @@ -115,9 +110,6 @@ def verify_cbspolling(): try: _cbspolling=cbs.pollCBS(10) except Exception as e: - # print("CBSP error - %s" % e) - # print("CBSP error - %s" % e, file=sys.stderr) - # print("Stack: {0}".format(traceback.format_exc()), file=sys.stderr) return None os.unsetenv('pytest') @@ -127,7 +119,6 @@ def verify_cbspolling(): def verify_fetch_json_file(): os.environ['pytest']='test' os.environ['SERVICE_NAME']='mvp-dcaegen2-heartbeat-static' - #os.environ['CONSUL_HOST']='10.12.6.50' # Used this IP during testing os.environ['CONSUL_HOST']='localhost' os.environ['HOSTNAME']='mvp-dcaegen2-heartbeat-static' try: @@ -145,7 +136,6 @@ def verify_fetch_json_file(): def verify_misshtbtdmain(): os.environ['pytest']='test' os.environ['SERVICE_NAME']='mvp-dcaegen2-heartbeat-static' - #os.environ['CONSUL_HOST']='10.12.6.50' os.environ['CONSUL_HOST']='localhost' os.environ['HOSTNAME']='mvp-dcaegen2-heartbeat-static' @@ -164,7 +154,6 @@ def verify_misshtbtdmain(): def verify_dbmonitoring(): os.environ['pytest']='test' os.environ['SERVICE_NAME']='mvp-dcaegen2-heartbeat-static' - #os.environ['CONSUL_HOST']='10.12.6.50' os.environ['CONSUL_HOST']='localhost' os.environ['HOSTNAME']='mvp-dcaegen2-heartbeat-static' try: @@ -188,18 +177,14 @@ def verify_dbmon_startup(): p = subprocess.Popen(['./miss_htbt_service/db_monitoring.py'], stdout=subprocess.PIPE,shell=True) time.sleep(1) except Exception as e: - #print("Message process error - %s" % e) return None return True def verify_sendControlLoop_VNF_ONSET(): try: -# _CL_return = sendControlLoopEvent(CLType, pol_url, policy_version, policy_name, policy_scope, target_type, srcName, epoc_time, closed_control_loop_name, version, target) pol_url = "http://10.12.5.252:3904/events/unauthenticated.DCAE_CL_OUTPUT/" _CL_return = dbmon.sendControlLoopEvent("ONSET", pol_url, "1.0", "vFireWall", "pscope", "VNF", "srcname1", 1541234567, "SampleCLName", "1.0", "genVnfName") except Exception as e: - #msg = "Message process error - ",err - #_logger.error(msg) return None return _CL_return @@ -208,8 +193,6 @@ def verify_sendControlLoop_VM_ONSET(): pol_url = "http://10.12.5.252:3904/events/unauthenticated.DCAE_CL_OUTPUT/" _CL_return = dbmon.sendControlLoopEvent("ONSET", pol_url, "1.0", "vFireWall", "pscope", "VM", "srcname1", 1541234567, "SampleCLName", "1.0", "genVnfName") except Exception as e: - #msg = "Message process error - ",err - #_logger.error(msg) return None return _CL_return @@ -218,8 +201,6 @@ def verify_sendControlLoop_VNF_ABATED(): pol_url = "http://10.12.5.252:3904/events/unauthenticated.DCAE_CL_OUTPUT/" _CL_return = dbmon.sendControlLoopEvent("ABATED", pol_url, "1.0", "vFireWall", "pscope", "VNF", "srcname1", 1541234567, "SampleCLName", "1.0", "genVnfName") except Exception as e: - #msg = "Message process error - ",err - #_logger.error(msg) return None return _CL_return @@ -228,7 +209,5 @@ def verify_sendControlLoop_VM_ABATED(): pol_url = "http://10.12.5.252:3904/events/unauthenticated.DCAE_CL_OUTPUT/" _CL_return = dbmon.sendControlLoopEvent("ABATED", pol_url, "1.0", "vFireWall", "pscope", "VM", "srcname1", 1541234567, "SampleCLName", "1.0", "genVnfName") except Exception as e: -# msg = "Message process error - ",err -# _logger.error(msg) return None return _CL_return |