pub struct Pyo3Plugin { /* private fields */ }Expand description
Represents an individual Docker plugin.
Provides methods to inspect, enable, disable, and manage plugins.
Implementations§
Source§impl Pyo3Plugin
impl Pyo3Plugin
pub fn new(docker: Pyo3Docker, name: &str) -> Self
Sourcepub fn inspect(&self) -> PyResult<Py<PyAny>>
pub fn inspect(&self) -> PyResult<Py<PyAny>>
Inspect the plugin to get detailed information.
Returns: dict: Detailed plugin information including: - id: Plugin ID - name: Plugin name - enabled: Whether the plugin is enabled - settings: Plugin settings (mounts, env, args, devices) - plugin_reference: Plugin reference - config: Full plugin configuration
Raises: SystemError: If the operation fails
Sourcepub fn enable(&self, timeout: Option<u64>) -> PyResult<()>
pub fn enable(&self, timeout: Option<u64>) -> PyResult<()>
Enable the plugin.
Enables a previously disabled plugin so it can be used by Docker.
Args: timeout: Timeout in seconds to wait for enable (optional)
Returns: None
Raises: SystemError: If the plugin cannot be enabled
Sourcepub fn disable(&self) -> PyResult<()>
pub fn disable(&self) -> PyResult<()>
Disable the plugin.
Disables a running plugin. The plugin must be disabled before it can be removed.
Returns: None
Raises: SystemError: If the plugin cannot be disabled
Sourcepub fn remove(&self) -> PyResult<Py<PyAny>>
pub fn remove(&self) -> PyResult<Py<PyAny>>
Remove (delete) the plugin.
Removes the plugin from Docker. The plugin must be disabled first. Use force_remove() to remove an enabled plugin.
Returns: dict: Information about the removed plugin
Raises: SystemError: If the plugin cannot be removed (e.g., still enabled)
Sourcepub fn force_remove(&self) -> PyResult<Py<PyAny>>
pub fn force_remove(&self) -> PyResult<Py<PyAny>>
Forcefully remove the plugin.
Removes the plugin from Docker, even if it’s currently enabled.
Returns: dict: Information about the removed plugin
Raises: SystemError: If the plugin cannot be removed
Sourcepub fn push(&self) -> PyResult<()>
pub fn push(&self) -> PyResult<()>
Push the plugin to a registry.
Pushes the plugin to the registry specified in the plugin name.
Returns: None
Raises: SystemError: If the push fails
Sourcepub fn create(&self, path: &str) -> PyResult<()>
pub fn create(&self, path: &str) -> PyResult<()>
Create a plugin from a tar archive.
Creates a new plugin from a tar archive containing the plugin’s rootfs directory and config.json manifest.
Args: path: Path to the tar archive containing plugin rootfs and manifest
Returns: None
Raises: SystemError: If plugin creation fails
Trait Implementations§
Source§impl Debug for Pyo3Plugin
impl Debug for Pyo3Plugin
Source§impl<'py> IntoPyObject<'py> for Pyo3Plugin
impl<'py> IntoPyObject<'py> for Pyo3Plugin
Source§type Target = Pyo3Plugin
type Target = Pyo3Plugin
Source§type Output = Bound<'py, <Pyo3Plugin as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <Pyo3Plugin as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for Pyo3Plugin
impl PyClass for Pyo3Plugin
Source§impl PyClassImpl for Pyo3Plugin
impl PyClassImpl for Pyo3Plugin
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// Represents an individual Docker plugin.
///
/// Provides methods to inspect, enable, disable, and manage plugins.
const RAW_DOC: &'static CStr = /// Represents an individual Docker plugin. /// /// Provides methods to inspect, enable, disable, and manage plugins.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<Pyo3Plugin>
type ThreadChecker = SendablePyClass<Pyo3Plugin>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature for Pyo3Plugin
impl PyClassNewTextSignature for Pyo3Plugin
const TEXT_SIGNATURE: &'static str = "(docker, name)"
Source§impl PyMethods<Pyo3Plugin> for PyClassImplCollector<Pyo3Plugin>
impl PyMethods<Pyo3Plugin> for PyClassImplCollector<Pyo3Plugin>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for Pyo3Plugin
impl PyTypeInfo for Pyo3Plugin
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
impl DerefToPyAny for Pyo3Plugin
impl ExtractPyClassWithClone for Pyo3Plugin
Auto Trait Implementations§
impl Freeze for Pyo3Plugin
impl !RefUnwindSafe for Pyo3Plugin
impl Send for Pyo3Plugin
impl Sync for Pyo3Plugin
impl Unpin for Pyo3Plugin
impl !UnwindSafe for Pyo3Plugin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.