distros

class fabobjects.distros.BSD(*args, **kwargs)[source]
get_package_manager()[source]

This will return the name of package manager on given os, example ubuntu should return apt or apt-get. :return: string

class fabobjects.distros.BaseServer(*args, **kwargs)[source]

An SSH daemon connection. Basics This class performs useful high level operations over ssh.

add_app(app)[source]

Add and app to list of apps installed on server. :param app: App instance :return: None

compress(input_file, output_file=None, file_type='tar')[source]

Compress tar or zip files or folder :param input_file: The input file :param output_file: The output file :param file_type: type if its zip or tar :return: None

Create a symbolic link :param str link_from: The initial link :param link_to: File/fold linked to :return: None

deploy_all()[source]

Deploy all app added to server :return: None

get_package_manager()[source]

This will return the name of package manager on given os, example ubuntu should return apt or apt-get. :return: string

getattribute(func, *args, **kwargs)[source]

This method helps you call other instance methods and can accept args and kwargs mostly good for call private variables and methods. :param func: function :param args: :param kwargs: :return: function or None

list_apps()[source]

List apps deployed on server. :return:

static local(command, capture=True, shell=None)[source]

Run a command on the local system.

remove_app(app)[source]

Remove an app from list of apps deployed on server. :param app: App instance :return: None

run_as_app_user(*args, **kwargs)[source]

This should be implemented by apps inheriting this server class.

uncompress(file_path, output_dir=None, file_type='tar')[source]

Uncompress tar or zip files or folder :param file_path: The input file :param output_dir: The output file :param file_type: type if its zip or tar :return: None

class fabobjects.distros.CentOS(*args, **kwargs)[source]
class fabobjects.distros.Debian(*args, **kwargs)[source]
get_package_manager()[source]

This will return the name of package manager on given os, example ubuntu should return apt or apt-get. :return: string

class fabobjects.distros.FreeBsd(*args, **kwargs)[source]
class fabobjects.distros.RedHat(*args, **kwargs)[source]
get_package_manager()[source]

This will return the name of package manager on given os, example ubuntu should return apt or apt-get. :return: string

class fabobjects.distros.Ubuntu(*args, **kwargs)[source]
fabobjects.distros.shell_safe(path)[source]

Makes sure that the given path/string is escaped and safe for shell :param string path: :return: string