Create a python module that builds DEB package by compressing a file tree or other method – Upwork

The task is to implement classes in module named "deb_generator.py" in python2.7 from the attached archive.

Full API SPEC in PDF format and abstract classes skeletons with mock objects as python code are attached.

The package to implement is named "1.2 Package deb_generator" in the PDF spec.

UML is attached for reference about the relations with other APIs used in the project.
For further details, please see the attached files at https://drive.google.com/folderview?id=0B-2xhhL1p3OtVWVLMHRBN1Bwc1k&usp=sharing

Steps to do:

1. download the attached code archive and PDF spec (see link)
2. from the code archive, edit deb_generator.py file to provide code to all methods as described in the docstring
3. consult the UML and SPEC when needed. These contain pretty-printed docstring texts and visual diagrams.

Module that you will need to implement (deb_generator.py) has this description:
This module provides means for packing an installable DEB package based on several file trees and also provides the interface class (FileExporter) that will use FirmwareGenerator and ConfigGenerator that lie outside of the scope of this module.
  

  Deb package should be installable on ubuntu 14.04 server 64-bit, and automatically register and start a systemd service.
  

  Deb package can be either generated using standard debian automated package generators, or by just compressing a set of pre-compiled files that are created using software compilation of the packages that are to be installed.

You will need to implement these classes:

class FileExporter(object):
This is an interface class that instantiates the correct Generator (either DebGenerator or FirmwareGenerator based on the fact that "deb" substring is present or not present in file_type in the dict supplied as an argument to the init method.
Class has these methods to implement:
1. __init__
2. getFileName
3. getInsertion

class Test(object):
Class to test the operation
Class has these methods to implement:
1. main

class DebGenerator(Generator, ConfigGenerator):
Created DEB file based on data supplied:
Currently only "Server" device_role is supported.

DebGenerator should create a debian package that install two software projects at once and also installs a configuration file. The configuration file contents is created at the time of package generation that happens after the call to getFileName

./usr/bin/vtrunkd
etc.

deb file should contain installed files from these projects:
https://github.com/VrayoSystems/vtrunkd.git
https://github.com/grandrew/vtrunkd-helper.git

and also a file called vh.json installed to /etc/vh.json – this file should contain the output of self.getConfig() method

Also create a systemd file to enable the service vtrunkd_helper (run vtrunkd_helper script that is installed by the deb) and install this config to the correct location and enable the service.

http://patrakov.blogspot.ru/2011/01/writing-systemd-service-files.html

Should be ubuntu 14.04 compatible
Class has these methods to implement:
1. getFileName
2. __del__

For further details, please see the attached documentation at https://drive.google.com/folderview?id=0B-2xhhL1p3OtVWVLMHRBN1Bwc1k&usp=sharing

Budget: $130
Posted On: February 15, 2016 13:21 UTC
ID: 206962294
Category: >
Skills: Debian OS, Python, Ubuntu
Country: Hong Kong
click to apply
Source: Upwork WordPress SEO