# 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__ = [
    'GetNodeInfoResult',
    'AwaitableGetNodeInfoResult',
    'get_node_info',
    'get_node_info_output',
]

@pulumi.output_type
class GetNodeInfoResult:
    """
    A collection of values returned by getNodeInfo.
    """
    def __init__(__self__, cpu_cores_per_socket=None, cpu_cores_total=None, cpu_model=None, cpu_sockets=None, cpu_threads_per_core=None, id=None, memory_total_kb=None, numa_nodes=None):
        if cpu_cores_per_socket and not isinstance(cpu_cores_per_socket, int):
            raise TypeError("Expected argument 'cpu_cores_per_socket' to be a int")
        pulumi.set(__self__, "cpu_cores_per_socket", cpu_cores_per_socket)
        if cpu_cores_total and not isinstance(cpu_cores_total, int):
            raise TypeError("Expected argument 'cpu_cores_total' to be a int")
        pulumi.set(__self__, "cpu_cores_total", cpu_cores_total)
        if cpu_model and not isinstance(cpu_model, str):
            raise TypeError("Expected argument 'cpu_model' to be a str")
        pulumi.set(__self__, "cpu_model", cpu_model)
        if cpu_sockets and not isinstance(cpu_sockets, int):
            raise TypeError("Expected argument 'cpu_sockets' to be a int")
        pulumi.set(__self__, "cpu_sockets", cpu_sockets)
        if cpu_threads_per_core and not isinstance(cpu_threads_per_core, int):
            raise TypeError("Expected argument 'cpu_threads_per_core' to be a int")
        pulumi.set(__self__, "cpu_threads_per_core", cpu_threads_per_core)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if memory_total_kb and not isinstance(memory_total_kb, int):
            raise TypeError("Expected argument 'memory_total_kb' to be a int")
        pulumi.set(__self__, "memory_total_kb", memory_total_kb)
        if numa_nodes and not isinstance(numa_nodes, int):
            raise TypeError("Expected argument 'numa_nodes' to be a int")
        pulumi.set(__self__, "numa_nodes", numa_nodes)

    @property
    @pulumi.getter(name="cpuCoresPerSocket")
    def cpu_cores_per_socket(self) -> int:
        """
        Number of CPU cores per each socket
        """
        return pulumi.get(self, "cpu_cores_per_socket")

    @property
    @pulumi.getter(name="cpuCoresTotal")
    def cpu_cores_total(self) -> int:
        """
        Number of CPU cores in total
        """
        return pulumi.get(self, "cpu_cores_total")

    @property
    @pulumi.getter(name="cpuModel")
    def cpu_model(self) -> str:
        """
        CPU Architecture, usually `x86_64`
        """
        return pulumi.get(self, "cpu_model")

    @property
    @pulumi.getter(name="cpuSockets")
    def cpu_sockets(self) -> int:
        """
        How many CPU sockets are present
        """
        return pulumi.get(self, "cpu_sockets")

    @property
    @pulumi.getter(name="cpuThreadsPerCore")
    def cpu_threads_per_core(self) -> int:
        """
        How many CPU Threads are available per each CPU core
        """
        return pulumi.get(self, "cpu_threads_per_core")

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

    @property
    @pulumi.getter(name="memoryTotalKb")
    def memory_total_kb(self) -> int:
        """
        The amount of memory installed, in KiB
        """
        return pulumi.get(self, "memory_total_kb")

    @property
    @pulumi.getter(name="numaNodes")
    def numa_nodes(self) -> int:
        """
        How many NUMA nodes/cells are available.
        """
        return pulumi.get(self, "numa_nodes")


class AwaitableGetNodeInfoResult(GetNodeInfoResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNodeInfoResult(
            cpu_cores_per_socket=self.cpu_cores_per_socket,
            cpu_cores_total=self.cpu_cores_total,
            cpu_model=self.cpu_model,
            cpu_sockets=self.cpu_sockets,
            cpu_threads_per_core=self.cpu_threads_per_core,
            id=self.id,
            memory_total_kb=self.memory_total_kb,
            numa_nodes=self.numa_nodes)


def get_node_info(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNodeInfoResult:
    """
    Retrieve information about the current node

    ## Example Usage

    ```python
    import pulumi
    import pulumi_libvirt as libvirt

    node = libvirt.get_node_info()
    ```
    """
    __args__ = dict()
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('libvirt:index/getNodeInfo:getNodeInfo', __args__, opts=opts, typ=GetNodeInfoResult).value

    return AwaitableGetNodeInfoResult(
        cpu_cores_per_socket=pulumi.get(__ret__, 'cpu_cores_per_socket'),
        cpu_cores_total=pulumi.get(__ret__, 'cpu_cores_total'),
        cpu_model=pulumi.get(__ret__, 'cpu_model'),
        cpu_sockets=pulumi.get(__ret__, 'cpu_sockets'),
        cpu_threads_per_core=pulumi.get(__ret__, 'cpu_threads_per_core'),
        id=pulumi.get(__ret__, 'id'),
        memory_total_kb=pulumi.get(__ret__, 'memory_total_kb'),
        numa_nodes=pulumi.get(__ret__, 'numa_nodes'))


@_utilities.lift_output_func(get_node_info)
def get_node_info_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNodeInfoResult]:
    """
    Retrieve information about the current node

    ## Example Usage

    ```python
    import pulumi
    import pulumi_libvirt as libvirt

    node = libvirt.get_node_info()
    ```
    """
    ...
