# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = [
    'GetNodeDevicesResult',
    'AwaitableGetNodeDevicesResult',
    'get_node_devices',
    'get_node_devices_output',
]

@pulumi.output_type
class GetNodeDevicesResult:
    """
    A collection of values returned by getNodeDevices.
    """
    def __init__(__self__, capability=None, devices=None, id=None):
        if capability and not isinstance(capability, str):
            raise TypeError("Expected argument 'capability' to be a str")
        pulumi.set(__self__, "capability", capability)
        if devices and not isinstance(devices, list):
            raise TypeError("Expected argument 'devices' to be a list")
        pulumi.set(__self__, "devices", devices)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)

    @property
    @pulumi.getter
    def capability(self) -> Optional[str]:
        return pulumi.get(self, "capability")

    @property
    @pulumi.getter
    def devices(self) -> Sequence[str]:
        """
        A list of devices that match the selected capability
        """
        return pulumi.get(self, "devices")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")


class AwaitableGetNodeDevicesResult(GetNodeDevicesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNodeDevicesResult(
            capability=self.capability,
            devices=self.devices,
            id=self.id)


def get_node_devices(capability: Optional[str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNodeDevicesResult:
    """
    Retrieve information about the devices present on the current node

    ## Example Usage

    ```python
    import pulumi
    import pulumi_libvirt as libvirt

    node = libvirt.get_node_devices(capability="pci")
    ```


    :param str capability: The type of device, used to filter the output by capability type.
           Can be one of `system`, `pci`, `usb_device`,  `usb`,  `net`,  `scsi_host`,
           `scsi_target`,  `scsi`,  `storage`, `fc_host`,  `vports`, `scsi_generic`, `drm`,
           `mdev`, `mdev_types`, `ccw`, `css`, `ap_card`, `ap_queue`, `ap_matrix`.
           Defaults to all active devices.
    """
    __args__ = dict()
    __args__['capability'] = capability
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('libvirt:index/getNodeDevices:getNodeDevices', __args__, opts=opts, typ=GetNodeDevicesResult).value

    return AwaitableGetNodeDevicesResult(
        capability=pulumi.get(__ret__, 'capability'),
        devices=pulumi.get(__ret__, 'devices'),
        id=pulumi.get(__ret__, 'id'))


@_utilities.lift_output_func(get_node_devices)
def get_node_devices_output(capability: Optional[pulumi.Input[Optional[str]]] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNodeDevicesResult]:
    """
    Retrieve information about the devices present on the current node

    ## Example Usage

    ```python
    import pulumi
    import pulumi_libvirt as libvirt

    node = libvirt.get_node_devices(capability="pci")
    ```


    :param str capability: The type of device, used to filter the output by capability type.
           Can be one of `system`, `pci`, `usb_device`,  `usb`,  `net`,  `scsi_host`,
           `scsi_target`,  `scsi`,  `storage`, `fc_host`,  `vports`, `scsi_generic`, `drm`,
           `mdev`, `mdev_types`, `ccw`, `css`, `ap_card`, `ap_queue`, `ap_matrix`.
           Defaults to all active devices.
    """
    ...
