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 | None = None, 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=Union[Action, NoneType], required=False, default=None), '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] = {'extra': 'forbid'}
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