-use lazy_static::lazy_static;
-use crate::tools::common_regex;
-
-// common schema definitions
-
-lazy_static! {
- pub static ref IP_FORMAT: Arc<ApiStringFormat> = ApiStringFormat::Pattern(&common_regex::IP_REGEX).into();
-
- pub static ref PVE_CONFIG_DIGEST_FORMAT: Arc<ApiStringFormat> =
- ApiStringFormat::Pattern(&common_regex::SHA256_HEX_REGEX).into();
-
- pub static ref PVE_CONFIG_DIGEST_SCHEMA: Arc<Schema> =
- StringSchema::new("Prevent changes if current configuration file has different SHA256 digest. This can be used to prevent concurrent modifications.")
- .format(PVE_CONFIG_DIGEST_FORMAT.clone()).into();
-
-}
-
-
-
-fn test_sync_api_handler(
- param: Value,
- _info: &ApiMethod,
- _rpcenv: &mut RpcEnvironment,
-) -> Result<Value, Error> {
- println!("This is a test {}", param);
-
- // let force: Option<bool> = Some(false);
-
- //if let Some(force) = param.force {
- //}
-
- let _force = param["force"].as_bool()
- .ok_or_else(|| format_err!("missing parameter 'force'"))?;
-
- if let Some(_force) = param["force"].as_bool() {
- }
-
- Ok(json!(null))
-}