StubConnector#

class ansys.scade.pyalmgw.stub.StubConnector(id: str, project: scade.model.project.stdproject.Project | None = None)#

Bases: ansys.scade.pyalmgw.connector.Connector

Stubs the Connector class for unit testing and example.

Overview#

get_stub_file

Return a stub requirements file for ALM Gateway.

on_export

Export traceability links and Contributing Elements (surrogate model).

on_import

Import requirements and traceability links to ALM Gateway.

on_locate

Stub the command locate.

on_manage

Stub the command manage.

on_settings

Stub the command settings.

Import detail#

from ansys.scade.pyalmgw.stub import StubConnector

Method detail#

StubConnector.get_stub_file() pathlib.Path#

Return a stub requirements file for ALM Gateway.

The function makes a local copy of a resource file so that it can be modified by the ALMGW commands.

Returns:
Path

Path of the requirements file.

StubConnector.on_export(links: pathlib.Path, pid: int) int#

Export traceability links and Contributing Elements (surrogate model).

Parameters:
linksPath

Path of a JSON file that contains the links to add and remove.

pidint

SCADE product process ID.

StubConnector.on_import(file: pathlib.Path, pid: int) int#

Import requirements and traceability links to ALM Gateway.

The function copies the stub file to the provided path.

Parameters:
pathPath

Absolute path where the XML requirements file is saved.

pidint

SCADE product process ID.

StubConnector.on_locate(req: str, pid: int) int#

Stub the command locate.

StubConnector.on_manage(pid: int) int#

Stub the command manage.

StubConnector.on_settings(pid: int) int#

Stub the command settings.