このコンテンツは選択した言語では利用できません。

Chapter 1. Overview


The Python software development kit is a collection of classes that allows you to interact with the Red Hat Virtualization Manager in Python-based projects. By downloading these classes and adding them to your project, you can access a range of functionality for high-level automation of administrative tasks.

Red Hat Virtualization provides two versions of the Python software development kit:

Version 3

The V3 Python software development kit provides backwards compatibility with the class and method structure provided in the Python software development kit as of the latest release of Red Hat Enterprise Virtualization 3.6. Applications written using using the Python software development kit from Red Hat Enterprise Virtualization 3.6 can be used with this version without modification.

Warning

Version 3 is no longer supported. The information and examples specific to version 3 are provided as a reference only. Migrate to version 4 for continued support.

Version 4
The V4 Python software development kit provides an updated set of class and method names and signatures. Applications written using the Python software development kit from Red Hat Enterprise Virtualization 3.6 must be updated before they can be used with this version.

Either version of the Python software development kit can be used in a Red Hat Virtualization environment as required by installing the corresponding package and adding the required libraries to your Python project.

Python 3.7 and async

In Python 3.7 and later versions, async is a reserved keyword. You cannot use the async parameter in methods of services that previously supported it, as in the following example, because async=True will cause an error:

dc = dc_service.update(
    types.DataCenter(
        description='Updated description',
    ),
    async=True,
)
Copy to Clipboard Toggle word wrap

The solution is to add an underscore to the parameter (async_):

dc = dc_service.update(
    types.DataCenter(
        description='Updated description',
    ),
    async_=True,
)
Copy to Clipboard Toggle word wrap
Note

This limitation applies only to Python 3.7 and later. Earlier versions of Python do not require this modification.

1.1. Prerequisites

To install the Python software development kit, you must have:

  • A system where Red Hat Enterprise Linux 7 is installed. Both the Server and Workstation variants are supported.
  • A subscription to Red Hat Virtualization entitlements.
Important

The software development kit is an interface for the Red Hat Virtualization REST API. As such, you must use the version of the software development kit that corresponds to the version of your environment. For example, if you are using RHV 4.2, you must use the version of the software development kit designed for 4.2.

1.2. Installing the Python Software Development Kit

To install the Python software development kit:

  1. Enable the repositories:

    # subscription-manager repos \
        --enable=rhel-7-server-rpms \
        --enable=rhel-7-server-rhv-4.3-manager-rpms
    Copy to Clipboard Toggle word wrap
  2. Install the required packages:

    1. For V3:

      # yum install ovirt-engine-sdk-python
      Copy to Clipboard Toggle word wrap
    2. For V4:

      # yum install python-ovirt-engine-sdk4
      Copy to Clipboard Toggle word wrap

The Python software development kit and accompanying documentation are downloaded to the /usr/lib/python2.7/site-packages/ovirtsdk/ directory and can be added to Python projects.

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat