%PDF- %PDF-
| Direktori : /lib/python3.9/site-packages/ansible/module_utils/facts/hardware/__pycache__/ |
| Current File : //lib/python3.9/site-packages/ansible/module_utils/facts/hardware/__pycache__/sunos.cpython-39.pyc |
a
�)g\) � @ s� d dl mZmZmZ eZd dlZd dlZd dlm Z d dl
mZ d dlm
Z
mZ d dlmZmZ d dlmZ d dlmZ G d d
� d
e�ZG dd� de�ZdS )
� )�absolute_import�division�print_functionN)�get_best_parsable_locale)�bytes_to_human)�get_file_content�get_mount_size)�Hardware�HardwareCollector)�timeout)�reducec @ sX e Zd ZdZdZddd�Zddd�Zdd � Ze�� d
d� �Z dd
� Z
dd� Zdd� ZdS )�
SunOSHardwarez�
In addition to the generic memory and cpu facts, this also sets
swap_reserved_mb and swap_allocated_mb that is available from *swap -s*.
�SunOSNc
C s� i }t | j�}|||d�| j_| �� }| �� }| �� }| �� }| �� }i } z| �� } W n t j
yj Y n0 |�|� |�|� |�|� |�|� |�|� |�| � |S )N)�LANG�LC_ALL�
LC_NUMERIC)r �moduleZrun_command_environ_update�
get_cpu_facts�get_memory_facts�
get_dmi_facts�get_device_facts�get_uptime_facts�get_mount_factsr �TimeoutError�update)
�self�collected_factsZhardware_facts�locale� cpu_facts�memory_facts� dmi_facts�device_facts�uptime_facts�mount_facts� r$ �M/usr/lib/python3.9/site-packages/ansible/module_utils/facts/hardware/sunos.py�populate% s(
zSunOSHardware.populatec C sx d}i }i }|pi }| j �d�\}}}g |d<