VCSAG_GET_CONTAINER_BASE_PATH

Note:

This API is not supported for Linux Docker containers.

This API returns the base path of the container as mentioned under the ContainerInfo attribute at group level. This API must be called from the global zone or WPAR.

Perl based: Returns the API exits status, command status and container base path as return value.

Return values:

0

If VCSAG_GET_CONTAINER_INFO is called before and ContainerInfo is set properly, which means

  • Name is set to <valid_container_name>

  • Type is set to <valid_container_type>

  • Enabled is set to 1

Container's base path will be returned as return value.

4

If VCSAG_GET_CONTAINER_INFO API is not called before or if ContainerInfo attribute is not set for the resource. For example, Name key of ContainerInfo is "" or Type key of ContainerInfo is invalid etc.

5

If command to fetch base path of container fails. the command status is returned as return value.

Usage:

my ($ret, $cmdstatus, $container_base_path) = 
VCSAG_GET_CONTAINER_BASE_PATH();

Shell based:

This API returns the base path of container in environment variable VCSAG_CONTAINER_BASE_PATH and the status of the command which is used by api to fetch base path name in the environment variable VCSAG_CMD_STATUS. The API returns the exit status in the environment variable VCSAG_BASE_PATH_RET_VAL.

Return values:

0

If VCSAG_GET_CONTAINER_INFO is called before and ContainerInfo is set properly, which means

  • Name is set to <valid_container_name>

  • Type is set to <valid_container_type>

  • Enabled is set to 1

Container's base path will be stored in environment variable VCSAG_CONTAINER_BASE_PATH parameter.

4

If VCSAG_GET_CONTAINER_INFO API is not called before or if ContainerInfo attribute is not set for the resource. For example, Name key of ContainerInfo is "" or Type key of ContainerInfo is invalid etc.

5

If command to fetch base path of container fails. The environment variable VCSAG_CMD_STATUS, will be updated accordingly with exit status of the command.

Usage:

VCSAG_GET_CONTAINER_BASE_PATH
base_path=${VCSAG_CONTAINER_BASE_PATH}

Note:

Before you use this API, the user should call the API VCSAG_GET_CONTAINER_INFO. VCSAG_GET_CONTAINER_INFO API will set container name and type appropriately which will be required for this API.