Coder Social home page Coder Social logo

darknerofil / ovirt-engine-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ovirt/ovirt-engine-sdk

0.0 0.0 0.0 6.28 MB

This is a mirror for http://gerrit.ovirt.org, for issues use http://bugzilla.redhat.com

Java 15.81% Python 78.27% C 5.62% Shell 0.30%

ovirt-engine-sdk's Introduction

oVirt Python SDK

Introduction

The oVirt Python SDK is a Python package that simplyfies access to the oVirt Engine API.

Important
This document describes how to generate, build and test the SDK. If you are interested in how to use it read the README.adoc file in the sdk directory instead.

Building

The SDK uses libxml2 for parsing and rendering XML documents, and the part that interacts with this 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 to install with the yum package manager you will need to do the following:

# yum -y install \
gcc \
libxml2-devel \
python3-devel

Most of the source code of the Python SDK is automatically generated from the API model.

The code generator is a Java program that resides in the generator directory. This Java program will get the API model and the metamodel artifacts from the available Maven repositories. Because of that in order to build the Python SDK you need to install some additional dependencies. For example to install with the yum package manager you will need to do the following:

# yum -y install \
git \
java-1.8.0-openjdk \
maven \
python3-flake8 \
python3-nose \
python3-wheel

To build and run the tests use the following commands:

$ git clone git://gerrit.ovirt.org/ovirt-engine-sdk
$ mvn package

To build without running the tests:

$ mvn package -Dskipflake=true -DskipTests=true

This will build the code generator, run it to generate the SDK for the version of the API that corresponds to the branch of the SDK that you are using, and build the .tar.gz and .whl files.

If you need to generate it for a different version of the API then you can use the model.version property. For example, if you need to generate the SDK for version 4.1.0 of the SDK you can use this command:

$ mvn package -Dmodel.version=4.1.0

By default the build and the tests are executed using the python command. If you wish to use a different version of Python you can use the python.command property:

$ mvn package -Dpython.command=python3

The generated .tar.gz and .whl files will be located in the sdk/dist directory:

$ find sdk/dist
sdk/dist/ovirt-engine-sdk-4.0.0a0.linux-x86_64.tar.gz
sdk/dist/ovirt-engine-sdk-4.0.0a0.tar.gz
sdk/dist/ovirt_engine_sdk-4.0.0a0-cp27-none-linux_x86_64.whl

ovirt-engine-sdk's People

Contributors

ahadas avatar alhino avatar bennyz avatar bmwiedemann avatar danielerez avatar didib avatar fbacchella avatar gcecchi avatar germanovm avatar imjoey avatar jhernand avatar karmab avatar lukas-bednar avatar machacekondra avatar mnecas avatar mpastern avatar mwperina avatar nirs avatar sandrobonazzola avatar shenitzky avatar sleviim avatar stvnrsnbrg avatar vjuranek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.