(&self, config: &str)
| 505 | } |
| 506 | |
| 507 | fn validate(&self, config: &str) -> Result<ValidateResult, DscError> { |
| 508 | debug!("{}", t!("dscresources.dscresource.invokeValidate", resource = self.type_name)); |
| 509 | if let Some(deprecation_message) = self.deprecation_message.as_ref() { |
| 510 | warn!("{}", t!("dscresources.dscresource.deprecationMessage", resource = self.type_name, message = deprecation_message)); |
| 511 | } |
| 512 | if self.require_adapter.is_some() { |
| 513 | return Err(DscError::NotSupported(t!("dscresources.dscresource.invokeValidateNotSupported", resource = self.type_name).to_string())); |
| 514 | } |
| 515 | |
| 516 | match &self.implemented_as { |
| 517 | Some(ImplementedAs::Command) => { |
| 518 | command_resource::invoke_validate(self, config, self.target_resource.as_deref()) |
| 519 | }, |
| 520 | _ => { |
| 521 | Err(DscError::NotImplemented(t!("dscresources.dscresource.customResourceNotSupported").to_string())) |
| 522 | }, |
| 523 | } |
| 524 | } |
| 525 | |
| 526 | fn schema(&self) -> Result<String, DscError> { |
| 527 | debug!("{}", t!("dscresources.dscresource.invokeSchema", resource = self.type_name)); |
no test coverage detected