ServerService
from skipcheck_tm1.services import ServerService The server: what it is (Server), how it's configured, and its loggers.
The static configuration is tm1s.cfg's, and the one to change; the active one
is what the server runs with now, read only.
Read the server's name and version:
server = tm1.server.server(ODataQuery.none().select(Server.NAME, Server.PRODUCT_VERSION))
return f"{server.name} runs TM1 {server.product_version}"
Read a setting the server runs with now:
# What the server runs with now, which can differ from tm1s.cfg until it restarts
administration = tm1.server.active_configuration().administration
return None if administration is None else administration.data_base_directory
Change a logger's level:
# Takes effect at once, without a restart
tm1.server.set_logger_level("TM1.Process", LogLevel.DEBUG)
The asyncio flavor, skipcheck_tm1.aio, has the same methods to await, on AsyncServerService.
Members
server | The server's name, version and ports. |
static_configuration | The settings the server started with, from tm1s.cfg. |
update_static_configuration | Changes tm1s.cfg; most settings take effect when the server next starts. |
active_configuration | The settings the server runs with now. |
configuration | The server's configuration in the older, flat form... |
loggers | The server's loggers and their levels. |
logger | GET Loggers('name'), such as TM1.Server; a Tm1NotFoundError if there's none. |
set_logger_level | Changes a logger's level, at once. |
server
server(query: ODataQuery | None = None, **options: Any) -> ServerGET Server: the server's name, version and ports. TM1 (11.8) sends no ETag for it.
TM1 REST Singleton Server
static_configuration
static_configuration(query: ODataQuery | None = None, **options: Any) -> ServerSettingsGET StaticConfiguration: the settings the server started with, from tm1s.cfg.
TM1 REST Singleton StaticConfiguration
update_static_configuration
update_static_configuration(patch: Any) -> NonePATCH StaticConfiguration: changes tm1s.cfg; most settings take effect when the server next starts. patch is a ServerSettingsPatch, a model or a mapping.
TM1 REST Singleton StaticConfiguration
active_configuration
active_configuration(query: ODataQuery | None = None, **options: Any) -> ServerSettingsGET ActiveConfiguration: the settings the server runs with now. Read only: TM1 (11.8) refuses a PATCH here ("PATCH not allowed on this resource"); settings change through update_static_configuration.
TM1 REST Singleton ActiveConfiguration
configuration
configuration(query: ODataQuery | None = None, **options: Any) -> ConfigurationGET Configuration: the server's configuration in the older, flat form.
.. deprecated:: 11.0.0 Deprecated in TM1 schema 11.0.0: use static_configuration and active_configuration.
TM1 REST Singleton Configuration
loggers
loggers(query: ODataQuery | None = None, **options: Any) -> list[Logger]GET Loggers: the server's loggers and their levels.
TM1 REST EntitySet Loggers
logger
logger(name: str, query: ODataQuery | None = None, **options: Any) -> LoggerGET Loggers('name'), such as TM1.Server; a Tm1NotFoundError if there's none.
TM1 REST EntitySet Loggers
set_logger_level
set_logger_level(name: str, level: LogLevel) -> NonePATCH Loggers('name'): changes a logger's level, at once.
TM1 REST EntitySet Loggers