Skip to main content
Version: 8.1

system.util.getGatewayStatus

This function is used in Python Scripting.

Description​

Returns a string that indicates the status of the Gateway. A status of RUNNING means that the Gateway is fully functional. Thrown exceptions return "ERROR" with the error message appended to the string. This function can be used to test all 7.7 and later Gateways. The function can also be used to test 7.6 (7.6.4 and later) and 7.5 (7.5.11 and later) Gateways. Attempting to test Gateways older than these versions will return errors.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.util.getGatewayStatus(gatewayAddress, [connectTimeoutMillis], [socketTimeoutMillis])

Parameters​

TypeParameterDescription
StringgatewayAddressThe Gateway address to ping, in the form of ADDR:PORT/main.
IntegerconnectTimeoutMillisThe maximum time in milliseconds to attempt to initially contact a Gateway. [optional]
IntegersocketTimeoutMillisThe maximum time in milliseconds to wait for a response from a Gateway after initial connection has been established. [optional]
BooleanbypassCertValidationIf the target address is an HTTPS address, and this parameter is True, the system will bypass all SSL certificate validation. This is not recommended, though is sometimes necessary for self-signed certificates.

Returns​

String - A string that indicates the status of the Gateway. A status of RUNNING means that the Gateway is fully functional.

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Example #1
def checkRemoteGateway():

status = system.util.getGatewayStatus("10.20.6.253:8088/main")

if status == "RUNNING":
print "Central Gateway is available!"
else:
print "Error: " + status

# It's important to do this as an asynchronous operation, as the method
# may block for some time.
system.util.invokeAsynchronous(checkRemoteGateway)