Skip to main content

PveClient

Struct PveClient 

Source
pub struct PveClient { /* private fields */ }

Implementations§

Source§

impl PveClient

Source

pub fn new(config: PveClientConfig) -> Result<Self, PveError>

Source

pub fn lxc_usage(&self, node: &str, vmid: u64) -> Result<LxcUsage, PveError>

A bounded, read-only sample for interactive terminal status bars.

Trait Implementations§

Source§

impl Debug for PveClient

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PveApi for PveClient

Source§

fn list_cluster_resources(&self) -> Result<Vec<ClusterResource>, PveError>

Source§

fn get_lxc_config(&self, node: &str, vmid: u64) -> Result<LxcConfig, PveError>

Source§

fn list_lxc_interfaces( &self, node: &str, vmid: u64, ) -> Result<Vec<LxcInterface>, PveError>

Source§

fn list_lxc_snapshots( &self, node: &str, vmid: u64, ) -> Result<Vec<LxcSnapshot>, PveError>

Source§

fn get_task_status( &self, node: &str, upid: &str, ) -> Result<PveTaskStatus, PveError>

Source§

fn get_task_log( &self, node: &str, upid: &str, start: u64, limit: u64, ) -> Result<Vec<PveTaskLog>, PveError>

Read a bounded slice of a PVE task log.
Source§

fn list_nodes(&self) -> Result<Vec<PveNode>, PveError>

Source§

fn list_node_storages(&self, node: &str) -> Result<Vec<PveStorage>, PveError>

Source§

fn list_node_network_interfaces( &self, node: &str, ) -> Result<Vec<PveNetworkInterface>, PveError>

List network interfaces configured on a PVE node.
Source§

fn list_storage_content( &self, node: &str, storage: &str, content: &str, ) -> Result<Vec<PveStorageContent>, PveError>

Source§

fn list_oci_repo_tags( &self, node: &str, reference: &str, ) -> Result<Vec<String>, PveError>

List tags for an OCI repository through the PVE node.
Source§

fn pull_oci_registry( &self, node: &str, storage: &str, reference: &str, filename: &str, ) -> Result<PveTaskResponse, PveError>

Ask the PVE node to pull an OCI image into a template storage.
Source§

fn upload_storage_template( &self, node: &str, storage: &str, filename: &str, path: &Path, ) -> Result<PveTaskResponse, PveError>

Upload a compressed LXC template archive to PVE storage.
Source§

fn delete_bootstrap_template( &self, node: &str, storage: &str, filename: &str, ) -> Result<PveTaskResponse, PveError>

Delete only a temporary per-box bootstrap template owned by pbox.
Source§

fn get_lxc_state(&self, node: &str, vmid: u64) -> Result<String, PveError>

Read the node’s current state instead of the delayed cluster resource cache.
Source§

fn create_lxc( &self, node: &str, vmid: u64, request: &LxcCreateRequest, ) -> Result<PveTaskResponse, PveError>

Source§

fn update_lxc_config( &self, node: &str, vmid: u64, request: &LxcConfigUpdateRequest, ) -> Result<(), PveError>

Source§

fn start_lxc(&self, node: &str, vmid: u64) -> Result<PveTaskResponse, PveError>

Source§

fn shutdown_lxc( &self, node: &str, vmid: u64, ) -> Result<PveTaskResponse, PveError>

Source§

fn stop_lxc(&self, node: &str, vmid: u64) -> Result<PveTaskResponse, PveError>

Source§

fn delete_lxc(&self, node: &str, vmid: u64) -> Result<PveTaskResponse, PveError>

Source§

fn force_delete_lxc( &self, node: &str, vmid: u64, ) -> Result<PveTaskResponse, PveError>

Source§

fn clone_lxc( &self, node: &str, vmid: u64, request: &LxcCloneRequest, ) -> Result<PveTaskResponse, PveError>

Source§

fn template_lxc(&self, node: &str, vmid: u64) -> Result<(), PveError>

Source§

fn active_delete_tasks( &self, node: &str, ) -> Result<Vec<PveTaskResponse>, PveError>

Source§

fn template_tasks( &self, node: &str, vmid: u64, ) -> Result<Vec<PveTaskResponse>, PveError>

Source§

fn create_lxc_snapshot( &self, node: &str, vmid: u64, request: &LxcSnapshotRequest, ) -> Result<PveTaskResponse, PveError>

Source§

fn rollback_lxc_snapshot( &self, node: &str, vmid: u64, snapname: &str, start: bool, ) -> Result<PveTaskResponse, PveError>

Source§

fn delete_lxc_snapshot( &self, node: &str, vmid: u64, snapname: &str, ) -> Result<PveTaskResponse, PveError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more