File: //usr/lib/python3.6/site-packages/glances/plugins/__pycache__/glances_cloud.cpython-36.pyc
3
Eo�c� � @ s� d Z ddlZddlmZmZ ddlmZ ddlmZ yddl Z W n6 e
k
rv Z zdZej
dje�� W Y ddZ[X nX dZG d d
� d
e�ZG dd� dej�ZdS )
zjCloud plugin.
Supported Cloud API:
- OpenStack meta data (class ThreadOpenStack, see below): AWS, OVH...
� N)� iteritems�to_ascii)�
GlancesPlugin)�loggerTz1Missing Python Lib ({}), Cloud plugin is disabledFc sL e Zd ZdZd� fdd� Z� fdd�Zejejdd� ��Z dd d
�Z
� ZS )
�Pluginz�Glances' cloud plugin.
The goal of this plugin is to retrieve additional information
concerning the datacenter where the host is connected.
See https://github.com/nicolargo/glances/issues/1029
stats is a dict
Nc s8 t t| �j||d� d| _| j� t� | _| jj� dS )zInit the plugin.)�args�configTN)�superr �__init__Z
display_curse�reset�ThreadOpenStack� OPENSTACK�start)�selfr r )� __class__� �#/usr/lib/python3.6/glances_cloud.pyr
, s
zPlugin.__init__c s | j j� tt| �j� dS )z+Overwrite the exit method to close threads.N)r
�stopr r �exit)r )r r r r <