Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/libcloud/compute/drivers/__pycache__/linode.cpython-39.pyc
Ðазад
a q�hh � @ s� d Z ddlZzddlZW n ey2 ddlZY n0 ddlZddlZddlmZ ddlm Z ddl mZmZm Z mZmZ ddlmZmZ ddlmZmZmZmZ ddlmZmZ dd lmZmZ G d d� de�Zdd � ZdS )a� libcloud driver for the Linode(R) API This driver implements all libcloud functionality for the Linode API. Since the API is a bit more fine-grained, create_node abstracts a significant amount of work (and may take a while to run). Linode home page http://www.linode.com/ Linode API documentation http://www.linode.com/api/ Alternate bindings for reference http://github.com/tjfontaine/linode-python Linode(R) is a registered trademark of Linode, LLC. � N)�copy)�PY3)�API_ROOT�LinodeException�LinodeConnection�LINODE_PLAN_IDS�LINODE_DISK_FILESYSTEMS)�Provider� NodeState)� NodeDriver�NodeSize�Node�NodeLocation)�NodeAuthPassword�NodeAuthSSHKey)� NodeImage� StorageVolumec @ s� e Zd ZdZejZdZdZe Z eZe ZdddgiZdd� Zejejejejejejejd �Zd d� Zdd � Zdd� Zdd� Zdd� Zd2dd�Zdd� Zdd� Zdd� Z dd� Z!d3d d!�Z"d"d#� Z#d$d%� Z$d&d'� Z%d(d)� Z&d*d+� Z'd4d,d-�Z(d.d/� Z)d0d1� Z*dS )5�LinodeNodeDrivera8 libcloud driver for the Linode API Rough mapping of which is which: - list_nodes linode.list - reboot_node linode.reboot - destroy_node linode.delete - create_node linode.create, linode.update, linode.disk.createfromdistribution, linode.disk.create, linode.config.create, linode.ip.addprivate, linode.boot - list_sizes avail.linodeplans - list_images avail.distributions - list_locations avail.datacenters - list_volumes linode.disk.list - destroy_volume linode.disk.delete For more information on the Linode API, be sure to read the reference: http://www.linode.com/api/ ZLinodezhttp://www.linode.com/�create_nodeZssh_key�passwordc C s d| _ t�| |� dS )z�Instantiate the driver with the given API key :param key: the API key to use (required) :type key: ``str`` :rtype: ``None`` N)� datacenterr �__init__)�self�key� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/libcloud/compute/drivers/linode.pyr S s zLinodeNodeDriver.__init__)������r � � � � c C s( ddi}| j jt|d�jd }| �|�S )a~ List all Linodes that the API key can access This call will return all Linodes that the API key in use has access to. If a node is in this list, rebooting will work; however, creation and destruction are a separate grant. :return: List of node objects that the API key can access :rtype: ``list`` of :class:`Node` � api_action�linode.list��paramsr )� connection�requestr �objects� _to_nodes)r r% �datar r r � list_nodesi s zLinodeNodeDriver.list_nodesc C s d|j d�}| jjt|d� dS )z( Boot the given Linode �linode.boot�r"