File manager - Edit - /usr/local/CyberCP/lib/python3.10/site-packages/docker/models/__pycache__/swarm.cpython-310.pyc
Back
o �hb � @ s8 d dl mZ d dlmZ ddlmZ G dd� de�ZdS )� )� APIClient)�APIError� )�Modelc s� e Zd ZdZdZ� fdd�Zedd� �Zdd� Ze jje_ ddd �Z dd� Ze jje_dd� Z e jje _dd� Zdd� Ze jje_ ddd�Z� ZS )�Swarmzu The server's Swarm state. This a singleton that must be reloaded to get the current state of the Swarm. �IDc s` t � j|i |�� | jr.z| �� W d S ty- } z|jjdvr"� W Y d }~d S d }~ww d S )N)i� i� )�super�__init__�client�reloadr �response�status_code)�self�args�kwargs�e�� __class__� �F/usr/local/CyberCP/lib/python3.10/site-packages/docker/models/swarm.pyr s ����zSwarm.__init__c C s | j �d��d�S )z� The version number of the swarm. If this is not the same as the server, the :py:meth:`update` function will not work and you will need to call :py:meth:`reload` before calling it again. �Version�Index)�attrs�get�r r r r �version s z Swarm.versionc C s | j j�� S �N)r �api�get_unlock_keyr r r r r ! s zSwarm.get_unlock_keyN�0.0.0.0:2377Fc K sL |||||||d�} | j jjdi |��| d<