class InfluencedResourcesResponseModel(AbstractResponse): """Returns an array of the resources influenced by the action.""" PROPERTIES = [ ArrayField(name="resource_descriptors", items_type=GenericModel, required=True) ]
class ReleaseResourcesParamsModel(AbstractAPIModel): """Release the given resources names. Args: resources (list): list of str. resource names to be released. """ PROPERTIES = [ ArrayField(name="resources", items_type=StringField("resource_name"), example=["calc1", "calc2"], required=True), StringField(name="token", required=True) ]
class LockResourcesParamsModel(AbstractAPIModel): """Lock the given described resources. Args: descriptors (list): list of ResourceDescriptorModel - the required resource to be locked. """ PROPERTIES = [ ArrayField(name="descriptors", items_type=ResourceDescriptorModel, required=True), StringField(name="token", required=True) ]
class UpdateResourcesParamsModel(AbstractAPIModel): """Update the given resources test data. Args: descriptors (list): list of ResourceDescriptorModel. The resources to be updated. test_details (TestControlOperationParamsModel): the details of the relevant session datas. """ PROPERTIES = [ ArrayField(name="descriptors", items_type=ResourceDescriptorModel, required=True), ModelField(name="test_details", model=TestControlOperationParamsModel, required=True, location="query") ]
class TestModel(AbstractAPIModel): """Test model structure. Args: id (number): the id of the test. name (str): the name of the test. class (str): the classname of the test. subtests (list): list of TestModel. Sub-tests of the current test. """ TITLE = "Test" PROPERTIES = [ NumberField(name="id"), StringField(name="name"), StringField(name="class"), ArrayField(name="subtests", items_type=DynamicType("TestModel", "rotest.api.common.models")) ]