Metadata-Version: 1.1
Name: ovirt-engine-sdk-python
Version: 4.1.4
Summary: Python SDK for oVirt Engine API
Home-page: UNKNOWN
Author: Michael Pasternak, Juan Hernandez, Ondra Machacek
Author-email: mishka8520@yahoo.com, juan.hernandez@redhat.com, omachace@redhat.com
License: ASL2
Description: = oVirt Engine API Python SDK
        
        == Introduction
        
        This project contains the Python SDK for the oVirt Engine API.
        
        == Important
        
        Note that most of the code of this SDK is automatically generated. If
        you just installed the package then you will have everything already,
        but if you downloaded the source then you will need to generate it,
        follow the instructions in the `README.adoc` file of the parent
        directory.
        
        == Installation
        
        The SDK can be installed in Fedora 24 and CentOS 7 using the RPM packages
        provided by the oVirt project. To do so install the oVirt release package:
        
          # dnf install http://resources.ovirt.org/pub/yum-repo/ovirt-release41.rpm
        
        Then install the SDK packages. For Python 2:
        
          # dnf install python-ovirt-engine-sdk4
        
        For Python 3:
        
          # dnf install python3-ovirt-engine-sdk4
        
        For other operating systems (and also for Fedora and CentOS) you can
        install the SDK using the `pip` command, which will download the source
        from https://pypi.python.org/pypi[PyPI], build and install it.
        
        The SDK uses http://www.xmlsoft.org[libxml2] for parsing and rendering
        XML. The part of the SDK that interacts with that library is written in
        C. This means that before building you must make sure you have the C
        compiler and the required header and libraries files installed in your
        system. For example, if you are using distributions like Fedora, or
        CentOS:
        
          # dnf -y install \
          gcc \
          libxml2-devel \
          python-devel
        
        For Python 3:
        
          # dnf -y install \
          gcc \
          libxml2-devel \
          python3-devel
        
        If you are using distributions like Debian, or Ubuntu:
        
          # apt-get --assume-yes install \
          gcc \
          libxml2-dev \
          python-dev
        
        For Python 3:
        
          # apt-get --assume-yes install \
          gcc \
          libxml2-dev \
          python3-dev
        
        NOTE: The examples above use the `dnf` command, which is the default in
        Fedora 24. In CentOS 7 you may need to use the `yum` command, as `dnf`
        is optional.
        
        == Usage
        
        To use the SDK import the `ovirtsdk4` module. That will give you
        access to all the classes of the SDK, and in particular to the
        `Connection` class. This is the entry point of the SDK,
        and gives you access to the root of the tree of services of the API:
        
        [source,python]
        ----
        import ovirtsdk4 as sdk
        
        # Create a connection to the server:
        connection = sdk.Connection(
          url='https://engine.example.com/ovirt-engine/api',
          username='admin@internal',
          password='...',
          ca_file='ca.pem',
        )
        
        # Get the reference to the system service:
        system_service = connection.system_service()
        
        # Always remember to close the connection when finished:
        connection.close()
        ----
        
        The `ca.pem` file is required when connecting to a server protected
        with TLS. In an usual oVirt installation it will be in
        `/etc/pki/ovirt-engine/ca.pem`. If you don't specify `ca_file`, then
        system wide CA certificate store will be used.
        
        Once you have the reference to the system service you can use it to get
        references to other services, and call their methods. For example, to
        retrieve the list of virtual machines of the system you can use the
        `vms_service()` method, which returns a reference to the service that
        manages the virtual machines:
        
        [source,python]
        ----
        # Get the reference to the "vms" service:
        vms_service = system_service.vms_service()
        ----
        
        This service is an instance of `VmsService`, and it has a `list` method
        that returns an array of virtual machines, which are instances of the
        `Vm` class:
        
        [source,python]
        ----
        # Retrieve the virtual machines:
        vms = vms_service.list()
        
        # Print the names and identifiers of the virtual machines:
        for vm in vms:
          print("%s: %s" % (vm.name, vm.id))
        ----
        
        You will find more usage examples in the `examples` directory.
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
