Use Case: Letting Server Specify Counts
Requirement: Let the server specify the desired counts, instead of the client
The following model definition demonstrates how to let the server specify the features that should be assigned to a client device. The model uses the without requested features directive in combination with a feature specification. Note that the server cannot override a capability request containing desired features coming from the client.
The following rule assigns a count of feature f1 to each capability request with the hostname “myhost”.
Model Definition Example
model "exampleModel" {
partitions {
partition "p1" {
"f1" 1.0 10
}
}
on hostname("myhost") {
use "p1", "default"
without requested features {
"f1" 1.0 1
}
accept
}
}
You can also combine the without requested features directive with all from "partitionName". This variation will result in the first capability request receiving all counts from the specified partition. For a scenario where all from "partitionName" might be used, see Scenario: Server-specified Counts.
Note:Server-specified desired feature counts are automatically marked with the "partial" attribute, indicating that partial checkout is allowed if the feature’s count falls short of the desired count.