()
| 95 | pub fn get_extensions(&self) -> DiscoveryExtensionCache { locked_clone!(EXTENSIONS) } |
| 96 | |
| 97 | fn get_resource_path_setting() -> Result<ResourcePathSetting, DscError> |
| 98 | { |
| 99 | if let Ok(v) = get_setting("resourcePath") { |
| 100 | // if there is a policy value defined - use it; otherwise use setting value |
| 101 | if v.policy != serde_json::Value::Null { |
| 102 | match serde_json::from_value::<ResourcePathSetting>(v.policy) { |
| 103 | Ok(v) => { |
| 104 | return Ok(v); |
| 105 | }, |
| 106 | Err(e) => { return Err(DscError::Setting(format!("{e}"))); } |
| 107 | } |
| 108 | } else if v.setting != serde_json::Value::Null { |
| 109 | match serde_json::from_value::<ResourcePathSetting>(v.setting) { |
| 110 | Ok(v) => { |
| 111 | return Ok(v); |
| 112 | }, |
| 113 | Err(e) => { return Err(DscError::Setting(format!("{e}"))); } |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | Err(DscError::Setting(t!("discovery.commandDiscovery.couldNotReadSetting").to_string())) |
| 119 | } |
| 120 | |
| 121 | fn get_resource_paths() -> Result<Vec<PathBuf>, DscError> |
| 122 | { |
nothing calls this directly
no test coverage detected