Does anyone know how simulate scenario below and write on a reusable format? Your response is highly appreciated. Thanks!
Example I have this userdefine variable name "userInput" if user tries to enter these following metrics it should generate the corresponding request as well. Note variable name may varries from time to time depends on user selection.
Scenario 1 - network,cpu,process
{ "networkMetric": "network.json", "cpuMetric": "cpu_json", "processMetric": "process_json" }
Scenario 2 - cpu,process
{ "cpuMetric": "cpu_json", "processMetric": "process_json" }
Scenario 3 -network,cpu
{ "networkMetric": "network.json", "cpuMetric": "cpu_json" }
Scenario 4 - process
{ "processMetric": "process_json" }
CodePudding user response:
You can generate the "request" using a suitable
More information: