F5 TMOS#
RESTSH_MODULES=("cert" "custom" "f5")
All functions for this module are prefixed with f5..
Example configuration file: .restsh-config.dist.f5
This module provides autocompletion for the REST API. All endpoints are starting with /mgmt/.
Authentication#
You can use basic or token based authentication.
See Passwords and Secrets for storing the credentials encrypted.
[ -n "${RESTSH_USER+x}" ] || export RESTSH_USER="<user>"
[ -n "${RESTSH_PASS+x}" ] || export RESTSH_PASS="<password>"
Basic authentication#
[ -n "${RESTSH_AUTH+x}" ] || export RESTSH_AUTH="basic"
Token based authentication#
[ -n "${RESTSH_AUTH+x}" ] || export RESTSH_AUTH="token"
[ -n "${RESTSH_TOKEN_HEADER+x}" ] || export RESTSH_TOKEN_HEADER="X-F5-Auth-Token"
Call f5.auth.token.get to retrieve the token. It uses the provided username and password to retrieve the token and sets the RESTSH_TOKEN_VALUE environment variable. The initial token is retrieved on startup and renewal is also managed by Restsh.
General usage hints#
Device Groups#
You should do administrative tasks on the active device in a cluster. Call f5.cluster.setactive before any other command to connect to the active F5 device.
FullPath object names in URLs#
FullPaths of F5 objects are including a / and they must escaped in URLs by replacing the / with a ~. In Bash you can do this with a simple inline variable expression: ${VS//\//\~}
FullPath:
/Common/testTransformed:
~Common~test