From 652506e6b8d6aee06bcc655240c7ad38e7954db4 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 30 Oct 2020 13:03:51 +0100 Subject: [PATCH] api: define subscription module and methods as public Signed-off-by: Thomas Lamprecht --- src/api2/node.rs | 2 +- src/api2/node/subscription.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api2/node.rs b/src/api2/node.rs index d06a0cb6..12a2d5c8 100644 --- a/src/api2/node.rs +++ b/src/api2/node.rs @@ -28,6 +28,7 @@ pub mod disks; pub mod dns; pub mod network; pub mod tasks; +pub mod subscription; pub(crate) mod rrd; @@ -35,7 +36,6 @@ mod apt; mod journal; mod services; mod status; -mod subscription; mod syslog; mod time; diff --git a/src/api2/node/subscription.rs b/src/api2/node/subscription.rs index 309d0960..67797fd5 100644 --- a/src/api2/node/subscription.rs +++ b/src/api2/node/subscription.rs @@ -29,7 +29,7 @@ use crate::api2::types::{NODE_SCHEMA, SUBSCRIPTION_KEY_SCHEMA, Authid}; }, )] /// Check and update subscription status. -fn check_subscription( +pub fn check_subscription( force: bool, ) -> Result<(), Error> { // FIXME: drop once proxmox-api-macro is bumped to >> 5.0.0-1 @@ -82,7 +82,7 @@ fn check_subscription( }, )] /// Read subscription info. -fn get_subscription( +pub fn get_subscription( _param: Value, rpcenv: &mut dyn RpcEnvironment, ) -> Result { @@ -134,7 +134,7 @@ fn get_subscription( }, )] /// Set a subscription key and check it. -fn set_subscription( +pub fn set_subscription( key: String, ) -> Result<(), Error> { @@ -162,7 +162,7 @@ fn set_subscription( }, )] /// Delete subscription info. -fn delete_subscription() -> Result<(), Error> { +pub fn delete_subscription() -> Result<(), Error> { subscription::delete_subscription() .map_err(|err| format_err!("Deleting subscription failed: {}", err))?;