관리-도구
편집 파일: netbsd.cpython-39.pyc
a �)gY � @ s� d dl mZmZmZ eZd dlZd dlZd dlZd dl m Z d dlmZm Z d dlmZmZ d dlmZmZmZ d dlmZ G dd � d e�ZG d d� de �ZdS )� )�absolute_import�division�print_functionN)�reduce)�Hardware�HardwareCollector)�TimeoutError�timeout)�get_file_content�get_file_lines�get_mount_size)� get_sysctlc @ sT e Zd ZdZdZg d�Zddd�Zdd� Zd d � Ze � dd� �Z d d� Zdd� ZdS )�NetBSDHardwarez� NetBSD-specific subclass of Hardware. Defines memory and CPU facts: - memfree_mb - memtotal_mb - swapfree_mb - swaptotal_mb - processor (a list) - processor_cores - processor_count - devices - uptime_seconds �NetBSD)ZMemTotalZ SwapTotalZMemFreeZSwapFreeNc C s� i }t | jdg�| _| �� }| �� }i }z| �� }W n tyF Y n0 | �� }| �� }|� |� |� |� |� |� |� |� |� |� |S )NZmachdep) r �module�sysctl� get_cpu_facts�get_memory_facts�get_mount_factsr � get_dmi_facts�get_uptime_facts�update)�selfZcollected_factsZhardware_facts� cpu_facts�memory_facts�mount_facts� dmi_factsZuptime_facts� r �N/usr/lib/python3.9/site-packages/ansible/module_utils/facts/hardware/netbsd.py�populate0 s"