Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/openstack/database/v1/__pycache__/instance.cpython-39.pyc
Ðазад
a u�h� � @ s. d dl mZ d dl mZ G dd� dej�ZdS )� )�resource)�utilsc @ s� e Zd ZdZdZdZdZdZdZdZ dZ e�d�Z e�d�Ze�d�Ze�d�Ze�d �Zejd ed�Ze�d�Ze�d �Ze�d�Ze�d�Ze�d�Zdd� Zdd� Zdd� Zdd� Zdd� ZdS )�Instance�instanceZ instancesz /instancesT�flavor�links�name�status�volume� datastore)�type�id�region�hostname�created�updatedc C s( t �| j| jd�}|�|�}|�� d S )a� Enable login for the root user. This operation enables login from any host for the root user and provides the user with a generated root password. :param session: The session to use for making this request. :type session: :class:`~keystoneauth1.adapter.Adapter` :returns: A dictionary with keys ``name`` and ``password`` specifying the login credentials. �root�user)r �urljoin� base_pathr �post�json��self�session�url�resp� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/openstack/database/v1/instance.py�enable_root_user6 s zInstance.enable_root_userc C s( t �| j| jd�}|�|�}|�� d S )au Determine if root is enabled on an instance. Determine if root is enabled on this particular instance. :param session: The session to use for making this request. :type session: :class:`~keystoneauth1.adapter.Adapter` :returns: ``True`` if root user is enabled for a specified database instance or ``False`` otherwise. r ZrootEnabled)r r r r �getr r r r r �is_root_enabledE s zInstance.is_root_enabledc C s, di i}t �| j| jd�}|j||d� dS )zBRestart the database instance :returns: ``None`` �restart�action�r N�r r r r r )r r �bodyr r r r r"