How can I express the following pact semantics in async messaging? There is either mandatory key, mandatory_cpu or mandatory_memory for a contract to be valid?
So, it seems there can be two separate pacts, one with mandatory_cpu and the other with mandatory_memory key.
For cpu pact, I need help on how to express multiple level_2 list which can be empty, can have optional keys, and must have mandatory_cpu.
Second wishful thinking is if I can combine both cpu and memory in same pact? Thanks.
Case 1:
“level_1” {
“level_2” {
“*mandatory_cpu*”: "value_1”
}
“level_2” {
}
“level_2” {
“optional_key_1”: “optional_value_1”
}
}
Case 2:
“level_1” {
“level_2” {
“optional_key_1”: “optional_value_1”
}
“level_2” {
}
“level_2” {
“*mandatory_memory*”: "value_2”
}
}