pub fn list_generic_plans(
config_json: &str,
filter: Option<&str>,
) -> Result<Vec<Value>>Expand description
List all generic plans in the configuration
§Arguments
config_json- Configuration JSON stringfilter- Optional filter string to search in records
§Returns
Returns a vector of plan objects in Python sz_configtool format
§Example
use sz_configtool_lib::generic_plans;
let config = r#"{"G2_CONFIG": {"CFG_GPLAN": [{"GPLAN_ID": 1, "GPLAN_CODE": "INGEST", "GPLAN_DESC": "Ingest Plan"}]}}"#;
let plans = generic_plans::list_generic_plans(config, None).unwrap();
assert_eq!(plans.len(), 1);