golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/salt/cloud/clouds/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-310.pyc
171 B
Del
OK
aliyun.cpython-310.pyc
19.81 KB
Del
OK
azurearm.cpython-310.pyc
39.67 KB
Del
OK
clc.cpython-310.pyc
8.91 KB
Del
OK
cloudstack.cpython-310.pyc
10.87 KB
Del
OK
digitalocean.cpython-310.pyc
27.39 KB
Del
OK
dimensiondata.cpython-310.pyc
12.62 KB
Del
OK
ec2.cpython-310.pyc
92.28 KB
Del
OK
gce.cpython-310.pyc
48.78 KB
Del
OK
gogrid.cpython-310.pyc
11.07 KB
Del
OK
hetzner.cpython-310.pyc
11.82 KB
Del
OK
joyent.cpython-310.pyc
22.78 KB
Del
OK
libvirt.cpython-310.pyc
16.69 KB
Del
OK
linode.cpython-310.pyc
59.17 KB
Del
OK
lxc.cpython-310.pyc
10.9 KB
Del
OK
msazure.cpython-310.pyc
71.44 KB
Del
OK
oneandone.cpython-310.pyc
18.39 KB
Del
OK
opennebula.cpython-310.pyc
90.2 KB
Del
OK
openstack.cpython-310.pyc
23.53 KB
Del
OK
packet.cpython-310.pyc
12.06 KB
Del
OK
parallels.cpython-310.pyc
11.89 KB
Del
OK
profitbricks.cpython-310.pyc
25.34 KB
Del
OK
proxmox.cpython-310.pyc
27.25 KB
Del
OK
pyrax.cpython-310.pyc
2.59 KB
Del
OK
qingcloud.cpython-310.pyc
16.64 KB
Del
OK
saltify.cpython-310.pyc
11.91 KB
Del
OK
scaleway.cpython-310.pyc
9.36 KB
Del
OK
softlayer.cpython-310.pyc
13.26 KB
Del
OK
softlayer_hw.cpython-310.pyc
13.5 KB
Del
OK
tencentcloud.cpython-310.pyc
20.55 KB
Del
OK
vagrant.cpython-310.pyc
8.32 KB
Del
OK
virtualbox.cpython-310.pyc
9.57 KB
Del
OK
vmware.cpython-310.pyc
94.14 KB
Del
OK
vultrpy.cpython-310.pyc
12.8 KB
Del
OK
xen.cpython-310.pyc
25.66 KB
Del
OK
Edit: linode.cpython-310.pyc
o �xe�> � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z ddl mZ ddlm Z ddlmZmZmZmZ zddlZdZW n eyO dZY nw e�e�Zdaee�ej�� �� ��add d �ddd �dd d �ddd �ddd �ddd �ddd �d�ZdZ dd� Z!dd� Z"dd� Z#dd� Z$d d!� Z%d"d#� Z&d$d%� Z'd&d'� Z(d(d)� Z)d*d+� Z*d,d-� Z+d.d/� Z,d0d1� Z-d2d3� Z.d4d5� Z/d6d7� Z0d8d9� Z1d:d;� Z2d<d=� Z3d>d?� Z4G d@dA� dA�Z5G dBdC� dCe5�Z6G dDdE� dEe5�Z7dndFdG�Z8dndHdI�Z9dndJdK�Z:dodLdM�Z;dpdNdO�Z<dPdQ� Z=dpdRdS�Z>dndTdU�Z?dpdVdW�Z@dpdXdY�ZAdpdZd[�ZBdnd\d]�ZCdnd^d_�ZDdnd`da�ZEdndbdc�ZFdnddde�ZGdndfdg�ZHdpdhdi�ZIdndjdk�ZJdndldm�ZKdS )qa� The Linode Cloud Module ======================= The Linode cloud module is used to interact with the Linode Cloud. You can target a specific version of the Linode API with the ``api_version`` parameter. The default is ``v3``. Provider -------- The following provider parameters are supported: - **apikey**: (required) The key to use to authenticate with the Linode API. - **password**: (required) The default password to set on new VMs. Must be 8 characters with at least one lowercase, uppercase, and numeric. - **api_version**: (optional) The version of the Linode API to interact with. Defaults to ``v3``. - **poll_interval**: (optional) The rate of time in milliseconds to poll the Linode API for changes. Defaults to ``500``. - **ratelimit_sleep**: (optional) The time in seconds to wait before retrying after a ratelimit has been enforced. Defaults to ``0``. .. note:: APIv3 usage is deprecated and will be removed in a future release in favor of APIv4. To move to APIv4 now, set the ``api_version`` parameter in your provider configuration to ``v4``. See the full migration guide here https://docs.saltproject.io/en/latest/topics/cloud/linode.html#migrating-to-apiv4. Set up the provider configuration at ``/etc/salt/cloud.providers`` or ``/etc/salt/cloud.providers.d/linode.conf``: .. code-block:: yaml my-linode-provider: driver: linode api_version: v4 apikey: f4ZsmwtB1c7f85Jdu43RgXVDFlNjuJaeIYV8QMftTqKScEB2vSosFSr... password: F00barbaz For use with APIv3 (deprecated): .. code-block:: yaml my-linode-provider-v3: driver: linode apikey: f4ZsmwtB1c7f85Jdu43RgXVDFlNjuJaeIYV8QMftTqKScEB2vSosFSr... password: F00barbaz Profile ------- The following profile parameters are supported: - **size**: (required) The size of the VM. This should be a Linode instance type ID (i.e. ``g6-standard-2``). For APIv3, this would be a plan ID (i.e. ``Linode 2GB``). Run ``salt-cloud -f avail_sizes my-linode-provider`` for options. - **location**: (required) The location of the VM. This should be a Linode region (e.g. ``us-east``). For APIv3, this would be a datacenter location (i.e. ``Newark, NJ, USA``). Run ``salt-cloud -f avail_locations my-linode-provider`` for options. - **image**: (required) The image to deploy the boot disk from. This should be an image ID (e.g. ``linode/ubuntu16.04``); official images start with ``linode/``. For APIv3, this would be an image label (i.e. Ubuntu 16.04). Run ``salt-cloud -f avail_images my-linode-provider`` for more options. - **password**: (\*required) The default password for the VM. Must be provided at the profile or provider level. - **assign_private_ip**: (optional) Whether or not to assign a private key to the VM. Defaults to ``False``. - **ssh_interface**: (optional) The interface with which to connect over SSH. Valid options are ``private_ips`` or ``public_ips``. Defaults to ``public_ips``. - **ssh_pubkey**: (optional) The public key to authorize for SSH with the VM. - **swap**: (optional) The amount of disk space to allocate for the swap partition. Defaults to ``256``. - **clonefrom**: (optional) The name of the Linode to clone from. - **disk_size**: (deprecated, optional) The amount of disk space to allocate for the OS disk. This has no effect with APIv4; the size of the boot disk will be the remainder of disk space after the swap parition is allocated. Set up a profile configuration in ``/etc/salt/cloud.profiles.d/``: .. code-block:: yaml my-linode-profile: # a minimal configuration provider: my-linode-provider size: g6-standard-1 image: linode/alpine3.12 location: us-east my-linode-profile-advanced: # an advanced configuration provider: my-linode-provider size: g6-standard-3 image: linode/alpine3.10 location: eu-west password: bogus123X assign_private_ip: true ssh_interface: private_ips ssh_pubkey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQAB... swap_size: 512 my-linode-profile-v3: # a legacy configuration provider: my-linode-provider-v3 size: Nanode 1GB image: Alpine 3.12 location: Fremont, CA, USA Migrating to APIv4 ------------------ In order to target APIv4, ensure your provider configuration has ``api_version`` set to ``v4``. You will also need to generate a new token for your account. See https://www.linode.com/docs/platform/api/getting-started-with-the-linode-api/#create-an-api-token There are a few changes to note: - There has been a general move from label references to ID references. The profile configuration parameters ``location``, ``size``, and ``image`` have moved from being label based references to IDs. See the profile section for more information. In addition to these inputs being changed, ``avail_sizes``, ``avail_locations``, and ``avail_images`` now output options sorted by ID instead of label. - The ``disk_size`` profile configuration parameter has been deprecated and will not be taken into account when creating new VMs while targeting APIv4. :maintainer: Charles Kenney <ckenney@linode.com> :maintainer: Phillip Campbell <pcampbell@linode.com> :depends: requests � N)�Path)� ipaddress)�SaltCloudConfigError�SaltCloudException�SaltCloudNotFound�SaltCloudSystemExitTF���zBoot Failed (not in use))�code�descr���z Being Createdz Brand New� �Running� zPowered Off� zShutting Down (not in use)� zSaved to Disk (not in use))Zboot_failedZbeeing_created� brand_new�runningZpoweroff�shutdownZsave_to_disk�linodec C s t � du rdS t� du rdS tS )z# Check for Linode configs. F)�get_configured_provider�_get_dependencies�__virtualname__� r r �L/opt/saltstack/salt/lib/python3.10/site-packages/salt/cloud/clouds/linode.py�__virtual__� s r c C s"