IProductInstanceVersionConfiguration#

class ansys.saf.product_configuration.interfaces.IProductInstanceVersionConfiguration#

Bases: Protocol

Interface to configure a given version of a product instance.

Overview#

service_name

This is the name of the service that is exposed by the instance management system (HPS or PIM)

enable_secure_flags

Must be set to True for the product instance to use the secure communication command line arguments.

linux_local_secure_flags

The command line arguments needed to configure the product instance for secure local communication on

linux_uds_id

Template for the uds_id, which is used to identify the socket file for UDS communication.

windows_local_secure_flags

The command line arguments needed to configure the product instance for secure local communication on

remote_secure_flags

The command line arguments needed to configure the product instance for secure remote communication.

insecure_flags

The command line arguments needed to configure the product instance for insecure communication.

execution_command

This is the command line used to start the product instance process.

environment

The environment variables that will be set in the environment running the execution_command.

software_requirements

(For HPS only!) The software that must be installed on the node running the execution_command.

exe_path_for_pim

(For PIM only!) The path to the product’s executable.

health_route

The health route for the service. Typically ‘/health’ for a HTTP service.

service_type

The type of service: grpc, http or tcp.

Import detail#

from ansys.saf.product_configuration.interfaces import IProductInstanceVersionConfiguration

Property detail#

property IProductInstanceVersionConfiguration.service_name: str#

This is the name of the service that is exposed by the instance management system (HPS or PIM) that identifies it from other services.

It should be consistent with the name used in the PIM light amd PIM K8S configurations. Typically its something simple like grpc or http.

property IProductInstanceVersionConfiguration.enable_secure_flags: bool#

Must be set to True for the product instance to use the secure communication command line arguments.

property IProductInstanceVersionConfiguration.linux_local_secure_flags: str#

The command line arguments needed to configure the product instance for secure local communication on Linux.

property IProductInstanceVersionConfiguration.linux_uds_id: str#

Template for the uds_id, which is used to identify the socket file for UDS communication.

property IProductInstanceVersionConfiguration.windows_local_secure_flags: str#

The command line arguments needed to configure the product instance for secure local communication on Windows.

property IProductInstanceVersionConfiguration.remote_secure_flags: str#

The command line arguments needed to configure the product instance for secure remote communication.

property IProductInstanceVersionConfiguration.insecure_flags: str#

The command line arguments needed to configure the product instance for insecure communication.

property IProductInstanceVersionConfiguration.execution_command: str#

This is the command line used to start the product instance process.

It can contain template variables in the form ${VAR}. Supported variables are:

  • PORT: an integer which is the port that the process should expose its service on.

  • EXECUTABLE: the full path to the executable using either the first product listed in the software_requirements for HPS or the path specified by exe_path_for_pim for PIM.

Note that for PIM this code runs just once during the YAML file generation that PIM later uses to launch the products. Thus, it’s not feasible to generate and assign resources here for each launch. For instance, attempting to generate a temporary file/directory here and passing it to the command won’t work as expected.

property IProductInstanceVersionConfiguration.environment: dict[str, str]#

The environment variables that will be set in the environment running the execution_command.

property IProductInstanceVersionConfiguration.software_requirements: list[ISoftware]#

(For HPS only!) The software that must be installed on the node running the execution_command.

Find built-in products at ansys-rep-application-plugins.

property IProductInstanceVersionConfiguration.exe_path_for_pim: str#

(For PIM only!) The path to the product’s executable.

property IProductInstanceVersionConfiguration.health_route: str | None#

The health route for the service. Typically ‘/health’ for a HTTP service.

property IProductInstanceVersionConfiguration.service_type: ServiceType#

The type of service: grpc, http or tcp.