File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/libcloud/common/__pycache__/upcloud.cpython-310.pyc
Back
o ;j�! � @ s� d dl Z d dlZd dlmZ d dlmZ G dd� de�ZG dd� d�ZG dd � d �ZG d d� d�Z G dd � d �Z G dd� d�ZG dd� d�ZdS )� N)� LibcloudError)� BaseHTTPErrorc @ s e Zd ZdS )�UpcloudTimeoutExceptionN)�__name__� __module__�__qualname__� r r �K/opt/saltstack/salt/lib/python3.10/site-packages/libcloud/common/upcloud.pyr s r c @ s( e Zd ZdZ d dd�Zdd� ZdS ) �UpcloudCreateNodeRequestBodya Body of the create_node request Takes the create_node arguments (**kwargs) and constructs the request body :param name: Name of the created server (required) :type name: ``str`` :param size: The size of resources allocated to this node. :type size: :class:`.NodeSize` :param image: OS Image to boot on node. :type image: :class:`.NodeImage` :param location: Which data center to create a node in. If empty, undefined behavior will be selected. (optional) :type location: :class:`.NodeLocation` :param auth: Initial authentication information for the node (optional) :type auth: :class:`.NodeAuthSSHKey` :param ex_hostname: Hostname. Default is 'localhost'. (optional) :type ex_hostname: ``str`` :param ex_username: User's username, which is created. Default is 'root'. (optional) :type ex_username: ``str`` N� localhost�rootc C s4 d|||j |j t||��� t||��� d�i| _d S )N�server)�title�hostnameZplan�zone� login_user�storage_devices)�id� _LoginUser�to_dict�_StorageDevice�body)�self�name�size�image�location�authZex_hostnameZex_usernamer r r �__init__9 s � �z%UpcloudCreateNodeRequestBody.__init__c C s t �| j�S )zc Serializes the body to json :return: JSON string :rtype: ``str`` )�json�dumpsr �r r r r �to_jsonN s z$UpcloudCreateNodeRequestBody.to_json)Nr r )r r r �__doc__r r"