exist
Code
- BIGIQ.exist(path: str) bool
Verifies if the object exists on the device.
Sends an HTTP GET request to the iControl REST API.
- Parameters:
path – HTTP path used in the HTTP request sent to the device.
- Exceptions:
RESTAPIError: Raised when iControl REST API returns an error.
Example
path = (
f"/mgmt/cm/adc-core/working-config/ltm/virtual"
f"?$filter=name eq 'bigrest_vs'"
)
if device.exist(path):
print(f"Virtual server exists.")
else:
print(f"Virtual server does not exist.")
Explanation
Verifies if the object exists.
In this example, verifies if virtual server “bigrest_vs” exists on the device.