various improvements
This commit is contained in:
		@@ -15,7 +15,7 @@ extensions = [
 | 
			
		||||
]
 | 
			
		||||
templates_path = ['_templates']
 | 
			
		||||
exclude_patterns = []
 | 
			
		||||
language = 'ru'
 | 
			
		||||
language = 'en'
 | 
			
		||||
 | 
			
		||||
# HTML output settings
 | 
			
		||||
html_theme = 'alabaster'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,15 +1,15 @@
 | 
			
		||||
Compute Service
 | 
			
		||||
===============
 | 
			
		||||
Compute
 | 
			
		||||
=======
 | 
			
		||||
 | 
			
		||||
Документация библиотеки для управления Compute-инстансами.
 | 
			
		||||
Compute-instance management library.
 | 
			
		||||
 | 
			
		||||
.. toctree::
 | 
			
		||||
    :maxdepth: 1
 | 
			
		||||
 | 
			
		||||
    python-api/index
 | 
			
		||||
 | 
			
		||||
Индексы и таблицы
 | 
			
		||||
-----------------
 | 
			
		||||
Indices and tables
 | 
			
		||||
------------------
 | 
			
		||||
 | 
			
		||||
* :ref:`genindex`
 | 
			
		||||
* :ref:`modindex`
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
Python API
 | 
			
		||||
==========
 | 
			
		||||
 | 
			
		||||
API позволяет выполнять действия над инстансами программно. Ниже описано пример
 | 
			
		||||
изменения параметров и запуска инстанса `myinstance`.
 | 
			
		||||
The API allows you to perform actions on instances programmatically. Below is
 | 
			
		||||
an example of changing parameters and launching the `myinstance` instance.
 | 
			
		||||
 | 
			
		||||
.. code-block:: python
 | 
			
		||||
 | 
			
		||||
@@ -10,7 +10,6 @@ API позволяет выполнять действия над инстанс
 | 
			
		||||
 | 
			
		||||
    from compute import Session
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    logging.basicConfig(level=logging.DEBUG)
 | 
			
		||||
 | 
			
		||||
    with Session() as session:
 | 
			
		||||
@@ -20,28 +19,29 @@ API позволяет выполнять действия над инстанс
 | 
			
		||||
        instance.set_autostart(enabled=True)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Контекстный менеджер :class:`Session` предоставляет абстракцию над :class:`libvirt.virConnect`
 | 
			
		||||
и возвращает объекты других классов настоящей билиотеки.
 | 
			
		||||
:class:`Session` context manager provides an abstraction over :class:`libvirt.virConnect`
 | 
			
		||||
and returns objects of other classes of the present library.
 | 
			
		||||
 | 
			
		||||
Представление сущностей
 | 
			
		||||
-----------------------
 | 
			
		||||
Entity representation
 | 
			
		||||
---------------------
 | 
			
		||||
 | 
			
		||||
Такие сущности как Сompute-инстанс представлены в виде классов. Эти классы напрямую
 | 
			
		||||
вызывают методы libvirt для выполнения операций на гипервизоре. Пример класса — :data:`Volume`.
 | 
			
		||||
Entities such as a compute-instance are represented as classes. These classes directly
 | 
			
		||||
call libvirt methods to perform operations on the hypervisor. An example class is
 | 
			
		||||
:class:`Volume`.
 | 
			
		||||
 | 
			
		||||
Конфигурационные файлы различных объектов libvirt в compute описаны специальными
 | 
			
		||||
датаклассами. Датакласс хранит в своих свойствах параметры объекта и может вернуть XML
 | 
			
		||||
конфиг для libvirt с помощью метода ``to_xml()``. Пример — :py:class:`VolumeConfig`.
 | 
			
		||||
The configuration files of various libvirt objects in `compute` are described by special
 | 
			
		||||
dataclasses. The dataclass stores object parameters in its properties and can return an
 | 
			
		||||
XML config for libvirt using the ``to_xml()`` method. For example :class:`VolumeConfig`.
 | 
			
		||||
 | 
			
		||||
Для валидации входных данных используются модели `Pydantic <https://docs.pydantic.dev/>`_.
 | 
			
		||||
Пример — :py:class:`VolumeSchema`.
 | 
			
		||||
`Pydantic <https://docs.pydantic.dev/>`_ models are used to validate input data.
 | 
			
		||||
For example :class:`VolumeSchema`.
 | 
			
		||||
 | 
			
		||||
Документация модулей
 | 
			
		||||
--------------------
 | 
			
		||||
Modules documentation
 | 
			
		||||
---------------------
 | 
			
		||||
 | 
			
		||||
.. toctree::
 | 
			
		||||
    :maxdepth: 4
 | 
			
		||||
 | 
			
		||||
    session
 | 
			
		||||
    instance/index
 | 
			
		||||
    storage
 | 
			
		||||
    storage/index
 | 
			
		||||
 
 | 
			
		||||
@@ -3,8 +3,8 @@
 | 
			
		||||
 | 
			
		||||
.. toctree::
 | 
			
		||||
    :maxdepth: 1
 | 
			
		||||
    :caption: Содержание:
 | 
			
		||||
    
 | 
			
		||||
    :caption: Contents:
 | 
			
		||||
 | 
			
		||||
    instance
 | 
			
		||||
    guest_agent
 | 
			
		||||
    schemas
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +0,0 @@
 | 
			
		||||
``storage``
 | 
			
		||||
===========
 | 
			
		||||
 | 
			
		||||
``compute.storage.pool``
 | 
			
		||||
------------------------
 | 
			
		||||
 | 
			
		||||
.. automodule:: compute.storage.pool
 | 
			
		||||
   :members:
 | 
			
		||||
 | 
			
		||||
``compute.storage.volume``
 | 
			
		||||
--------------------------
 | 
			
		||||
 | 
			
		||||
.. automodule:: compute.storage.volume
 | 
			
		||||
   :members:
 | 
			
		||||
							
								
								
									
										9
									
								
								docs/source/python-api/storage/index.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								docs/source/python-api/storage/index.rst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
``storage``
 | 
			
		||||
============
 | 
			
		||||
 | 
			
		||||
.. toctree::
 | 
			
		||||
    :maxdepth: 1
 | 
			
		||||
    :caption: Contents:
 | 
			
		||||
 | 
			
		||||
    pool
 | 
			
		||||
    volume
 | 
			
		||||
							
								
								
									
										5
									
								
								docs/source/python-api/storage/pool.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								docs/source/python-api/storage/pool.rst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
``pool``
 | 
			
		||||
========
 | 
			
		||||
 | 
			
		||||
.. automodule:: compute.storage.pool
 | 
			
		||||
   :members:
 | 
			
		||||
							
								
								
									
										5
									
								
								docs/source/python-api/storage/volume.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								docs/source/python-api/storage/volume.rst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
``volume``
 | 
			
		||||
==========
 | 
			
		||||
 | 
			
		||||
.. automodule:: compute.storage.volume
 | 
			
		||||
   :members:
 | 
			
		||||
		Reference in New Issue
	
	Block a user