'step': fields.String(required=True, description='New step for current \ recording scenario') }) RECORDER_POST = API.model( 'recorderPost', { 'scenario': fields.String(required=True, description='Current recording scenario'), 'step': fields.String(required=True, description='Current step of this scenario'), }) API_STATUS = API.model( 'APIStatus', {'status': fields.String(required=True, decription='Current API status')}) RUNNING_SCENARIO = API.inherit( 'runningScenario', RECORDER_POST, { 'environment': fields.String(required=True, description='Recorder identifier'), }) POWER_MEASUREMENT = API.inherit( 'powerMeasurement', RUNNING_SCENARIO, { 'power': fields.Integer(required=True, description='Power consumption in Watts'), })
enum=[0, 1, 2, 3, 4] ) }) WIFI_SETTINGS = API.model("wifiSetting", { "ssid": fields.String( required=True, description="Wifi network SSID" ), "passphrase": fields.String( required=True, description="Wifi network passphrase" ) }) WIFI_CONFIG = API.model("wifiConfig", { "mode": fields.String( required=True, description="Nominal wifi mode", enum=["client", "hotspot"] ), "client": fields.List( fields.Nested(WIFI_SETTINGS) ), "hotspot": fields.Nested(WIFI_SETTINGS) }) WIFI_CONFIG_EXTENDED = API.inherit("wifiConfigAdvanced", WIFI_CONFIG, { "networks": fields.List(fields.Nested(HOTSPOT)), "mac": fields.String( description="MAC Address" ) })