Fix for redfishtool certificate, snmp and session management

Changes:
  - Set cert_id as test variable
  - Remove colon in snmp destination when the snmp port is empty
  - Fix redfish_delete_sessions assign location
  - Set REDFISH_DELETE_SESSIONS to 0 in suite setup
  - Set REDFISH_DELETE_SESSIONS back to 1 in suite teardown

Tested:
  - redfish/service_root/test_sessions_management.robot
  - redfish/dmtf_tools/test_redfishtool_certificate.robot
  - redfish/events/test_bmc_snmp_trap.robot

Change-Id: Ibb16d52b5874484f8cf169456e2feb4ba7593e71
Signed-off-by: Wilson Suen <wilsons@supermicro.com>
diff --git a/lib/bmc_redfish_utils.robot b/lib/bmc_redfish_utils.robot
index 6cb7526..fbac104 100644
--- a/lib/bmc_redfish_utils.robot
+++ b/lib/bmc_redfish_utils.robot
@@ -64,6 +64,16 @@
     Redfish.Post  ${target}  valid_status_codes=[${HTTP_OK}]
 
 
+Set Redfish Delete Session Flag
+    [Documentation]  Disable or enable delete redfish while performing the power operation keyword.
+    [Arguments]  ${set_flag}
+
+    # Description of argument(s):
+    # set_flag    Set user specified enable(1) or disable(0).
+
+    Set Suite Variable  ${REDFISH_DELETE_SESSIONS}  ${set_flag}
+
+
 Redfish Delete Session
     [Documentation]  Redfish delete session.
     [Arguments]  ${session_info}