testframework.clients.ops.api_model moduleď
This module contains the API models used in the integration tests framework.
These classes are partly autogenerated based on the openapi schema of the ops api
- class testframework.clients.ops.api_model.Action(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)ď
Bases:
Enum
Available Actions
- Charge = 'Charge'ď
- Discharge = 'Discharge'ď
- GridCharge = 'GridCharge'ď
- GridDischarge = 'GridDischarge'ď
- SelfConsumption = 'SelfConsumption'ď
- SocCharge = 'SocCharge'ď
- class testframework.clients.ops.api_model.DeviceAttribute(*, unit: ElectroUnitEnum | None, globalSensorName: str | None = None, value: float | None = None, timeStampUtc: datetime = None, text: str | None = None)ď
Bases:
BaseModel
- globalSensorName: str | Noneď
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}ď
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}ď
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'globalSensorName': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The global wide define enpal name for this value'), 'text': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='string based property'), 'timeStampUtc': FieldInfo(annotation=datetime, required=False, default=None, description='TimeStamp of Parameter Change'), 'unit': FieldInfo(annotation=Union[ElectroUnitEnum, NoneType], required=True), 'value': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Digit Based values like Rated Power')}ď
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- text: str | Noneď
- timeStampUtc: datetimeď
- unit: ElectroUnitEnum | Noneď
- value: float | Noneď
- class testframework.clients.ops.api_model.DeviceClassEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)ď
Bases:
Enum
- Battery = 'Battery'ď
- Calculated = 'Calculated'ď
- Heatpump = 'Heatpump'ď
- Inverter = 'Inverter'ď
- IoTEdgeDevice = 'IoTEdgeDevice'ď
- PowerSensor = 'PowerSensor'ď
- Unknown = 'Unknown'ď
- Wallbox = 'Wallbox'ď
- class testframework.clients.ops.api_model.DeviceProperties(*, timeStampUtc: datetime | None = None, deviceId: UUID | None = None, serialNumber: str | None = None, manufacturer: str | None = None, type: str | None = None, deviceClass: DeviceClassEnum | None = None, identifiers: dict[str, str] | None = None, attributes: list[DeviceAttribute] | None = None, eTag: str | None = None)ď
Bases:
BaseModel
- attributes: list[DeviceAttribute] | Noneď
- deviceClass: DeviceClassEnum | Noneď
- deviceId: UUID | Noneď
- eTag: str | Noneď
- identifiers: dict[str, str] | Noneď
- manufacturer: str | Noneď
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}ď
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}ď
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'attributes': FieldInfo(annotation=Union[list[DeviceAttribute], NoneType], required=False, default=None), 'deviceClass': FieldInfo(annotation=Union[DeviceClassEnum, NoneType], required=False, default=None), 'deviceId': FieldInfo(annotation=Union[UUID, NoneType], required=False, default=None), 'eTag': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'identifiers': FieldInfo(annotation=Union[dict[str, str], NoneType], required=False, default=None), 'manufacturer': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'serialNumber': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'timeStampUtc': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='DateTime of Value received'), 'type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}ď
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- serialNumber: str | Noneď
- timeStampUtc: datetime | Noneď
- type: str | Noneď
- class testframework.clients.ops.api_model.ElectroUnitEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)ď
Bases:
Enum
- A = 'A'ď
- Ah = 'Ah'ď
- Celcius = 'Celcius'ď
- Hz = 'Hz'ď
- KiloOhm = 'KiloOhm'ď
- MegaOhm = 'MegaOhm'ď
- Minutes = 'Minutes'ď
- None_ = 'None'ď
- Ohm = 'Ohm'ď
- Percent = 'Percent'ď
- V = 'V'ď
- VA = 'VA'ď
- W = 'W'ď
- Wh = 'Wh'ď
- kVA = 'kVA'ď
- kVAR = 'kVAR'ď
- kW = 'kW'ď
- kWh = 'kWh'ď
- mA = 'mA'ď
- class testframework.clients.ops.api_model.ErrorResponse(*, errorId: str | None = None, description: str | None = None)ď
Bases:
BaseModel
- description: str | Noneď
- errorId: str | Noneď
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}ď
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}ď
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='human readable error message'), 'errorId': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Error ID that can be used for handling different error types')}ď
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class testframework.clients.ops.api_model.GridControlResponse(*, executionTimeSec: float | None = None)ď
Bases:
BaseModel
- executionTimeSec: float | Noneď
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}ď
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}ď
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'executionTimeSec': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='execution time in seconds')}ď
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class testframework.clients.ops.api_model.HeartbeatRequest(*, withinDuration: bool | None = None, type: PowerLimitType | None = None)ď
Bases:
BaseModel
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}ď
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}ď
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Union[PowerLimitType, NoneType], required=False, default=None), 'withinDuration': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None)}ď
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- type: PowerLimitType | Noneď
- withinDuration: bool | Noneď
- class testframework.clients.ops.api_model.LoadLimitRequest(*, value: int | None = None, isActive: bool | None = None, durationSec: float | None = None)ď
Bases:
BaseModel
Request Object for grid control routes. The original model had all as optional.
- durationSec: float | Noneď
- isActive: bool | Noneď
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}ď
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}ď
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'durationSec': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'isActive': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'value': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}ď
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- value: int | Noneď
- class testframework.clients.ops.api_model.MeasurementUnitType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)ď
Bases:
Enum
- A = 'A'ď
- Ah = 'Ah'ď
- Celcius = 'Celcius'ď
- Hz = 'Hz'ď
- KiloOhm = 'KiloOhm'ď
- MegaOhm = 'MegaOhm'ď
- Minutes = 'Minutes'ď
- None_ = 'None'ď
- Ohm = 'Ohm'ď
- Percent = 'Percent'ď
- V = 'V'ď
- VA = 'VA'ď
- W = 'W'ď
- Wh = 'Wh'ď
- kVA = 'kVA'ď
- kW = 'kW'ď
- kWh = 'kWh'ď
- mA = 'mA'ď
- class testframework.clients.ops.api_model.NumberDataPoint(*, timeStampUtcOfMeasurement: datetime | None = None, unit: ElectroUnitEnum | None = None, value: float | None = None)ď
Bases:
BaseModel
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}ď
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}ď
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'timeStampUtcOfMeasurement': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None), 'unit': FieldInfo(annotation=Union[ElectroUnitEnum, NoneType], required=False, default=None), 'value': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Digit Based values like Rated Power')}ď
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- timeStampUtcOfMeasurement: datetime | Noneď
- unit: ElectroUnitEnum | Noneď
- value: float | Noneď
- class testframework.clients.ops.api_model.PowerLimitType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)ď
Bases:
Enum
- Lpc = 'Lpc'ď
- Lpp = 'Lpp'ď
- class testframework.clients.ops.api_model.PvActionRequest(*, mode: Action, powerInWatts: int | None = None, targetSoc: float | None = None)ď
Bases:
BaseModel
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}ď
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}ď
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'mode': FieldInfo(annotation=Action, required=True), 'powerInWatts': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The power to charge or discharge with'), 'targetSoc': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='The desired SoC of the battery')}ď
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- powerInWatts: int | Noneď
- targetSoc: float | Noneď
- class testframework.clients.ops.api_model.SensorValue(*, globalSensorName: str | None = None, text: str | None = None, number: float | None = None, unit: MeasurementUnitType | None = None, timeStampUtc: AwareDatetime | None = None)ď
Bases:
BaseModel
- globalSensorName: str | Noneď
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}ď
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}ď
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'globalSensorName': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'number': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'text': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'timeStampUtc': FieldInfo(annotation=Union[AwareDatetime, NoneType], required=False, default=None), 'unit': FieldInfo(annotation=Union[MeasurementUnitType, NoneType], required=False, default=None)}ď
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- number: float | Noneď
- text: str | Noneď
- timeStampUtc: AwareDatetime | Noneď
- unit: MeasurementUnitType | Noneď