File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/vultr/__pycache__/v1_server_ipv4.cpython-310.pyc
Back
o ;jW � @ s( d Z ddlmZmZ G dd� de�ZdS )z5Partial class to handle Vultr Server (IPv4) API calls� )� VultrBase� update_paramsc @ sJ e Zd ZdZdd� Zddd�Zddd�Zdd d �Zddd�Zdd d�Z dS )�VultrServerIPv4z%Handles Vultr Server (IPv4) API callsc C s t �| |� d S �N)r �__init__)�selfZapi_key� r �H/opt/saltstack/salt/lib/python3.10/site-packages/vultr/v1_server_ipv4.pyr s zVultrServerIPv4.__init__Nc C � t |d|i�}| �d|d�S )aj /v1/server/create_ipv4 POST - account Add a new IPv4 address to a server. You will start being billed for this immediately. The server will be rebooted unless you specify otherwise. You must reboot the server before the IPv4 address can be configured. Link: https://www.vultr.com/api/#server_create_ipv4 �SUBIDz/v1/server/create_ipv4�POST�r �request�r �subid�paramsr r r �create s zVultrServerIPv4.createc C � t |||d��}| �d|d�S )a! /v1/server/destroy_ipv4 POST - account Removes a secondary IPv4 address from a server. Your server will be hard-restarted. We suggest halting the machine gracefully before removing IPs. Link: https://www.vultr.com/api/#server_destroy_ipv4 �r �ipz/v1/server/destroy_ipv4r r �r r �ipaddrr r r r �destroy � �zVultrServerIPv4.destroyc C r )z� /v1/server/list_ipv4 GET - account List the IPv4 information of a virtual machine. IP information is only available for virtual machines in the "active" state. Link: https://www.vultr.com/api/#server_list_ipv4 r z/v1/server/list_ipv4ZGETr r r r r �list&