pub fn set_generic_plan(
config_json: &str,
gplan_code: &str,
gplan_desc: &str,
) -> Result<(String, i64, bool)>Expand description
Set (create or update) a generic plan
§Arguments
config_json- Configuration JSON stringgplan_code- Plan codegplan_desc- Plan description
§Returns
Returns (modified_config, plan_id, was_created) tuple on success
§Example
use sz_configtool_lib::generic_plans;
let config = r#"{"G2_CONFIG": {"CFG_GPLAN": []}}"#;
let (modified, plan_id, was_created) = generic_plans::set_generic_plan(config, "CUSTOM", "Custom Plan").unwrap();
assert!(was_created);