1.2.16. web_tools

This module contains various functions related to the web-serving configuration of the server.

1.2.16.1. Functions

get_hostnames(config)[source]

List the hostnames that are configured for this server instance. This list is generated by first checking the server’s configuration for the hostnames option. Then if vhost_directories is enabled, the webroot is checked for additional values.

Note

This function makes no attempt to validate these values, they are strictly what have been configured for use.

New in version 1.13.0.

Parameters:config (smoke_zephyr.configuration.Configuration) – Configuration to retrieve settings from.
Returns:A tuple of the enumerated hostnames.
Return type:tuple
get_vhost_directories(config)[source]

List the hostnames that are configured through the Virtual Host directories. If the server option vhost_directories is disabled, this function returns None.

New in version 1.13.0.

Parameters:config (smoke_zephyr.configuration.Configuration) – Configuration to retrieve settings from.
Returns:A tuple of the enumerated virtual hostname directories.
Return type:tuple