diff --git a/Jumpscale/clients/nbh_vertex/NBHClient.py b/Jumpscale/clients/nbh_vertex/NBHClient.py new file mode 100644 index 000000000..ca62ff90c --- /dev/null +++ b/Jumpscale/clients/nbh_vertex/NBHClient.py @@ -0,0 +1,424 @@ +import requests +from Jumpscale import j + +from . import errors + + +JSConfigBase = j.application.JSBaseConfigClass + + +def get_error_string(errval): + for m in dir(errors): + res = getattr(errors, m) + if res == errval: + return m + return "" + + +def raise_if_error(data): + error_string = "" + if isinstance(data, str) or isinstance(data, int): + error_string = get_error_string(str(data)) + if error_string: + raise j.exceptions.RuntimeError(error_string) + + +class NBHClient(JSConfigBase): + _SCHEMATEXT = """ + @url = jumpscale.nbh.client + name* = "main" + username = "" (S) + password_ = "" (S) + service_url = "" (S) + dealer_id = (I) + nbh_sig_ = "" (S) + nbh_wallet_ = "" (S) + """ + + def _init(self, **kwargs): + if not self.username or not self.password_: + raise j.exceptions.Input("Need to specify both username and passwd to use the client") + + if not self.service_url: + raise j.exceptions.Input("Need to url to use the client") + + self._session = requests.session() + + def _request(self, endpoint, params): + url = "{}/{}".format(self.service_url, endpoint) + resp = self._session.get(url, params=params) + + resp.raise_for_status() + + resp_json = resp.json() + data = j.data.serializers.json.loads(resp_json["d"]) + raise_if_error(data) + return data + + def login(self): + params = {"username": self.username, "password": self.password_} + response = self._request("BackofficeLogin", params) + raise_if_error(response["UserId"]) + return response + + def change_password(self, old_password, new_password, confirm_newpassword): + """The ChangePassword operation is used to change the logged in Dealer password with new one + + :param old_password: dealer's old password + :type old_password: string + :param new_password: dealer's new password + :type new_password: string + :param confirm_newpassword: dealer's new password + :type confirm_newpassword: string + :return: true for success + :rtype: bool + """ + self.login() + params = {"OldPW": old_password, "NewPW": new_password, "ConfirmNewPW": confirm_newpassword} + return self._request("ChangePassword", params) + + def create_client(self, parent_id, first_name, second_name, third_name, last_name, username, password, phone, fax, mobile, tel_pw, pob, + country, email, address, readonly_login, forcechange_password): + """The CreateClient operation is used to initialize new client under the specific given parent ID. + + :param parent_id: Parent Identifier which the new client will be under it + :type parent_id: int + :param first_name: client first name + :type first_name: string + :param second_name: client second name + :type second_name: string + :param third_name: client third name + :type third_name: string + :param last_name: client last name + :type last_name: string + :param username: username for the new client + :type username: string + :param password: password for the new client + :type password: string + :param phone: client phone number + :type phone: string + :param fax: client fax number + :type fax: string + :param mobile: client mobile number + :type mobile: string + :param tel_pw: client telephone password + :type tel_pw: string + :param pob: post office box + :type pob: string + :param country: client country + :type country: string + :param email: client email + :type email: string + :param address: client address + :type address: string + :param readonly_login: indicates if the client will only monitor the trades or not + :type readonly_login: bool + :param forcechange_password: indicates if the client will have to change the password after first login or not + :type forcechange_password: bool + :return: client identifier + :rtype: int + """ + self.login() + params = { + "ParentID": parent_id, "FirstName": first_name, + "SecondName": second_name, "ThirdName": third_name, + "LastName": last_name, "Username": username, + "Password": password, "Phone": phone, + "Fax": fax, "Mobile": mobile, + "TelPW": tel_pw, "POB": pob, + "Country": country, "Email": email, + "Address": address, "ReadOnlyLogin": readonly_login, + "ForceChangePassword": forcechange_password + } + return self._request("CreateClient", params) + + def get_client_by_id(self, client_id): + """The GetClientByID operation is used to get client information for a given client number. + + :param client_id: client number to get its information + :type client_id: int + :return: client information + :rtype: dict + """ + self.login() + params = {"ClientID": client_id} + response = self._request("GetClientByID", params) + raise_if_error(response["ClientID"]) + + return response + + def update_client_info(self, client_id, first_name, second_name, third_name, last_name, username, password, phone, fax, mobile, tel_pw, pob, + country, email, address, readonly_login, forcechange_password): + """The UpdateClientInfo operation is used to update information for a specific given client number. + + :param clinet_id: client number to be updated + :type client_id: int + :param first_name: client first name + :type first_name: string + :param second_name: client second name + :type second_name: string + :param third_name: client third name + :type third_name: string + :param last_name: client last name + :type last_name: string + :param username: username for the new client + :type username: string + :param password: password for the new client + :type password: string + :param phone: client phone number + :type phone: string + :param fax: client fax number + :type fax: string + :param mobile: client mobile number + :type mobile: string + :param tel_pw: client telephone password + :type tel_pw: string + :param pob: post office box + :type pob: string + :param country: client country + :type country: string + :param email: client email + :type email: string + :param address: client address + :type address: string + :param readonly_login: indicates if the client will only monitor the trades or not + :type readonly_login: bool + :param forcechange_password: indicates if the client will have to change the password after first login or not + :type forcechange_password: bool + :return: client identifier + :rtype: int + """ + self.login() + params = { + "ClientID": client_id, "FirstName": first_name, + "SecondName": second_name, "ThirdName": third_name, + "LastName": last_name, "Username": username, + "Password": password, "Phone": phone, + "Fax": fax, "Mobile": mobile, + "TelPW": tel_pw, "POB": pob, + "Country": country, "Email": email, + "Address": address, "ReadOnlyLogin": readonly_login, + "ForceChangePassword": forcechange_password + } + return self._request("UpdateClientInfo", params) + + def create_account(self, client_id, account_id, account_type, is_demo, is_locked, dont_liquidate, is_margin, userdefined_date): + """CreateAccount operation is used to initialize new account at specific account type for the given client username. + + :param client_id: client ID to whom you want to create account for + :type client_id: int + :param account_id: initialized account number, 0 means generate ID automatically + :type account_id: int + :param account_type: creation account type. 1 for normal account type, 2 for coverage account type. + :type account_type: int + :param is_demo: to indicate if the account is demo or not + :type is_demo: bool + :param is_locked: to indicate if the account will be locked + :type is_locked: bool + :param dont_liquidate: don't liquidate when reach Liquidation Point + :type dont_liquidate: bool + :param is_margin: to indicate if the account is margin account or not + :type is_margin: bool + :param user_defined_date: trade open time, defaults to "" which means now + :type user_defined_date: str in format DD/MM/yyyy HH:mm:ss, optional + :return: account number + :rtype: int + """ + self.login() + params = { + "ParentID": client_id, "AccountID": account_id, + "AccountType": account_type, "IsDemo": is_demo, + "IsLocked": is_locked, "DontLiquidate": dont_liquidate, + "IsMargin": is_margin, "UserDefined": userdefined_date + } + return self._request("CreateAccount", params) + + def get_account_by_id(self, account_id): + """ GetAccountByID operation is used to get information about the given account number + + :param account_id: account id + :type account_id: int + """ + self.login() + response = self._request("GetAccountByID", {"AccountId": account_id}) + raise_if_error(response["AccountID"]) + + return response + + + def get_client_ids(self, parent_id): + self.login() + response = self._request("GetClientsIDs", {"ParentID": parent_id}) + if len(response) == 1: + raise_if_error(response[0]) + + return response + + def get_accounts_ids(self, client_id): + """The GetAccountsIDs operation is used to get the list of account/s Id/s which are related to a given client number. + + :param client_id: valid client identifier + :type client_id: int + :return: list of account ids + :rtype: list + """ + self.login() + params = {"ClientID": client_id} + response = self._request("GetAccountsIDs", params) + if len(response) == 1: + raise_if_error(response[0]) + + return response + + def account_info_report(self, client_id, is_paging=False): + """The AccountInfoReport operation is used to get the account information report that shows the information for all accounts under the given client number. + + :param client_id: valid client identifier + :type client_id: int + :param is_paging: indicates that you're calling to get the remaining records. First call must be false, next must be true. + :type is_paging: bool, optional + :return: list of accounts info report + :rtype: list + """ + self.login() + params = {"ClientID": client_id, "isPaging": is_paging} + response = self._request("AccountInfoReport", params) + if len(response) == 1: + raise_if_error(response[0]['ClientID']) + + return response + + def account_status_report(self, client_id, account_type, is_paging=False): + """The AccountInfoReport operation is used to get the account information report that shows the information for all accounts under the given client number. + + :param client_id: valid client identifier + :type client_id: int + :param account_type: type of account. 1 for Normal account, 2 for Coverage. + :type account_type: int + :param is_paging: indicates that you're calling to get the remaining records. First call must be false, next must be true. + :type is_paging: bool, optional + :return: list of accounts status report + :rtype: list + """ + self.login() + params = {"ClientID": client_id, "AccountType": account_type, "isPaging": is_paging} + response = self._request("AccountStatusReport", params) + if len(response) == 1: + raise_if_error(response[0]['ClientID']) + return response + + def get_account_stmt(self, account_id, from_date, to_date): + """The GetAccountStatement operation returns the given account statement between the starting date and ending date. + + :param account_id: id of the account to generate the statement for + :type account_id: int + :param from_date: starting date for account statement query. Must be in DD/MM/YYYY format. + :type from_date: str + :param to_date: ending date for account statement query. Must be in DD/MM/YYYY format. + :type to_date: str + """ + self.login() + params = {"AccountID": account_id, "FromDate": from_date, "ToDate": to_date} + response = self._request("GetAccountStmt", params) + if len(response) == 2: + raise_if_error(response[0]) + return response + + def new_position(self, account_id, buy_or_sell, amount, symbol_id, price, note="", user_defined_date=""): + """The NewPosition operation is used to open a new position on specific a symbol for the given account number. + + :param account_id: valid account identifier to open position for + :type account_id: int + :param buy_or_sell: the open position type, 1 for buy and -1 for sell + :type buy_or_sell: int + :param amount: position lots value + :type amount: int + :param symbol_id: trade symbol identifier + :type symbol_id: int + :param price: open trade price value + :type price: int + :param note: string used to mark the open position, defaults to "" + :type note: str, optional + :param user_defined_date: trade open time, defaults to "" which means now + :type user_defined_date: str in format DD/MM/yyyy HH:mm:ss, optional + :return: the new position ticket number + :rtype: [type] + """ + self.login() + params = { + "AccountID": account_id, "BuySell": buy_or_sell, + "Amount":amount, "SymbolID": symbol_id, + "Price":price, "note":note, "UserDefinedData":user_defined_date + } + return self._request("NewPosition", params) + + + def close_position(self, account_id, ticket_id, amount, price, ref_price, commission, user_defined_date=""): + """The ClosePosition operation is used to close the position that belongs to the given account number + + :param account_id: valid account identifier to open position for + :type account_id: int + :param ticket_id: the position number to be closed + :type ticket_id: int + :param amount: position amount to be closed + :type amount: int + :param price: at price value to close position on it + :type price: int + :param ref_price: reference symbol price value + :type ref_price: int + :param commission: the commision value to be used when closing the position + :type commission: int + :param user_defined_date: trade open time, defaults to "" which means now + :type user_defined_date: str in format DD/MM/yyyy HH:mm:ss, optional + :return: closed ticket number + :rtype: int + """ + self.login() + params = { + "AccountID": account_id, "TicketID": ticket_id, + "Amount":amount, "Price":price, + "RefPrice": ref_price, "Comm": commission, + "UserDefinedData":user_defined_date + } + return self._request("ClosePosition", params) + + + def detailed_openpositions_report(self, client_id, account_type, symbol_id=0, position_type=0, is_paging=False): + """The DetailedOpenPositionsReport operation is used to get detailed open positions report that shows the open position details for all accounts + under the given client number. + + :param client_id: valid client identifier to get report for + :type client_id: int + :param account_type: type of account to get account status report for. 1 for Normal Account, 2 for Coverage Account. + :type account_type: int + :param symbol_id: The report will show the open position detailed for this symbol ID. Defaults to 0 means for all Symbol. + :type symbol_id: int + :param position_type: The report will shows the net open position details for this type. 0 for all, 1 for buy type, -1 for sell type. Defaults to 0. + :type position_type: int + :param is_paging: indicates that you're calling to get the remaining records. First call must be false, next must be true. + :type is_paging: bool, optional + :return: list of open positions + :rtype: list + """ + client = self.login() + params = {"ClientID": client_id, "AccountType": account_type, "SymbolID": symbol_id, "PositionType": position_type, "isPaging": is_paging} + response = self._request("DetailedOpenPositionsReport", params) + if len(response) == 1: + raise_if_error(response[0]["ClientID"]) + + return response + + def get_mw_symbols(self): + """The GetMWSymbols operation is used to get market watch symbol setting + :return: + :rtype: + """ + return self._request("GetMWSymbols", {}) + + def get_mw_new_tick(self): + """The GetMWNewTick operation is used to get the market watch symbol data if changed and returns a list of symbols + which holds all symbols with their corresponding Bid/Ask, High/Low. + :return: + :rtype: + """ + return self._request("GetMWNewTick", {}) diff --git a/Jumpscale/clients/nbh_vertex/NBHClientFactory.py b/Jumpscale/clients/nbh_vertex/NBHClientFactory.py new file mode 100644 index 000000000..cc9d36f1b --- /dev/null +++ b/Jumpscale/clients/nbh_vertex/NBHClientFactory.py @@ -0,0 +1,11 @@ +from Jumpscale import j + +from .NBHClient import NBHClient + +JSConfigBase = j.application.JSBaseConfigsClass + + + +class NBHClientFactory(j.application.JSBaseConfigsClass): + __jslocation__ = "j.clients.nbhvertex" + _CHILDCLASS = NBHClient diff --git a/Jumpscale/clients/nbh_vertex/__init__.py b/Jumpscale/clients/nbh_vertex/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/Jumpscale/clients/nbh_vertex/errors.py b/Jumpscale/clients/nbh_vertex/errors.py new file mode 100644 index 000000000..d385d9002 --- /dev/null +++ b/Jumpscale/clients/nbh_vertex/errors.py @@ -0,0 +1,60 @@ +TradingIsClosedError = "-5" # Trading session is closed +OrderAlreadyProcessed = "-6" # Request order is already processed +NotEnoughMoneyError = "-2" # Not enough money to make a position +PositionClosedError = "-10" # Position is already closed. +CannotHedgeError = "-4" # Hedging is not allowed +PositionInPendingModeError = "-11" # Position in pending mode +MarketConditionError = "-50" # Market condition violated +BadConnectionError = "-51" # Bad connection +InternalError = "-200" # Web Service internal error +LoginRequiredError = "-201" # Login is required +InvalidAccountError = "-202" # Invalid account identifier or account is not accessible by logged in client +InvalidTicketError = "-203" # Invalid ticket identifier or ticket is not accessible by logged in client +InvalidOrderError = "-204" # Invalid order identifier or order is not accessible by logged in client +InvalidAmountError = "-205" # Invalid amount +InvalidCloseByHedgeError = "-206" # Error closing given tickets with each other +InvalidLoginInfoUsernameError = "-207" # Invalid username +InvalidLoginInfoPasswordError = "-1" # invalid password +SymbolNotFoundError = "-208" # Invalid symbol name or identifier +InvalidDateFormatError = "-209" # Date format must be in DD/MM/YYYY format +NoDateFoundError = "-210" # No data found for given identifier +InvalidOrderTypeEror = "-211" # Order type is not buy neither sell +CancelLimitOrderError = "-212" # Could not delete limit order +DeleteSLTPOrderError = "-213" # Could not delete SLTP order +UpdateSLTPError = "-214" # Couldn't update SLTP order +NewLimitOrderError = "-215" # Couldn’t place limit order +UpdateLimitOrderError = "-216" # Couldn’t update limit order +LimitOrderNotFoundError = "-217" # Limit order not exist or processed +LimitOrderDeletedExecutedError = "-218" # Limit order not exist or processed +IsReadOnlyError = "-219" # Account is readonly, cannot trade +IsLockedError = "-220" # Account is locked, cannot trade +SendingMailError = "-221" # Could not send mail to department +SendMailInvalidUserError = "-222" # Invalid user /sending failure +JustCloseSymbol = "-223" # Symbol is in just close only +BuyOnlySymbol = "-224" # Symbol in buy mode only +DateISNotLogical = "-225" # Not logical date +InvalidDepositAmountError = "-226" # Deposit amount is not valid +MarketOrderNotFound = "-229" # Invalid order" # ID +InvalidOrMissingParametersError = "-227" # Missing parameters invalid given value. +InvalidPrice = "-228" # Invalid price value. +AllLotsAreManaged = "-230" # Open managed order with a position previously had managed at the overall amount. +NoAccount = "-231" # Login with a client does not have an account. +InvalidLogin = "-232" # Not valid login . +InvalidOperationType = "-233" # Not valid money trans type. +InvalidSerial = "-235" # Enter invalid serial. +HedgeingNotAllowed = "-248" # When hedging not allowed. +InvalidUsername = "-240" # Create client with used client username. +NoPrivilege = "-241" # When making an operation the dealer does not have a privilege on it +InvalidClientID = "-242" # When passing invalid client id. +PositionIsClosed = "-243" # When making an operation on the position already closed +PositionHasSLTP = "-244" # When making an operation on the position has SLTP. +AlreadyProcessed = "-246" # When making an operation on the position that already processed. +DataBaseError = "-247" # unexpected database error +NoData = "-1000" # Request returned 0 data in list +IsPaging = "-1200" # GetHistory operation has returned more than 3000 rows and so you’ll need to call it with isPaging=true to retrieve remaning rows +PositionIsFreezed = "-236" # When making any operation on the freezed position +InvalidNewOldSamePassword = "-237" # When changing password and the old password is the same of the new password +InvalidOldPassword = "-239" # When changing password and old password is invalid +InvalidPassword = "-238" # When enter invalid password +InvalidDeliveryPrice = "-249" # When enter invalid price for delivery +InvalidPeriodID = "-251" # When enter invalid period for chart function diff --git a/Jumpscale/jumpscale_generated.py b/Jumpscale/jumpscale_generated.py index e00f5b3df..75a852a78 100644 --- a/Jumpscale/jumpscale_generated.py +++ b/Jumpscale/jumpscale_generated.py @@ -1,3 +1,4 @@ + # from Jumpscale.core.JSBase import JSBase import os import sys @@ -7,2357 +8,1876 @@ if "/sandbox/lib/jumpscale" not in sys.path: sys.path.append("/sandbox/lib/jumpscale") - -class JSGroup: +class JSGroup(): pass -class group_data(JSGroup): - def __init__(self): - - self._treemanager = None - self._nacl = None - self._randomnames = None - self._indexfile = None - self._idgenerator = None - self._regex = None - self._dict_editor = None - self._types = None - self._worksheets = None - self._rivine = None - self._cachelru = None - self._latex = None - self._hash = None - self._inifile = None - self._time = None - self._timeinterval = None - self._markdown = None - self._bcdb = None - self._schema = None - self._html = None - self._serializers = None - self._capnp = None - self._encryption = None - self._docs = None - self._nltk = None - - @property - def treemanager(self): - if self._treemanager is None: - from Jumpscale.data.treemanager.Treemanager import TreemanagerFactory - self._treemanager = TreemanagerFactory() - return self._treemanager +class group_kosmos(JSGroup): + def __init__(self): + + self._zos = None + @property - def nacl(self): - if self._nacl is None: - from Jumpscale.data.nacl.NACLFactory import NACLFactory + def zos(self): + if self._zos is None: + from DigitalMe.kosmos.zos.ZOSFactory import ZOSCmdFactory + self._zos = ZOSCmdFactory() + return self._zos - self._nacl = NACLFactory() - return self._nacl +j.kosmos = group_kosmos() +j.core._groups["kosmos"] = j.kosmos - @property - def randomnames(self): - if self._randomnames is None: - from Jumpscale.data.random_names.RandomNames import RandomNames - self._randomnames = RandomNames() - return self._randomnames +class group_world(JSGroup): + def __init__(self): + + self._system = None + self._hypervisor = None + @property - def indexfile(self): - if self._indexfile is None: - from Jumpscale.data.indexFile.IndexFiles import IndexDB - - self._indexfile = IndexDB() - return self._indexfile - + def system(self): + if self._system is None: + from DigitalMe.tools.kosmos.WorldSystem import WorldSystem + self._system = WorldSystem() + return self._system @property - def idgenerator(self): - if self._idgenerator is None: - from Jumpscale.data.idgenerator.IDGenerator import IDGenerator + def hypervisor(self): + if self._hypervisor is None: + from DigitalMe.tools.kosmos.world_example.HyperVisorCoordinator.CoordinatorHypervisor import CoordinatorHypervisor + self._hypervisor = CoordinatorHypervisor() + return self._hypervisor - self._idgenerator = IDGenerator() - return self._idgenerator +j.world = group_world() +j.core._groups["world"] = j.world - @property - def regex(self): - if self._regex is None: - from Jumpscale.data.regex.RegexTools import RegexTools - self._regex = RegexTools() - return self._regex +class group_tools(JSGroup): + def __init__(self): + + self._kosmos = None + self._threebotpackage = None + self._wireguard = None + self._threefold_directory = None + self._threefoldgrid = None + self._objectinspector = None + self._fixer = None + self._jinja2 = None + self._logger = None + self._dash = None + self._expect = None + self._cython = None + self._markdowndocs = None + self._performancetrace = None + self._pyinstaller = None + self._formatters = None + self._aggregator = None + self._realityprocess = None + self._licenser = None + self._code = None + self._codeloader = None + self._code = None + self._notapplicableyet = None + self._sandboxer = None + self._reportlab = None + self._timer = None + self._capacity = None + self._storybot = None + self._imagelib = None + self._typechecker = None + self._path = None + self._dnstools = None + self._memusagetest = None + self._offliner = None + self._rexplorer = None + self._googleslides = None + self._console = None + self._legal_contracts = None + self._executorLocal = None + self._executor = None + self._parallel = None + self._team_manager = None + self._syncer = None + self._time = None + self._bash = None + self._tarfile = None + self._issuemanager = None + self._numtools = None + self._zipfile = None + self._email = None + self._flist = None + @property - def dict_editor(self): - if self._dict_editor is None: - from Jumpscale.data.dicteditor.DictEditor import DictEditorFactory - - self._dict_editor = DictEditorFactory() - return self._dict_editor - + def kosmos(self): + if self._kosmos is None: + from DigitalMe.tools.kosmos.kosmos_OLD.Kosmos import Kosmos + self._kosmos = Kosmos() + return self._kosmos @property - def types(self): - if self._types is None: - from Jumpscale.data.types.Types import Types - - self._types = Types() - return self._types - + def threebotpackage(self): + if self._threebotpackage is None: + from DigitalMe.tools.threebot_package.ThreeBotPackageFactory import ThreeBotPackageFactory + self._threebotpackage = ThreeBotPackageFactory() + return self._threebotpackage @property - def worksheets(self): - if self._worksheets is None: - from Jumpscale.data.worksheets.Sheets import Sheets - - self._worksheets = Sheets() - return self._worksheets - + def wireguard(self): + if self._wireguard is None: + from DigitalMe.tools.wireguard.WGFactory import WGFactory + self._wireguard = WGFactory() + return self._wireguard @property - def rivine(self): - if self._rivine is None: - from Jumpscale.data.rivine.RivineDataFactory import RivineDataFactory - - self._rivine = RivineDataFactory() - return self._rivine - + def threefold_directory(self): + if self._threefold_directory is None: + from DigitalMe.tools.threefolddirectory.ThreeFoldDirectory import ThreeFoldDirectory + self._threefold_directory = ThreeFoldDirectory() + return self._threefold_directory @property - def cachelru(self): - if self._cachelru is None: - from Jumpscale.data.cachelru.LRUCacheFactory import LRUCacheFactory - - self._cachelru = LRUCacheFactory() - return self._cachelru - + def threefoldgrid(self): + if self._threefoldgrid is None: + from DigitalMe.tools.threefolddirectory._archive.FarmerFactory import FarmerFactory + self._threefoldgrid = FarmerFactory() + return self._threefoldgrid @property - def latex(self): - if self._latex is None: - from Jumpscale.data.latex.Latex import Latex - - self._latex = Latex() - return self._latex - + def objectinspector(self): + if self._objectinspector is None: + from Jumpscale.tools.objectinspector.ObjectInspector import ObjectInspector + self._objectinspector = ObjectInspector() + return self._objectinspector @property - def hash(self): - if self._hash is None: - from Jumpscale.data.hash.HashTool import HashTool - - self._hash = HashTool() - return self._hash - + def fixer(self): + if self._fixer is None: + from Jumpscale.tools.fixer.Fixer import Fixer + self._fixer = Fixer() + return self._fixer @property - def inifile(self): - if self._inifile is None: - from Jumpscale.data.inifile.IniFile import InifileTool - - self._inifile = InifileTool() - return self._inifile - + def jinja2(self): + if self._jinja2 is None: + from Jumpscale.tools.jinja2.Jinja2 import Jinja2 + self._jinja2 = Jinja2() + return self._jinja2 @property - def time(self): - if self._time is None: - from Jumpscale.data.time.Time import Time_ - - self._time = Time_() - return self._time - + def logger(self): + if self._logger is None: + from Jumpscale.tools.logger.LoggerFactory import LoggerFactory + self._logger = LoggerFactory() + return self._logger @property - def timeinterval(self): - if self._timeinterval is None: - from Jumpscale.data.time.TimeInterval import TimeInterval - - self._timeinterval = TimeInterval() - return self._timeinterval - + def dash(self): + if self._dash is None: + from Jumpscale.tools.dash.DASH import DASH + self._dash = DASH() + return self._dash @property - def markdown(self): - if self._markdown is None: - from Jumpscale.data.markdown.MarkdownFactory import MarkdownFactory - - self._markdown = MarkdownFactory() - return self._markdown - + def expect(self): + if self._expect is None: + from Jumpscale.tools.expect.Expect import ExpectTool + self._expect = ExpectTool() + return self._expect @property - def bcdb(self): - if self._bcdb is None: - from Jumpscale.data.bcdb.BCDBFactory import BCDBFactory - - self._bcdb = BCDBFactory() - return self._bcdb - + def cython(self): + if self._cython is None: + from Jumpscale.tools.cython.CythonFactory import CythonFactory + self._cython = CythonFactory() + return self._cython @property - def schema(self): - if self._schema is None: - from Jumpscale.data.schema.SchemaFactory import SchemaFactory - - self._schema = SchemaFactory() - return self._schema - - @property - def html(self): - if self._html is None: - from Jumpscale.data.html.HTMLFactory import HTMLFactory - - self._html = HTMLFactory() - return self._html - - @property - def serializers(self): - if self._serializers is None: - from Jumpscale.data.serializers.SerializersFactory import SerializersFactory - - self._serializers = SerializersFactory() - return self._serializers - - @property - def capnp(self): - if self._capnp is None: - from Jumpscale.data.capnp.Capnp import Capnp - - self._capnp = Capnp() - return self._capnp - + def markdowndocs(self): + if self._markdowndocs is None: + from Jumpscale.tools.markdowndocs.MarkDownDocs import MarkDownDocs + self._markdowndocs = MarkDownDocs() + return self._markdowndocs @property - def encryption(self): - if self._encryption is None: - from Jumpscale.data.encryption.EncryptionFactory import EncryptionFactory - - self._encryption = EncryptionFactory() - return self._encryption - + def performancetrace(self): + if self._performancetrace is None: + from Jumpscale.tools.performancetrace.PerformanceTrace import PerformanceTraceFactory + self._performancetrace = PerformanceTraceFactory() + return self._performancetrace @property - def docs(self): - if self._docs is None: - from Jumpscale.data.docs.DocsFactory import DocsFactory - - self._docs = DocsFactory() - return self._docs - + def pyinstaller(self): + if self._pyinstaller is None: + from Jumpscale.tools.pyinstaller.PyInstaller import PyInstaller + self._pyinstaller = PyInstaller() + return self._pyinstaller @property - def nltk(self): - if self._nltk is None: - from DigitalMe.data.nltk.NLTK import NLTKFactory - - self._nltk = NLTKFactory() - return self._nltk - - -j.data = group_data() -j.core._groups["data"] = j.data - - -class group_tools(JSGroup): - def __init__(self): - - self._tarfile = None - self._zipfile = None - self._numtools = None - self._email = None - self._issuemanager = None - self._flist = None - self._bash = None - self._sandboxer = None - self._objectinspector = None - self._markdowndocs = None - self._imagelib = None - self._reportlab = None - self._storybot = None - self._fixer = None - self._memusagetest = None - self._expect = None - self._dnstools = None - self._code = None - self._formatters = None - self._executorLocal = None - self._executor = None - self._timer = None - self._typechecker = None - self._notapplicableyet = None - self._dash = None - self._path = None - self._performancetrace = None - self._time = None - self._googleslides = None - self._cython = None - self._realityprocess = None - self._aggregator = None - self._rexplorer = None - self._offliner = None - self._logger = None - self._parallel = None - self._legal_contracts = None - self._syncer = None - self._console = None - self._codeloader = None - self._code = None - self._team_manager = None - self._capacity = None - self._licenser = None - self._pyinstaller = None - self._jinja2 = None - self._wireguard = None - self._kosmos = None - self._threefold_directory = None - self._threefoldgrid = None - self._threebotpackage = None - + def formatters(self): + if self._formatters is None: + from Jumpscale.tools.formatters.FormattersFactory import FormattersFactory + self._formatters = FormattersFactory() + return self._formatters @property - def tarfile(self): - if self._tarfile is None: - from Jumpscale.data.tarfile.TarFile import TarFileFactory - - self._tarfile = TarFileFactory() - return self._tarfile - + def aggregator(self): + if self._aggregator is None: + from Jumpscale.tools.aggregator.Aggregator import Aggregator + self._aggregator = Aggregator() + return self._aggregator @property - def zipfile(self): - if self._zipfile is None: - from Jumpscale.data.zip.ZipFile import ZipFileFactory - - self._zipfile = ZipFileFactory() - return self._zipfile - + def realityprocess(self): + if self._realityprocess is None: + from Jumpscale.tools.aggregator.RealityProcess import RealitProcess + self._realityprocess = RealitProcess() + return self._realityprocess @property - def numtools(self): - if self._numtools is None: - from Jumpscale.data.numtools.NumTools import NumTools - - self._numtools = NumTools() - return self._numtools - + def licenser(self): + if self._licenser is None: + from Jumpscale.tools.licenser.Licenser import Licenser + self._licenser = Licenser() + return self._licenser @property - def email(self): - if self._email is None: - from Jumpscale.data.email.Email import EmailTool - - self._email = EmailTool() - return self._email - + def code(self): + if self._code is None: + from Jumpscale.tools.codetools.CodeTools import CodeTools + self._code = CodeTools() + return self._code @property - def issuemanager(self): - if self._issuemanager is None: - from Jumpscale.data.issuemanager.IssueManager import IssueManager - - self._issuemanager = IssueManager() - return self._issuemanager - + def codeloader(self): + if self._codeloader is None: + from Jumpscale.tools.codeloader.CodeLoader import CodeLoader + self._codeloader = CodeLoader() + return self._codeloader @property - def flist(self): - if self._flist is None: - from Jumpscale.data.flist.FListFactory import FListFactory - - self._flist = FListFactory() - return self._flist - + def code(self): + if self._code is None: + from Jumpscale.tools.codeloader.CodeTools import CodeTools + self._code = CodeTools() + return self._code @property - def bash(self): - if self._bash is None: - from Jumpscale.sal.bash.BashFactory import BashFactory - - self._bash = BashFactory() - return self._bash - + def notapplicableyet(self): + if self._notapplicableyet is None: + from Jumpscale.tools.builder.Builder import Builder + self._notapplicableyet = Builder() + return self._notapplicableyet @property def sandboxer(self): if self._sandboxer is None: from Jumpscale.tools.sandboxer.Sandboxer import Sandboxer - - self._sandboxer = Sandboxer() + self._sandboxer = Sandboxer() return self._sandboxer - - @property - def objectinspector(self): - if self._objectinspector is None: - from Jumpscale.tools.objectinspector.ObjectInspector import ObjectInspector - - self._objectinspector = ObjectInspector() - return self._objectinspector - - @property - def markdowndocs(self): - if self._markdowndocs is None: - from Jumpscale.tools.markdowndocs.MarkDownDocs import MarkDownDocs - - self._markdowndocs = MarkDownDocs() - return self._markdowndocs - - @property - def imagelib(self): - if self._imagelib is None: - from Jumpscale.tools.imagelib.ImageLib import ImageLib - - self._imagelib = ImageLib() - return self._imagelib - @property def reportlab(self): if self._reportlab is None: from Jumpscale.tools.reportlab.ReportlabFactory import ReportlabFactory - - self._reportlab = ReportlabFactory() + self._reportlab = ReportlabFactory() return self._reportlab - + @property + def timer(self): + if self._timer is None: + from Jumpscale.tools.timer.Timer import TIMER + self._timer = TIMER() + return self._timer + @property + def capacity(self): + if self._capacity is None: + from Jumpscale.tools.capacity.Factory import Factory + self._capacity = Factory() + return self._capacity @property def storybot(self): if self._storybot is None: from Jumpscale.tools.storybot.StoryBotFactory import StoryBotFactory - - self._storybot = StoryBotFactory() + self._storybot = StoryBotFactory() return self._storybot - @property - def fixer(self): - if self._fixer is None: - from Jumpscale.tools.fixer.Fixer import Fixer - - self._fixer = Fixer() - return self._fixer - + def imagelib(self): + if self._imagelib is None: + from Jumpscale.tools.imagelib.ImageLib import ImageLib + self._imagelib = ImageLib() + return self._imagelib + @property + def typechecker(self): + if self._typechecker is None: + from Jumpscale.tools.typechecker.TypeChecker import TypeCheckerFactory + self._typechecker = TypeCheckerFactory() + return self._typechecker + @property + def path(self): + if self._path is None: + from Jumpscale.tools.path.PathFactory import PathFactory + self._path = PathFactory() + return self._path + @property + def dnstools(self): + if self._dnstools is None: + from Jumpscale.tools.dnstools.DNSTools import DNSTools + self._dnstools = DNSTools() + return self._dnstools @property def memusagetest(self): if self._memusagetest is None: from Jumpscale.tools.memusagetest.MemUsageTest import MemUsageTest - - self._memusagetest = MemUsageTest() + self._memusagetest = MemUsageTest() return self._memusagetest - @property - def expect(self): - if self._expect is None: - from Jumpscale.tools.expect.Expect import ExpectTool - - self._expect = ExpectTool() - return self._expect - + def offliner(self): + if self._offliner is None: + from Jumpscale.tools.offliner.Offliner import Offliner + self._offliner = Offliner() + return self._offliner @property - def dnstools(self): - if self._dnstools is None: - from Jumpscale.tools.dnstools.DNSTools import DNSTools - - self._dnstools = DNSTools() - return self._dnstools - + def rexplorer(self): + if self._rexplorer is None: + from Jumpscale.tools.offliner.Rexplorer import Rexplorer + self._rexplorer = Rexplorer() + return self._rexplorer @property - def code(self): - if self._code is None: - from Jumpscale.tools.codetools.CodeTools import CodeTools - - self._code = CodeTools() - return self._code - + def googleslides(self): + if self._googleslides is None: + from Jumpscale.tools.googleslides.GoogleSlides import GoogleSlides + self._googleslides = GoogleSlides() + return self._googleslides @property - def formatters(self): - if self._formatters is None: - from Jumpscale.tools.formatters.FormattersFactory import FormattersFactory - - self._formatters = FormattersFactory() - return self._formatters - + def console(self): + if self._console is None: + from Jumpscale.tools.console.Console import Console + self._console = Console() + return self._console + @property + def legal_contracts(self): + if self._legal_contracts is None: + from Jumpscale.tools.legal_contracts.LegalContractsFactory import LegalContractsFactory + self._legal_contracts = LegalContractsFactory() + return self._legal_contracts @property def executorLocal(self): if self._executorLocal is None: from Jumpscale.tools.executor.ExecutorLocal import ExecutorLocal - - self._executorLocal = ExecutorLocal() + self._executorLocal = ExecutorLocal() return self._executorLocal - @property def executor(self): if self._executor is None: from Jumpscale.tools.executor.ExecutorFactory import ExecutorFactory - - self._executor = ExecutorFactory() + self._executor = ExecutorFactory() return self._executor - - @property - def timer(self): - if self._timer is None: - from Jumpscale.tools.timer.Timer import TIMER - - self._timer = TIMER() - return self._timer - - @property - def typechecker(self): - if self._typechecker is None: - from Jumpscale.tools.typechecker.TypeChecker import TypeCheckerFactory - - self._typechecker = TypeCheckerFactory() - return self._typechecker - - @property - def notapplicableyet(self): - if self._notapplicableyet is None: - from Jumpscale.tools.builder.Builder import Builder - - self._notapplicableyet = Builder() - return self._notapplicableyet - @property - def dash(self): - if self._dash is None: - from Jumpscale.tools.dash.DASH import DASH - - self._dash = DASH() - return self._dash - + def parallel(self): + if self._parallel is None: + from Jumpscale.tools.parallel.Parallel import Parallel + self._parallel = Parallel() + return self._parallel @property - def path(self): - if self._path is None: - from Jumpscale.tools.path.PathFactory import PathFactory - - self._path = PathFactory() - return self._path - + def team_manager(self): + if self._team_manager is None: + from Jumpscale.tools.teammgr.Teammgr import Teammgr + self._team_manager = Teammgr() + return self._team_manager @property - def performancetrace(self): - if self._performancetrace is None: - from Jumpscale.tools.performancetrace.PerformanceTrace import PerformanceTraceFactory - - self._performancetrace = PerformanceTraceFactory() - return self._performancetrace - + def syncer(self): + if self._syncer is None: + from Jumpscale.tools.syncer.SyncerFactory import SyncerFactory + self._syncer = SyncerFactory() + return self._syncer @property def time(self): if self._time is None: from Jumpscale.tools.time.Time import Time - - self._time = Time() + self._time = Time() return self._time - @property - def googleslides(self): - if self._googleslides is None: - from Jumpscale.tools.googleslides.GoogleSlides import GoogleSlides - - self._googleslides = GoogleSlides() - return self._googleslides - + def bash(self): + if self._bash is None: + from Jumpscale.sal.bash.BashFactory import BashFactory + self._bash = BashFactory() + return self._bash @property - def cython(self): - if self._cython is None: - from Jumpscale.tools.cython.CythonFactory import CythonFactory - - self._cython = CythonFactory() - return self._cython - + def tarfile(self): + if self._tarfile is None: + from Jumpscale.data.tarfile.TarFile import TarFileFactory + self._tarfile = TarFileFactory() + return self._tarfile @property - def realityprocess(self): - if self._realityprocess is None: - from Jumpscale.tools.aggregator.RealityProcess import RealitProcess - - self._realityprocess = RealitProcess() - return self._realityprocess - + def issuemanager(self): + if self._issuemanager is None: + from Jumpscale.data.issuemanager.IssueManager import IssueManager + self._issuemanager = IssueManager() + return self._issuemanager @property - def aggregator(self): - if self._aggregator is None: - from Jumpscale.tools.aggregator.Aggregator import Aggregator - - self._aggregator = Aggregator() - return self._aggregator - + def numtools(self): + if self._numtools is None: + from Jumpscale.data.numtools.NumTools import NumTools + self._numtools = NumTools() + return self._numtools @property - def rexplorer(self): - if self._rexplorer is None: - from Jumpscale.tools.offliner.Rexplorer import Rexplorer - - self._rexplorer = Rexplorer() - return self._rexplorer - + def zipfile(self): + if self._zipfile is None: + from Jumpscale.data.zip.ZipFile import ZipFileFactory + self._zipfile = ZipFileFactory() + return self._zipfile @property - def offliner(self): - if self._offliner is None: - from Jumpscale.tools.offliner.Offliner import Offliner - - self._offliner = Offliner() - return self._offliner - + def email(self): + if self._email is None: + from Jumpscale.data.email.Email import EmailTool + self._email = EmailTool() + return self._email @property - def logger(self): - if self._logger is None: - from Jumpscale.tools.logger.LoggerFactory import LoggerFactory + def flist(self): + if self._flist is None: + from Jumpscale.data.flist.FListFactory import FListFactory + self._flist = FListFactory() + return self._flist - self._logger = LoggerFactory() - return self._logger +j.tools = group_tools() +j.core._groups["tools"] = j.tools - @property - def parallel(self): - if self._parallel is None: - from Jumpscale.tools.parallel.Parallel import Parallel - self._parallel = Parallel() - return self._parallel +class group_data(JSGroup): + def __init__(self): + + self._nltk = None + self._serializers = None + self._capnp = None + self._inifile = None + self._bcdb = None + self._idgenerator = None + self._indexfile = None + self._worksheets = None + self._docs = None + self._latex = None + self._regex = None + self._schema = None + self._hash = None + self._randomnames = None + self._cachelru = None + self._rivine = None + self._html = None + self._markdown = None + self._nacl = None + self._encryption = None + self._treemanager = None + self._dict_editor = None + self._types = None + self._time = None + self._timeinterval = None + @property - def legal_contracts(self): - if self._legal_contracts is None: - from Jumpscale.tools.legal_contracts.LegalContractsFactory import LegalContractsFactory - - self._legal_contracts = LegalContractsFactory() - return self._legal_contracts - + def nltk(self): + if self._nltk is None: + from DigitalMe.data.nltk.NLTK import NLTKFactory + self._nltk = NLTKFactory() + return self._nltk @property - def syncer(self): - if self._syncer is None: - from Jumpscale.tools.syncer.SyncerFactory import SyncerFactory - - self._syncer = SyncerFactory() - return self._syncer - + def serializers(self): + if self._serializers is None: + from Jumpscale.data.serializers.SerializersFactory import SerializersFactory + self._serializers = SerializersFactory() + return self._serializers @property - def console(self): - if self._console is None: - from Jumpscale.tools.console.Console import Console - - self._console = Console() - return self._console - + def capnp(self): + if self._capnp is None: + from Jumpscale.data.capnp.Capnp import Capnp + self._capnp = Capnp() + return self._capnp @property - def codeloader(self): - if self._codeloader is None: - from Jumpscale.tools.codeloader.CodeLoader import CodeLoader - - self._codeloader = CodeLoader() - return self._codeloader - + def inifile(self): + if self._inifile is None: + from Jumpscale.data.inifile.IniFile import InifileTool + self._inifile = InifileTool() + return self._inifile @property - def code(self): - if self._code is None: - from Jumpscale.tools.codeloader.CodeTools import CodeTools - - self._code = CodeTools() - return self._code - + def bcdb(self): + if self._bcdb is None: + from Jumpscale.data.bcdb.BCDBFactory import BCDBFactory + self._bcdb = BCDBFactory() + return self._bcdb @property - def team_manager(self): - if self._team_manager is None: - from Jumpscale.tools.teammgr.Teammgr import Teammgr - - self._team_manager = Teammgr() - return self._team_manager - - @property - def capacity(self): - if self._capacity is None: - from Jumpscale.tools.capacity.Factory import Factory - - self._capacity = Factory() - return self._capacity - - @property - def licenser(self): - if self._licenser is None: - from Jumpscale.tools.licenser.Licenser import Licenser - - self._licenser = Licenser() - return self._licenser - - @property - def pyinstaller(self): - if self._pyinstaller is None: - from Jumpscale.tools.pyinstaller.PyInstaller import PyInstaller - - self._pyinstaller = PyInstaller() - return self._pyinstaller - + def idgenerator(self): + if self._idgenerator is None: + from Jumpscale.data.idgenerator.IDGenerator import IDGenerator + self._idgenerator = IDGenerator() + return self._idgenerator @property - def jinja2(self): - if self._jinja2 is None: - from Jumpscale.tools.jinja2.Jinja2 import Jinja2 - - self._jinja2 = Jinja2() - return self._jinja2 - + def indexfile(self): + if self._indexfile is None: + from Jumpscale.data.indexFile.IndexFiles import IndexDB + self._indexfile = IndexDB() + return self._indexfile @property - def wireguard(self): - if self._wireguard is None: - from DigitalMe.tools.wireguard.WGFactory import WGFactory - - self._wireguard = WGFactory() - return self._wireguard - + def worksheets(self): + if self._worksheets is None: + from Jumpscale.data.worksheets.Sheets import Sheets + self._worksheets = Sheets() + return self._worksheets @property - def kosmos(self): - if self._kosmos is None: - from DigitalMe.tools.kosmos.kosmos_OLD.Kosmos import Kosmos - - self._kosmos = Kosmos() - return self._kosmos - + def docs(self): + if self._docs is None: + from Jumpscale.data.docs.DocsFactory import DocsFactory + self._docs = DocsFactory() + return self._docs @property - def threefold_directory(self): - if self._threefold_directory is None: - from DigitalMe.tools.threefolddirectory.ThreeFoldDirectory import ThreeFoldDirectory - - self._threefold_directory = ThreeFoldDirectory() - return self._threefold_directory - + def latex(self): + if self._latex is None: + from Jumpscale.data.latex.Latex import Latex + self._latex = Latex() + return self._latex @property - def threefoldgrid(self): - if self._threefoldgrid is None: - from DigitalMe.tools.threefolddirectory._archive.FarmerFactory import FarmerFactory - - self._threefoldgrid = FarmerFactory() - return self._threefoldgrid - + def regex(self): + if self._regex is None: + from Jumpscale.data.regex.RegexTools import RegexTools + self._regex = RegexTools() + return self._regex @property - def threebotpackage(self): - if self._threebotpackage is None: - from DigitalMe.tools.threebot_package.ThreeBotPackageFactory import ThreeBotPackageFactory - - self._threebotpackage = ThreeBotPackageFactory() - return self._threebotpackage - - -j.tools = group_tools() -j.core._groups["tools"] = j.tools - - -class group_data_units(JSGroup): - def __init__(self): - - self._sizes = None - + def schema(self): + if self._schema is None: + from Jumpscale.data.schema.SchemaFactory import SchemaFactory + self._schema = SchemaFactory() + return self._schema @property - def sizes(self): - if self._sizes is None: - from Jumpscale.data.numtools.units.Units import Bytes - - self._sizes = Bytes() - return self._sizes - - -j.data_units = group_data_units() -j.core._groups["data_units"] = j.data_units - - -class group_builders(JSGroup): - def __init__(self): - - self._system = None - self._blockchain = None - self.__template = None - self._db = None - self._web = None - self.__template = None - self._monitoring = None - self._runtimes = None - self._storage = None - self._systemtools = None - self._apps = None - self._buildenv = None - self._tools = None - self._network = None - self._virtualization = None - self._libs = None - + def hash(self): + if self._hash is None: + from Jumpscale.data.hash.HashTool import HashTool + self._hash = HashTool() + return self._hash @property - def system(self): - if self._system is None: - from Jumpscale.builders.system.BuilderSystemFactory import BuilderSystemPackage - - self._system = BuilderSystemPackage() - return self._system - + def randomnames(self): + if self._randomnames is None: + from Jumpscale.data.random_names.RandomNames import RandomNames + self._randomnames = RandomNames() + return self._randomnames @property - def blockchain(self): - if self._blockchain is None: - from Jumpscale.builders.blockchain.BuilderBlockchainFactory import BuilderBlockchainFactory - - self._blockchain = BuilderBlockchainFactory() - return self._blockchain - + def cachelru(self): + if self._cachelru is None: + from Jumpscale.data.cachelru.LRUCacheFactory import LRUCacheFactory + self._cachelru = LRUCacheFactory() + return self._cachelru @property - def _template(self): - if self.__template is None: - from Jumpscale.builders.TEMPLATE.BuilderGrafanaFactory import GrafanaFactory - - self.__template = GrafanaFactory() - return self.__template - + def rivine(self): + if self._rivine is None: + from Jumpscale.data.rivine.RivineDataFactory import RivineDataFactory + self._rivine = RivineDataFactory() + return self._rivine @property - def db(self): - if self._db is None: - from Jumpscale.builders.db.BuildDBFactory import BuildDBFactory - - self._db = BuildDBFactory() - return self._db - + def html(self): + if self._html is None: + from Jumpscale.data.html.HTMLFactory import HTMLFactory + self._html = HTMLFactory() + return self._html @property - def web(self): - if self._web is None: - from Jumpscale.builders.web.BuilderWebFactory import BuilderWebFactory - - self._web = BuilderWebFactory() - return self._web - + def markdown(self): + if self._markdown is None: + from Jumpscale.data.markdown.MarkdownFactory import MarkdownFactory + self._markdown = MarkdownFactory() + return self._markdown @property - def _template(self): - if self.__template is None: - from Jumpscale.builders.monitoring.BuilderGrafanaFactory import BuilderGrafanaFactory - - self.__template = BuilderGrafanaFactory() - return self.__template - + def nacl(self): + if self._nacl is None: + from Jumpscale.data.nacl.NACLFactory import NACLFactory + self._nacl = NACLFactory() + return self._nacl @property - def monitoring(self): - if self._monitoring is None: - from Jumpscale.builders.monitoring.BuilderMonitoringFactory import BuilderMonitoringFactory - - self._monitoring = BuilderMonitoringFactory() - return self._monitoring - + def encryption(self): + if self._encryption is None: + from Jumpscale.data.encryption.EncryptionFactory import EncryptionFactory + self._encryption = EncryptionFactory() + return self._encryption @property - def runtimes(self): - if self._runtimes is None: - from Jumpscale.builders.runtimes.BuilderRuntimesFactory import BuilderRuntimesFactory - - self._runtimes = BuilderRuntimesFactory() - return self._runtimes - + def treemanager(self): + if self._treemanager is None: + from Jumpscale.data.treemanager.Treemanager import TreemanagerFactory + self._treemanager = TreemanagerFactory() + return self._treemanager @property - def storage(self): - if self._storage is None: - from Jumpscale.builders.storage.BuilderStorageFactory import BuilderAppsFactory - - self._storage = BuilderAppsFactory() - return self._storage - + def dict_editor(self): + if self._dict_editor is None: + from Jumpscale.data.dicteditor.DictEditor import DictEditorFactory + self._dict_editor = DictEditorFactory() + return self._dict_editor @property - def systemtools(self): - if self._systemtools is None: - from Jumpscale.builders.systemtools.BuilderSystemToolsFactory import BuilderSystemToolsFactory - - self._systemtools = BuilderSystemToolsFactory() - return self._systemtools - + def types(self): + if self._types is None: + from Jumpscale.data.types.Types import Types + self._types = Types() + return self._types @property - def apps(self): - if self._apps is None: - from Jumpscale.builders.apps.BuilderAppsFactory import BuilderAppsFactory - - self._apps = BuilderAppsFactory() - return self._apps - + def time(self): + if self._time is None: + from Jumpscale.data.time.Time import Time_ + self._time = Time_() + return self._time @property - def buildenv(self): - if self._buildenv is None: - from Jumpscale.builders.buildenv.BuildEnv import BuildEnv + def timeinterval(self): + if self._timeinterval is None: + from Jumpscale.data.time.TimeInterval import TimeInterval + self._timeinterval = TimeInterval() + return self._timeinterval - self._buildenv = BuildEnv() - return self._buildenv +j.data = group_data() +j.core._groups["data"] = j.data - @property - def tools(self): - if self._tools is None: - from Jumpscale.builders.tools.BuilderTools import BuilderTools - self._tools = BuilderTools() - return self._tools - - @property - def network(self): - if self._network is None: - from Jumpscale.builders.network.BuilderNetworkFactory import BuilderNetworkFactory - - self._network = BuilderNetworkFactory() - return self._network - - @property - def virtualization(self): - if self._virtualization is None: - from Jumpscale.builders.virtualization.BuilderVirtualizationFactory import BuilderAppsFactory - - self._virtualization = BuilderAppsFactory() - return self._virtualization - - @property - def libs(self): - if self._libs is None: - from Jumpscale.builders.libs.BuilderLibsFactory import BuilderLibsFactory - - self._libs = BuilderLibsFactory() - return self._libs - - -j.builders = group_builders() -j.core._groups["builders"] = j.builders - - -class group_sal(JSGroup): - def __init__(self): - - self._unix = None - self._netconfig = None - self._windows = None - self._bcdbfs = None - self._sshd = None - self._ssl = None - self._samba = None - self._ubuntu = None - self._dnsmasq = None - self._process = None - self._tls = None - self._ufw = None - self._nginx = None - self._nettools = None - self._btrfs = None - self._rsync = None - self._openvswitch = None - self._nic = None - self._nfs = None - self._qemu_img = None - self._kvm = None - self._hostsfile = None - self._disklayout = None - self._bind = None - self._fswalker = None - self._fs = None - self._docker = None - self._coredns = None - - @property - def unix(self): - if self._unix is None: - from Jumpscale.sal.unix.Unix import UnixSystem - - self._unix = UnixSystem() - return self._unix - - @property - def netconfig(self): - if self._netconfig is None: - from Jumpscale.sal.netconfig.Netconfig import Netconfig - - self._netconfig = Netconfig() - return self._netconfig - - @property - def windows(self): - if self._windows is None: - from Jumpscale.sal.windows.Windows import WindowsSystem - - self._windows = WindowsSystem() - return self._windows - - @property - def bcdbfs(self): - if self._bcdbfs is None: - from Jumpscale.sal.bcdbfs.BCDBFS import BCDBFS - - self._bcdbfs = BCDBFS() - return self._bcdbfs - - @property - def sshd(self): - if self._sshd is None: - from Jumpscale.sal.sshd.SSHD import SSHD - - self._sshd = SSHD() - return self._sshd - - @property - def ssl(self): - if self._ssl is None: - from Jumpscale.sal.ssl.SSLFactory import SSLFactory - - self._ssl = SSLFactory() - return self._ssl - - @property - def samba(self): - if self._samba is None: - from Jumpscale.sal.samba.Samba import Samba - - self._samba = Samba() - return self._samba - - @property - def ubuntu(self): - if self._ubuntu is None: - from Jumpscale.sal.ubuntu.Ubuntu import Ubuntu - - self._ubuntu = Ubuntu() - return self._ubuntu - - @property - def dnsmasq(self): - if self._dnsmasq is None: - from Jumpscale.sal.dnsmasq.DnsmasqFactory import DnsmasqFactory - - self._dnsmasq = DnsmasqFactory() - return self._dnsmasq - - @property - def process(self): - if self._process is None: - from Jumpscale.sal.process.SystemProcess import SystemProcess - - self._process = SystemProcess() - return self._process - - @property - def tls(self): - if self._tls is None: - from Jumpscale.sal.tls.TLSFactory import TLSFactory - - self._tls = TLSFactory() - return self._tls - - @property - def ufw(self): - if self._ufw is None: - from Jumpscale.sal.ufw.UFWManager import UFWManager - - self._ufw = UFWManager() - return self._ufw - - @property - def nginx(self): - if self._nginx is None: - from Jumpscale.sal.nginx.Nginx import NginxFactory - - self._nginx = NginxFactory() - return self._nginx - - @property - def nettools(self): - if self._nettools is None: - from Jumpscale.sal.nettools.NetTools import NetTools - - self._nettools = NetTools() - return self._nettools - - @property - def btrfs(self): - if self._btrfs is None: - from Jumpscale.sal.btrfs.BtrfsExtension import BtfsExtensionFactory - - self._btrfs = BtfsExtensionFactory() - return self._btrfs - - @property - def rsync(self): - if self._rsync is None: - from Jumpscale.sal.rsync.RsyncFactory import RsyncFactory - - self._rsync = RsyncFactory() - return self._rsync - - @property - def openvswitch(self): - if self._openvswitch is None: - from Jumpscale.sal.openvswitch.NetConfigFactory import NetConfigFactory - - self._openvswitch = NetConfigFactory() - return self._openvswitch - - @property - def nic(self): - if self._nic is None: - from Jumpscale.sal.nic.UnixNetworkManager import UnixNetworkManager - - self._nic = UnixNetworkManager() - return self._nic - - @property - def nfs(self): - if self._nfs is None: - from Jumpscale.sal.nfs.NFS import NFS - - self._nfs = NFS() - return self._nfs - - @property - def qemu_img(self): - if self._qemu_img is None: - from Jumpscale.sal.qemu_img.Qemu_img import QemuImg - - self._qemu_img = QemuImg() - return self._qemu_img - - @property - def kvm(self): - if self._kvm is None: - from Jumpscale.sal.kvm.KVM import KVM - - self._kvm = KVM() - return self._kvm - - @property - def hostsfile(self): - if self._hostsfile is None: - from Jumpscale.sal.hostfile.HostFile import HostFile - - self._hostsfile = HostFile() - return self._hostsfile - - @property - def disklayout(self): - if self._disklayout is None: - from Jumpscale.sal.disklayout.DiskManager import DiskManager - - self._disklayout = DiskManager() - return self._disklayout - - @property - def bind(self): - if self._bind is None: - from Jumpscale.sal.bind.BindDNS import BindDNS - - self._bind = BindDNS() - return self._bind - - @property - def fswalker(self): - if self._fswalker is None: - from Jumpscale.sal.fs.SystemFSWalker import SystemFSWalker - - self._fswalker = SystemFSWalker() - return self._fswalker - - @property - def fs(self): - if self._fs is None: - from Jumpscale.sal.fs.SystemFS import SystemFS - - self._fs = SystemFS() - return self._fs - - @property - def docker(self): - if self._docker is None: - from Jumpscale.tools.docker.Docker import Docker - - self._docker = Docker() - return self._docker - - @property - def coredns(self): - if self._coredns is None: - from Jumpscale.clients.coredns.alternative.CoreDnsFactory import CoreDnsFactory - - self._coredns = CoreDnsFactory() - return self._coredns - - -j.sal = group_sal() -j.core._groups["sal"] = j.sal - - -class group_sal_zos(JSGroup): +class group_clients(JSGroup): def __init__(self): - - self._stats_collector = None - self._ftpclient = None + + self._gedis_backend = None + self._multicast = None + self._gedis = None + self._git = None + self._traefik = None + self._gitea = None + self._oauth = None + self.__template = None + self._redis_config = None + self._itsyouonline = None + self._logger = None + self._corex = None + self._threefold_directory = None + self._odoo = None + self._btc_alpha = None + self._graphql = None + self._credis_core = None + self._redis = None + self._zboot = None + self._google_compute = None + self._ipmi = None + self._racktivity = None + self._http = None + self._ovh = None + self._zhub = None + self._tarantool = None + self._openvcloud = None + self._portal = None + self._digitalocean = None + self._rdb = None + self._zerotier = None + self._etcd = None + self._sonic = None + self._mysql = None self._mongodb = None + self._mongoengine = None + self._packetnet = None + self._sqlitedb = None + self._kraken = None + self._zos = None + self._zdb = None + self._ssh = None + self._email = None + self._sendgrid = None + self._telegram_bot = None + self._alphavantage = None + self._s3 = None + self._sshkey = None + self._freeflowpages = None + self._currencylayer = None + self._gdrive = None + self._peewee = None + self._influxdb = None + self._nbhvertex = None + self._intercom = None + self._github = None + self._sendgrid = None + self._syncthing = None + self._grafana = None self._tfchain = None + self._btc_electrum = None + self._zhubdirect = None + self._rogerthat = None + self._sqlalchemy = None + self._trello = None self._coredns = None - self._ippoolmanager = None - self._zerodb = None - self._etcd = None - self._storagepools = None - self._zrobot = None + self._graphite = None + self._postgres = None + self._sshagent = None + self._zerostor = None self._zstor = None - self._vm = None - self._hypervisor = None - self._grafana = None - self._primitives = None - self._sandbox = None - self._disks = None - self._containers = None - self._farm = None - self._minio = None - self._node = None - self._network = None - self._userbot = None - self._traefik = None - self._gateway = None - self._influx = None - self._bootstrapbot = None - self._capacity = None - self._zt_bootstrap = None - - @property - def stats_collector(self): - if self._stats_collector is None: - from Jumpscale.sal_zos.stats_collector.stats_collector_factory import StatsCollectorFactory - - self._stats_collector = StatsCollectorFactory() - return self._stats_collector - - @property - def ftpclient(self): - if self._ftpclient is None: - from Jumpscale.sal_zos.ftpClient.ftpFactory import FtpFactory - - self._ftpclient = FtpFactory() - return self._ftpclient - - @property - def mongodb(self): - if self._mongodb is None: - from Jumpscale.sal_zos.mongodb.MongodbFactory import MongodbFactory - - self._mongodb = MongodbFactory() - return self._mongodb - - @property - def tfchain(self): - if self._tfchain is None: - from Jumpscale.sal_zos.tfchain.TfChainFactory import TfChainFactory - - self._tfchain = TfChainFactory() - return self._tfchain + self._virtualbox = None + self._webgateway = None + @property - def coredns(self): - if self._coredns is None: - from Jumpscale.sal_zos.coredns.CorednsFactory import CorednsFactory - - self._coredns = CorednsFactory() - return self._coredns - + def gedis_backend(self): + if self._gedis_backend is None: + from DigitalMe.clients.gedis_backends.GedisBackendClientFactory import GedisBackendClientFactory + self._gedis_backend = GedisBackendClientFactory() + return self._gedis_backend @property - def ippoolmanager(self): - if self._ippoolmanager is None: - from Jumpscale.sal_zos.ip_pool_manager.IPPoolManagerFactory import IPPoolManagerFactory - - self._ippoolmanager = IPPoolManagerFactory() - return self._ippoolmanager - + def multicast(self): + if self._multicast is None: + from DigitalMe.clients.multicast.MulticastFactory import MulticastFactory + self._multicast = MulticastFactory() + return self._multicast @property - def zerodb(self): - if self._zerodb is None: - from Jumpscale.sal_zos.zerodb.zerodbFactory import ZerodbFactory - - self._zerodb = ZerodbFactory() - return self._zerodb - + def gedis(self): + if self._gedis is None: + from DigitalMe.clients.gedis.GedisClientFactory import GedisClientFactory + self._gedis = GedisClientFactory() + return self._gedis @property - def etcd(self): - if self._etcd is None: - from Jumpscale.sal_zos.ETCD.ETCDFactory import ETCDFactory - - self._etcd = ETCDFactory() - return self._etcd - + def git(self): + if self._git is None: + from Jumpscale.clients.git.GitFactory import GitFactory + self._git = GitFactory() + return self._git @property - def storagepools(self): - if self._storagepools is None: - from Jumpscale.sal_zos.storage.StorageFactory import ContainerFactory - - self._storagepools = ContainerFactory() - return self._storagepools - + def traefik(self): + if self._traefik is None: + from Jumpscale.clients.traefik.TraefikFactory import TraefikFactory + self._traefik = TraefikFactory() + return self._traefik @property - def zrobot(self): - if self._zrobot is None: - from Jumpscale.sal_zos.zrobot.ZRobotFactory import ZeroRobotFactory - - self._zrobot = ZeroRobotFactory() - return self._zrobot - + def gitea(self): + if self._gitea is None: + from Jumpscale.clients.gitea.GiteaFactory import GiteaFactory + self._gitea = GiteaFactory() + return self._gitea @property - def zstor(self): - if self._zstor is None: - from Jumpscale.sal_zos.zstor.ZStorFactory import ZeroStorFactory - - self._zstor = ZeroStorFactory() - return self._zstor - + def oauth(self): + if self._oauth is None: + from Jumpscale.clients.oauth.OauthFactory import OauthFactory + self._oauth = OauthFactory() + return self._oauth @property - def vm(self): - if self._vm is None: - from Jumpscale.sal_zos.vm.ZOS_VMFactory import ZOS_VMFactory - - self._vm = ZOS_VMFactory() - return self._vm - + def _template(self): + if self.__template is None: + from Jumpscale.clients.TEMPLATE.TemplateGrafanaFactory import GrafanaFactory + self.__template = GrafanaFactory() + return self.__template @property - def hypervisor(self): - if self._hypervisor is None: - from Jumpscale.sal_zos.hypervisor.HypervisorFactory import HypervisorFactory - - self._hypervisor = HypervisorFactory() - return self._hypervisor - + def redis_config(self): + if self._redis_config is None: + from Jumpscale.clients.redisconfig.RedisConfigFactory import RedisConfigFactory + self._redis_config = RedisConfigFactory() + return self._redis_config @property - def grafana(self): - if self._grafana is None: - from Jumpscale.sal_zos.grafana.grafanaFactory import GrafanaFactory - - self._grafana = GrafanaFactory() - return self._grafana - + def itsyouonline(self): + if self._itsyouonline is None: + from Jumpscale.clients.itsyouonline.IYOFactory import IYOFactory + self._itsyouonline = IYOFactory() + return self._itsyouonline @property - def primitives(self): - if self._primitives is None: - from Jumpscale.sal_zos.primitives.PrimitivesFactory import PrimitivesFactory - - self._primitives = PrimitivesFactory() - return self._primitives - + def logger(self): + if self._logger is None: + from Jumpscale.clients.logger.LoggerFactory import LoggerFactory + self._logger = LoggerFactory() + return self._logger @property - def sandbox(self): - if self._sandbox is None: - from Jumpscale.sal_zos.sandbox.ZOSSandboxFactory import ZOSSandboxFactory - - self._sandbox = ZOSSandboxFactory() - return self._sandbox - + def corex(self): + if self._corex is None: + from Jumpscale.clients.corex.CoreXFactory import CoreXClientFactory + self._corex = CoreXClientFactory() + return self._corex @property - def disks(self): - if self._disks is None: - from Jumpscale.sal_zos.disks.DisksFactory import DisksFactory - - self._disks = DisksFactory() - return self._disks - + def threefold_directory(self): + if self._threefold_directory is None: + from Jumpscale.clients.threefold_directory.GridCapacityFactory import GridCapacityFactory + self._threefold_directory = GridCapacityFactory() + return self._threefold_directory @property - def containers(self): - if self._containers is None: - from Jumpscale.sal_zos.container.ContainerFactory import ContainerFactory - - self._containers = ContainerFactory() - return self._containers - + def odoo(self): + if self._odoo is None: + from Jumpscale.clients.odoo.OdooFactory import OdooFactory + self._odoo = OdooFactory() + return self._odoo @property - def farm(self): - if self._farm is None: - from Jumpscale.sal_zos.farm.FarmFactory import FarmFactory - - self._farm = FarmFactory() - return self._farm - + def btc_alpha(self): + if self._btc_alpha is None: + from Jumpscale.clients.btc_alpha.BTCFactory import GitHubFactory + self._btc_alpha = GitHubFactory() + return self._btc_alpha @property - def minio(self): - if self._minio is None: - from Jumpscale.sal_zos.minio.MinioFactory import MinioFactory - - self._minio = MinioFactory() - return self._minio - + def graphql(self): + if self._graphql is None: + from Jumpscale.clients.graphql.GraphQLFactory import GraphQLFactory + self._graphql = GraphQLFactory() + return self._graphql @property - def node(self): - if self._node is None: - from Jumpscale.sal_zos.node.NodeFactory import PrimitivesFactory - - self._node = PrimitivesFactory() - return self._node - + def credis_core(self): + if self._credis_core is None: + from Jumpscale.clients.redis.RedisCoreClient import RedisCoreClient + self._credis_core = RedisCoreClient() + return self._credis_core @property - def network(self): - if self._network is None: - from Jumpscale.sal_zos.network.NetworkFactory import NetworkFactory - - self._network = NetworkFactory() - return self._network - + def redis(self): + if self._redis is None: + from Jumpscale.clients.redis.RedisFactory import RedisFactory + self._redis = RedisFactory() + return self._redis @property - def userbot(self): - if self._userbot is None: - from Jumpscale.sal_zos.user_bot.UserBotFactory import UserBotFactory - - self._userbot = UserBotFactory() - return self._userbot - + def zboot(self): + if self._zboot is None: + from Jumpscale.clients.zero_boot.ZerobootFactory import ZerobootFactory + self._zboot = ZerobootFactory() + return self._zboot @property - def traefik(self): - if self._traefik is None: - from Jumpscale.sal_zos.traefik.TraefikFactory import TraefikFactory - - self._traefik = TraefikFactory() - return self._traefik - + def google_compute(self): + if self._google_compute is None: + from Jumpscale.clients.google_compute.GoogleComputeFactory import GoogleComputeFactory + self._google_compute = GoogleComputeFactory() + return self._google_compute @property - def gateway(self): - if self._gateway is None: - from Jumpscale.sal_zos.gateway.gatewayFactory import GatewayFactory - - self._gateway = GatewayFactory() - return self._gateway - + def ipmi(self): + if self._ipmi is None: + from Jumpscale.clients.ipmi.IpmiFactory import IpmiFactory + self._ipmi = IpmiFactory() + return self._ipmi @property - def influx(self): - if self._influx is None: - from Jumpscale.sal_zos.influxdb.influxdbFactory import InfluxDBFactory - - self._influx = InfluxDBFactory() - return self._influx - + def racktivity(self): + if self._racktivity is None: + from Jumpscale.clients.racktivity.RacktivityFactory import RacktivityFactory + self._racktivity = RacktivityFactory() + return self._racktivity @property - def bootstrapbot(self): - if self._bootstrapbot is None: - from Jumpscale.sal_zos.bootstrap_bot.BootstrapBotFactory import BootstrapBotFactory - - self._bootstrapbot = BootstrapBotFactory() - return self._bootstrapbot - + def http(self): + if self._http is None: + from Jumpscale.clients.http.HttpClient import HttpClient + self._http = HttpClient() + return self._http @property - def capacity(self): - if self._capacity is None: - from Jumpscale.sal_zos.capacity.CapacityFactory import CapacityFactory - - self._capacity = CapacityFactory() - return self._capacity - + def ovh(self): + if self._ovh is None: + from Jumpscale.clients.ovh.OVHFactory import OVHFactory + self._ovh = OVHFactory() + return self._ovh @property - def zt_bootstrap(self): - if self._zt_bootstrap is None: - from Jumpscale.sal_zos.zerotier_bootstrap.ZerotierBootstrapFactory import ZerotierBootstrapFactory - - self._zt_bootstrap = ZerotierBootstrapFactory() - return self._zt_bootstrap - - -j.sal_zos = group_sal_zos() -j.core._groups["sal_zos"] = j.sal_zos - - -class group_servers(JSGroup): - def __init__(self): - - self._startupcmd = None - self._sanic = None - self._gedis_websocket = None - self._odoo = None - self._errbot = None - self._flask = None - self._etcd = None - self._sockexec = None - self._sonic = None - self._corex = None - self._mail_forwarder = None - self._zdb = None - self._capacity = None - self._tmux = None - self._gundb = None - self._threebot = None - self._gedis = None - self._raftserver = None - self._myjobs = None - self._openresty = None - self._radicale = None - self._rack = None - self._graphql = None - self._dns = None - + def zhub(self): + if self._zhub is None: + from Jumpscale.clients.zero_hub.ZeroHubFactory import ZeroHubFactory + self._zhub = ZeroHubFactory() + return self._zhub @property - def startupcmd(self): - if self._startupcmd is None: - from Jumpscale.servers.startupcmd.StartupCMDFactory import StartupCMDFactory - - self._startupcmd = StartupCMDFactory() - return self._startupcmd - + def tarantool(self): + if self._tarantool is None: + from Jumpscale.clients.tarantool.TarantoolFactory import TarantoolFactory + self._tarantool = TarantoolFactory() + return self._tarantool @property - def sanic(self): - if self._sanic is None: - from Jumpscale.servers.sanic.SanicFactory import SanicFactory - - self._sanic = SanicFactory() - return self._sanic - + def openvcloud(self): + if self._openvcloud is None: + from Jumpscale.clients.openvcloud.OVCFactory import OVCClientFactory + self._openvcloud = OVCClientFactory() + return self._openvcloud @property - def gedis_websocket(self): - if self._gedis_websocket is None: - from Jumpscale.servers.gedis_websocket.GedisWebsocketFactory import GedisWebsocketFactory - - self._gedis_websocket = GedisWebsocketFactory() - return self._gedis_websocket - + def portal(self): + if self._portal is None: + from Jumpscale.clients.portal.PortalClientFactory import PortalClientFactory + self._portal = PortalClientFactory() + return self._portal @property - def odoo(self): - if self._odoo is None: - from Jumpscale.servers.odoo.OdooFactory import OdooFactory - - self._odoo = OdooFactory() - return self._odoo - + def digitalocean(self): + if self._digitalocean is None: + from Jumpscale.clients.digitalocean.DigitalOceanFactory import DigitalOceanFactory + self._digitalocean = DigitalOceanFactory() + return self._digitalocean @property - def errbot(self): - if self._errbot is None: - from Jumpscale.servers.errbot.ErrBotFactory import ErrBotFactory - - self._errbot = ErrBotFactory() - return self._errbot - + def rdb(self): + if self._rdb is None: + from Jumpscale.clients.stor_rdb.RDBFactory import RDBFactory + self._rdb = RDBFactory() + return self._rdb @property - def flask(self): - if self._flask is None: - from Jumpscale.servers.flaskserver.JSWebServers import JSWebServers - - self._flask = JSWebServers() - return self._flask - + def zerotier(self): + if self._zerotier is None: + from Jumpscale.clients.zerotier.ZerotierFactory import ZerotierFactory + self._zerotier = ZerotierFactory() + return self._zerotier @property def etcd(self): if self._etcd is None: - from Jumpscale.servers.etcd.EtcdServer import EtcdServer - - self._etcd = EtcdServer() + from Jumpscale.clients.etcd.EtcdFactory import EtcdFactory + self._etcd = EtcdFactory() return self._etcd - - @property - def sockexec(self): - if self._sockexec is None: - from Jumpscale.servers.sockexec.SockExec import SockExec - - self._sockexec = SockExec() - return self._sockexec - @property def sonic(self): if self._sonic is None: - from Jumpscale.servers.sonic.SonicFactory import SonicFactory - - self._sonic = SonicFactory() + from Jumpscale.clients.sonic.SonicFactory import SonicFactory + self._sonic = SonicFactory() return self._sonic - @property - def corex(self): - if self._corex is None: - from Jumpscale.servers.corex.CorexFactory import CorexFactory - - self._corex = CorexFactory() - return self._corex - + def mysql(self): + if self._mysql is None: + from Jumpscale.clients.mysql.MySQLFactory import MySQLFactory + self._mysql = MySQLFactory() + return self._mysql @property - def mail_forwarder(self): - if self._mail_forwarder is None: - from Jumpscale.servers.email_forwarder.JSMailForwarder import JSMailForwarderFactory - - self._mail_forwarder = JSMailForwarderFactory() - return self._mail_forwarder - + def mongodb(self): + if self._mongodb is None: + from Jumpscale.clients.mongodbclient.MongoFactory import MongoFactory + self._mongodb = MongoFactory() + return self._mongodb + @property + def mongoengine(self): + if self._mongoengine is None: + from Jumpscale.clients.mongodbclient.MongoEngineFactory import MongoEngineFactory + self._mongoengine = MongoEngineFactory() + return self._mongoengine + @property + def packetnet(self): + if self._packetnet is None: + from Jumpscale.clients.packetnet.PacketNetFactory import PacketNetFactory + self._packetnet = PacketNetFactory() + return self._packetnet + @property + def sqlitedb(self): + if self._sqlitedb is None: + from Jumpscale.clients.stor_sqlite.DBSQLiteFactory import DBSQLiteFactory + self._sqlitedb = DBSQLiteFactory() + return self._sqlitedb + @property + def kraken(self): + if self._kraken is None: + from Jumpscale.clients.kraken.KrakenFactory import KrakenFactory + self._kraken = KrakenFactory() + return self._kraken + @property + def zos(self): + if self._zos is None: + from Jumpscale.clients.zero_os.ZeroOSClientFactory import ZeroOSFactory + self._zos = ZeroOSFactory() + return self._zos @property def zdb(self): if self._zdb is None: - from Jumpscale.servers.zdb.ZDBServers import ZDBServers - - self._zdb = ZDBServers() + from Jumpscale.clients.stor_zdb.ZDBClientFactory import ZDBClientFactory + self._zdb = ZDBClientFactory() return self._zdb - - @property - def capacity(self): - if self._capacity is None: - from Jumpscale.servers.grid_capacity.CapacityFactory import CapacityFactory - - self._capacity = CapacityFactory() - return self._capacity - - @property - def tmux(self): - if self._tmux is None: - from Jumpscale.servers.tmux.Tmux import Tmux - - self._tmux = Tmux() - return self._tmux - - @property - def gundb(self): - if self._gundb is None: - from DigitalMe.servers.gundb.GundbFactory import GundbFactory - - self._gundb = GundbFactory() - return self._gundb - - @property - def threebot(self): - if self._threebot is None: - from DigitalMe.servers.threebot.ThreeBotServersFactory import ThreeBotServersFactory - - self._threebot = ThreeBotServersFactory() - return self._threebot - @property - def gedis(self): - if self._gedis is None: - from DigitalMe.servers.gedis.GedisFactory import GedisFactory - - self._gedis = GedisFactory() - return self._gedis - + def ssh(self): + if self._ssh is None: + from Jumpscale.clients.ssh.SSHClientFactory import SSHClientFactory + self._ssh = SSHClientFactory() + return self._ssh @property - def raftserver(self): - if self._raftserver is None: - from DigitalMe.servers.raft.RaftServerFactory import RaftServerFactory - - self._raftserver = RaftServerFactory() - return self._raftserver - + def email(self): + if self._email is None: + from Jumpscale.clients.mail.EmailFactory import EmailFactory + self._email = EmailFactory() + return self._email @property - def myjobs(self): - if self._myjobs is None: - from DigitalMe.servers.myjobs.MyJobs import MyJobs - - self._myjobs = MyJobs() - return self._myjobs - + def sendgrid(self): + if self._sendgrid is None: + from Jumpscale.clients.mail.sendgrid.SendGridClient import SendGridClient + self._sendgrid = SendGridClient() + return self._sendgrid @property - def openresty(self): - if self._openresty is None: - from DigitalMe.servers.openresty.OpenRestyFactory import OpenRestyFactory - - self._openresty = OpenRestyFactory() - return self._openresty - + def telegram_bot(self): + if self._telegram_bot is None: + from Jumpscale.clients.telegram_bot.TelegramBotFactory import TelegramBotFactory + self._telegram_bot = TelegramBotFactory() + return self._telegram_bot @property - def radicale(self): - if self._radicale is None: - from DigitalMe.servers.radicale.RadicaleFactory import RadicaleFactory - - self._radicale = RadicaleFactory() - return self._radicale - + def alphavantage(self): + if self._alphavantage is None: + from Jumpscale.clients.alphavantage.AlphaVantage import AlphaVantageClient + self._alphavantage = AlphaVantageClient() + return self._alphavantage @property - def rack(self): - if self._rack is None: - from DigitalMe.servers.gevent_rack.ServerRackFactory import ServerRackFactory - - self._rack = ServerRackFactory() - return self._rack - + def s3(self): + if self._s3 is None: + from Jumpscale.clients.s3.S3Factory import S3Factory + self._s3 = S3Factory() + return self._s3 @property - def graphql(self): - if self._graphql is None: - from DigitalMe.servers.graphql.GraphQLFactory import GraphQLFactory - - self._graphql = GraphQLFactory() - return self._graphql - + def sshkey(self): + if self._sshkey is None: + from Jumpscale.clients.sshkey.SSHKeys import SSHKeys + self._sshkey = SSHKeys() + return self._sshkey @property - def dns(self): - if self._dns is None: - from DigitalMe.servers.dns.DNSServerFactory import DNSServerFactory - - self._dns = DNSServerFactory() - return self._dns - - -j.servers = group_servers() -j.core._groups["servers"] = j.servers - - -class group_tutorials(JSGroup): - def __init__(self): - - self._base = None - + def freeflowpages(self): + if self._freeflowpages is None: + from Jumpscale.clients.freeflow.FreeFlowFactory import FreeFlowFactory + self._freeflowpages = FreeFlowFactory() + return self._freeflowpages @property - def base(self): - if self._base is None: - from Jumpscale.tutorials.base.Tutorial import Tutorial - - self._base = Tutorial() - return self._base - - -j.tutorials = group_tutorials() -j.core._groups["tutorials"] = j.tutorials - - -class group_clients(JSGroup): - def __init__(self): - - self._ipmi = None - self._rogerthat = None - self._btc_electrum = None - self._tfchain = None - self._webgateway = None - self._github = None - self._sqlalchemy = None - self._email = None - self._sendgrid = None - self._openvcloud = None - self.__template = None - self._oauth = None - self._graphite = None - self._http = None - self._zos = None - self._itsyouonline = None - self._coredns = None - self._mongoengine = None - self._mongodb = None - self._postgres = None - self._threefold_directory = None - self._redis = None - self._credis_core = None - self._kraken = None - self._ssh = None - self._mysql = None - self._odoo = None - self._zstor = None - self._zerostor = None - self._sshkey = None - self._etcd = None - self._sshagent = None - self._zhub = None - self._grafana = None - self._packetnet = None - self._portal = None - self._rdb = None - self._google_compute = None - self._sendgrid = None - self._digitalocean = None - self._currencylayer = None - self._sonic = None - self._zhubdirect = None - self._corex = None - self._syncthing = None - self._redis_config = None - self._gitea = None - self._ovh = None - self._freeflowpages = None - self._trello = None - self._intercom = None - self._btc_alpha = None - self._logger = None - self._racktivity = None - self._zdb = None - self._s3 = None - self._alphavantage = None - self._git = None - self._sqlitedb = None - self._graphql = None - self._tarantool = None - self._traefik = None - self._telegram_bot = None - self._influxdb = None - self._zboot = None - self._peewee = None - self._zerotier = None - self._gdrive = None - self._virtualbox = None - self._gedis_backend = None - self._gedis = None - self._multicast = None - + def currencylayer(self): + if self._currencylayer is None: + from Jumpscale.clients.currencylayer.CurrencyLayer import CurrencyLayerFactory + self._currencylayer = CurrencyLayerFactory() + return self._currencylayer @property - def ipmi(self): - if self._ipmi is None: - from Jumpscale.clients.ipmi.IpmiFactory import IpmiFactory - - self._ipmi = IpmiFactory() - return self._ipmi - + def gdrive(self): + if self._gdrive is None: + from Jumpscale.clients.gdrive.GDriveFactory import GDriveFactory + self._gdrive = GDriveFactory() + return self._gdrive @property - def rogerthat(self): - if self._rogerthat is None: - from Jumpscale.clients.rogerthat.RogerthatFactory import RogerthatFactory - - self._rogerthat = RogerthatFactory() - return self._rogerthat - + def peewee(self): + if self._peewee is None: + from Jumpscale.clients.peewee.PeeweeFactory import PeeweeFactory + self._peewee = PeeweeFactory() + return self._peewee @property - def btc_electrum(self): - if self._btc_electrum is None: - from Jumpscale.clients.blockchain.electrum.ElectrumClientFactory import ElectrumClientFactory - - self._btc_electrum = ElectrumClientFactory() - return self._btc_electrum - + def influxdb(self): + if self._influxdb is None: + from Jumpscale.clients.influxdb.InfluxdbFactory import InfluxdbFactory + self._influxdb = InfluxdbFactory() + return self._influxdb @property - def tfchain(self): - if self._tfchain is None: - from Jumpscale.clients.blockchain.tfchain.TFChainClientFactory import TFChainClientFactory - - self._tfchain = TFChainClientFactory() - return self._tfchain - + def nbhvertex(self): + if self._nbhvertex is None: + from Jumpscale.clients.nbh_vertex.NBHClientFactory import NBHClientFactory + self._nbhvertex = NBHClientFactory() + return self._nbhvertex @property - def webgateway(self): - if self._webgateway is None: - from Jumpscale.clients.webgateway.WebGatewayFactory import WebGatewayFactory - - self._webgateway = WebGatewayFactory() - return self._webgateway - + def intercom(self): + if self._intercom is None: + from Jumpscale.clients.intercom.IntercomFactory import Intercom + self._intercom = Intercom() + return self._intercom @property def github(self): if self._github is None: from Jumpscale.clients.github.GitHubFactory import GitHubFactory - - self._github = GitHubFactory() + self._github = GitHubFactory() return self._github - - @property - def sqlalchemy(self): - if self._sqlalchemy is None: - from Jumpscale.clients.sqlalchemy.SQLAlchemyFactory import SQLAlchemyFactory - - self._sqlalchemy = SQLAlchemyFactory() - return self._sqlalchemy - - @property - def email(self): - if self._email is None: - from Jumpscale.clients.mail.EmailFactory import EmailFactory - - self._email = EmailFactory() - return self._email - @property def sendgrid(self): if self._sendgrid is None: - from Jumpscale.clients.mail.sendgrid.SendGridClient import SendGridClient - - self._sendgrid = SendGridClient() + from Jumpscale.clients.sendgrid.SendgridFactory import SendgridFactory + self._sendgrid = SendgridFactory() return self._sendgrid - @property - def openvcloud(self): - if self._openvcloud is None: - from Jumpscale.clients.openvcloud.OVCFactory import OVCClientFactory - - self._openvcloud = OVCClientFactory() - return self._openvcloud - + def syncthing(self): + if self._syncthing is None: + from Jumpscale.clients.syncthing.SyncthingFactory import SyncthingFactory + self._syncthing = SyncthingFactory() + return self._syncthing @property - def _template(self): - if self.__template is None: - from Jumpscale.clients.TEMPLATE.TemplateGrafanaFactory import GrafanaFactory - - self.__template = GrafanaFactory() - return self.__template - + def grafana(self): + if self._grafana is None: + from Jumpscale.clients.grafana.GrafanaFactory import GrafanaFactory + self._grafana = GrafanaFactory() + return self._grafana @property - def oauth(self): - if self._oauth is None: - from Jumpscale.clients.oauth.OauthFactory import OauthFactory - - self._oauth = OauthFactory() - return self._oauth - + def tfchain(self): + if self._tfchain is None: + from Jumpscale.clients.blockchain.tfchain.TFChainClientFactory import TFChainClientFactory + self._tfchain = TFChainClientFactory() + return self._tfchain @property - def graphite(self): - if self._graphite is None: - from Jumpscale.clients.graphite.GraphiteFactory import GraphiteFactory - - self._graphite = GraphiteFactory() - return self._graphite - + def btc_electrum(self): + if self._btc_electrum is None: + from Jumpscale.clients.blockchain.electrum.ElectrumClientFactory import ElectrumClientFactory + self._btc_electrum = ElectrumClientFactory() + return self._btc_electrum @property - def http(self): - if self._http is None: - from Jumpscale.clients.http.HttpClient import HttpClient - - self._http = HttpClient() - return self._http - + def zhubdirect(self): + if self._zhubdirect is None: + from Jumpscale.clients.zero_hub_direct.HubDirectFactory import HubDirectFactory + self._zhubdirect = HubDirectFactory() + return self._zhubdirect @property - def zos(self): - if self._zos is None: - from Jumpscale.clients.zero_os.ZeroOSClientFactory import ZeroOSFactory - - self._zos = ZeroOSFactory() - return self._zos - + def rogerthat(self): + if self._rogerthat is None: + from Jumpscale.clients.rogerthat.RogerthatFactory import RogerthatFactory + self._rogerthat = RogerthatFactory() + return self._rogerthat @property - def itsyouonline(self): - if self._itsyouonline is None: - from Jumpscale.clients.itsyouonline.IYOFactory import IYOFactory - - self._itsyouonline = IYOFactory() - return self._itsyouonline - + def sqlalchemy(self): + if self._sqlalchemy is None: + from Jumpscale.clients.sqlalchemy.SQLAlchemyFactory import SQLAlchemyFactory + self._sqlalchemy = SQLAlchemyFactory() + return self._sqlalchemy + @property + def trello(self): + if self._trello is None: + from Jumpscale.clients.trello.TrelloFactory import Trello + self._trello = Trello() + return self._trello @property def coredns(self): if self._coredns is None: from Jumpscale.clients.coredns.CoreDNSFactory import CoreDnsFactory - - self._coredns = CoreDnsFactory() + self._coredns = CoreDnsFactory() return self._coredns - - @property - def mongoengine(self): - if self._mongoengine is None: - from Jumpscale.clients.mongodbclient.MongoEngineFactory import MongoEngineFactory - - self._mongoengine = MongoEngineFactory() - return self._mongoengine - @property - def mongodb(self): - if self._mongodb is None: - from Jumpscale.clients.mongodbclient.MongoFactory import MongoFactory - - self._mongodb = MongoFactory() - return self._mongodb - + def graphite(self): + if self._graphite is None: + from Jumpscale.clients.graphite.GraphiteFactory import GraphiteFactory + self._graphite = GraphiteFactory() + return self._graphite @property def postgres(self): if self._postgres is None: from Jumpscale.clients.postgresql.PostgresqlFactory import PostgresqlFactory - - self._postgres = PostgresqlFactory() + self._postgres = PostgresqlFactory() return self._postgres - @property - def threefold_directory(self): - if self._threefold_directory is None: - from Jumpscale.clients.threefold_directory.GridCapacityFactory import GridCapacityFactory - - self._threefold_directory = GridCapacityFactory() - return self._threefold_directory - + def sshagent(self): + if self._sshagent is None: + from Jumpscale.clients.sshagent.SSHAgent import SSHAgent + self._sshagent = SSHAgent() + return self._sshagent @property - def redis(self): - if self._redis is None: - from Jumpscale.clients.redis.RedisFactory import RedisFactory - - self._redis = RedisFactory() - return self._redis - + def zerostor(self): + if self._zerostor is None: + from Jumpscale.clients.zero_stor.ZeroStorFactoryDeprecated import ZeroStorFactoryDeprecated + self._zerostor = ZeroStorFactoryDeprecated() + return self._zerostor @property - def credis_core(self): - if self._credis_core is None: - from Jumpscale.clients.redis.RedisCoreClient import RedisCoreClient - - self._credis_core = RedisCoreClient() - return self._credis_core - + def zstor(self): + if self._zstor is None: + from Jumpscale.clients.zero_stor.ZeroStorFactory import ZeroStorFactory + self._zstor = ZeroStorFactory() + return self._zstor @property - def kraken(self): - if self._kraken is None: - from Jumpscale.clients.kraken.KrakenFactory import KrakenFactory - - self._kraken = KrakenFactory() - return self._kraken - + def virtualbox(self): + if self._virtualbox is None: + from Jumpscale.clients.virtualbox.VirtualboxFactory import VirtualboxFactory + self._virtualbox = VirtualboxFactory() + return self._virtualbox @property - def ssh(self): - if self._ssh is None: - from Jumpscale.clients.ssh.SSHClientFactory import SSHClientFactory + def webgateway(self): + if self._webgateway is None: + from Jumpscale.clients.webgateway.WebGatewayFactory import WebGatewayFactory + self._webgateway = WebGatewayFactory() + return self._webgateway - self._ssh = SSHClientFactory() - return self._ssh +j.clients = group_clients() +j.core._groups["clients"] = j.clients - @property - def mysql(self): - if self._mysql is None: - from Jumpscale.clients.mysql.MySQLFactory import MySQLFactory - self._mysql = MySQLFactory() - return self._mysql +class group_servers(JSGroup): + def __init__(self): + + self._rack = None + self._openresty = None + self._graphql = None + self._myjobs = None + self._radicale = None + self._gundb = None + self._threebot = None + self._dns = None + self._raftserver = None + self._gedis = None + self._errbot = None + self._zdb = None + self._corex = None + self._odoo = None + self._tmux = None + self._startupcmd = None + self._sockexec = None + self._flask = None + self._etcd = None + self._sonic = None + self._sanic = None + self._gedis_websocket = None + self._capacity = None + self._mail_forwarder = None + + @property + def rack(self): + if self._rack is None: + from DigitalMe.servers.gevent_rack.ServerRackFactory import ServerRackFactory + self._rack = ServerRackFactory() + return self._rack + @property + def openresty(self): + if self._openresty is None: + from DigitalMe.servers.openresty.OpenRestyFactory import OpenRestyFactory + self._openresty = OpenRestyFactory() + return self._openresty + @property + def graphql(self): + if self._graphql is None: + from DigitalMe.servers.graphql.GraphQLFactory import GraphQLFactory + self._graphql = GraphQLFactory() + return self._graphql + @property + def myjobs(self): + if self._myjobs is None: + from DigitalMe.servers.myjobs.MyJobs import MyJobs + self._myjobs = MyJobs() + return self._myjobs + @property + def radicale(self): + if self._radicale is None: + from DigitalMe.servers.radicale.RadicaleFactory import RadicaleFactory + self._radicale = RadicaleFactory() + return self._radicale + @property + def gundb(self): + if self._gundb is None: + from DigitalMe.servers.gundb.GundbFactory import GundbFactory + self._gundb = GundbFactory() + return self._gundb + @property + def threebot(self): + if self._threebot is None: + from DigitalMe.servers.threebot.ThreeBotServersFactory import ThreeBotServersFactory + self._threebot = ThreeBotServersFactory() + return self._threebot + @property + def dns(self): + if self._dns is None: + from DigitalMe.servers.dns.DNSServerFactory import DNSServerFactory + self._dns = DNSServerFactory() + return self._dns + @property + def raftserver(self): + if self._raftserver is None: + from DigitalMe.servers.raft.RaftServerFactory import RaftServerFactory + self._raftserver = RaftServerFactory() + return self._raftserver + @property + def gedis(self): + if self._gedis is None: + from DigitalMe.servers.gedis.GedisFactory import GedisFactory + self._gedis = GedisFactory() + return self._gedis + @property + def errbot(self): + if self._errbot is None: + from Jumpscale.servers.errbot.ErrBotFactory import ErrBotFactory + self._errbot = ErrBotFactory() + return self._errbot + @property + def zdb(self): + if self._zdb is None: + from Jumpscale.servers.zdb.ZDBServers import ZDBServers + self._zdb = ZDBServers() + return self._zdb + @property + def corex(self): + if self._corex is None: + from Jumpscale.servers.corex.CorexFactory import CorexFactory + self._corex = CorexFactory() + return self._corex @property def odoo(self): if self._odoo is None: - from Jumpscale.clients.odoo.OdooFactory import OdooFactory - - self._odoo = OdooFactory() + from Jumpscale.servers.odoo.OdooFactory import OdooFactory + self._odoo = OdooFactory() return self._odoo - @property - def zstor(self): - if self._zstor is None: - from Jumpscale.clients.zero_stor.ZeroStorFactory import ZeroStorFactory - - self._zstor = ZeroStorFactory() - return self._zstor - + def tmux(self): + if self._tmux is None: + from Jumpscale.servers.tmux.Tmux import Tmux + self._tmux = Tmux() + return self._tmux @property - def zerostor(self): - if self._zerostor is None: - from Jumpscale.clients.zero_stor.ZeroStorFactoryDeprecated import ZeroStorFactoryDeprecated - - self._zerostor = ZeroStorFactoryDeprecated() - return self._zerostor - + def startupcmd(self): + if self._startupcmd is None: + from Jumpscale.servers.startupcmd.StartupCMDFactory import StartupCMDFactory + self._startupcmd = StartupCMDFactory() + return self._startupcmd @property - def sshkey(self): - if self._sshkey is None: - from Jumpscale.clients.sshkey.SSHKeys import SSHKeys - - self._sshkey = SSHKeys() - return self._sshkey - + def sockexec(self): + if self._sockexec is None: + from Jumpscale.servers.sockexec.SockExec import SockExec + self._sockexec = SockExec() + return self._sockexec + @property + def flask(self): + if self._flask is None: + from Jumpscale.servers.flaskserver.JSWebServers import JSWebServers + self._flask = JSWebServers() + return self._flask @property def etcd(self): if self._etcd is None: - from Jumpscale.clients.etcd.EtcdFactory import EtcdFactory - - self._etcd = EtcdFactory() + from Jumpscale.servers.etcd.EtcdServer import EtcdServer + self._etcd = EtcdServer() return self._etcd - @property - def sshagent(self): - if self._sshagent is None: - from Jumpscale.clients.sshagent.SSHAgent import SSHAgent - - self._sshagent = SSHAgent() - return self._sshagent - + def sonic(self): + if self._sonic is None: + from Jumpscale.servers.sonic.SonicFactory import SonicFactory + self._sonic = SonicFactory() + return self._sonic @property - def zhub(self): - if self._zhub is None: - from Jumpscale.clients.zero_hub.ZeroHubFactory import ZeroHubFactory - - self._zhub = ZeroHubFactory() - return self._zhub - + def sanic(self): + if self._sanic is None: + from Jumpscale.servers.sanic.SanicFactory import SanicFactory + self._sanic = SanicFactory() + return self._sanic @property - def grafana(self): - if self._grafana is None: - from Jumpscale.clients.grafana.GrafanaFactory import GrafanaFactory - - self._grafana = GrafanaFactory() - return self._grafana - + def gedis_websocket(self): + if self._gedis_websocket is None: + from Jumpscale.servers.gedis_websocket.GedisWebsocketFactory import GedisWebsocketFactory + self._gedis_websocket = GedisWebsocketFactory() + return self._gedis_websocket @property - def packetnet(self): - if self._packetnet is None: - from Jumpscale.clients.packetnet.PacketNetFactory import PacketNetFactory - - self._packetnet = PacketNetFactory() - return self._packetnet - + def capacity(self): + if self._capacity is None: + from Jumpscale.servers.grid_capacity.CapacityFactory import CapacityFactory + self._capacity = CapacityFactory() + return self._capacity @property - def portal(self): - if self._portal is None: - from Jumpscale.clients.portal.PortalClientFactory import PortalClientFactory + def mail_forwarder(self): + if self._mail_forwarder is None: + from Jumpscale.servers.email_forwarder.JSMailForwarder import JSMailForwarderFactory + self._mail_forwarder = JSMailForwarderFactory() + return self._mail_forwarder - self._portal = PortalClientFactory() - return self._portal +j.servers = group_servers() +j.core._groups["servers"] = j.servers - @property - def rdb(self): - if self._rdb is None: - from Jumpscale.clients.stor_rdb.RDBFactory import RDBFactory - self._rdb = RDBFactory() - return self._rdb +class group_builders(JSGroup): + def __init__(self): + + self.__template = None + self._monitoring = None + self.__template = None + self._virtualization = None + self._db = None + self._runtimes = None + self._storage = None + self._tools = None + self._system = None + self._apps = None + self._libs = None + self._systemtools = None + self._blockchain = None + self._web = None + self._network = None + self._buildenv = None + @property - def google_compute(self): - if self._google_compute is None: - from Jumpscale.clients.google_compute.GoogleComputeFactory import GoogleComputeFactory - - self._google_compute = GoogleComputeFactory() - return self._google_compute - + def _template(self): + if self.__template is None: + from Jumpscale.builders.monitoring.BuilderGrafanaFactory import BuilderGrafanaFactory + self.__template = BuilderGrafanaFactory() + return self.__template @property - def sendgrid(self): - if self._sendgrid is None: - from Jumpscale.clients.sendgrid.SendgridFactory import SendgridFactory - - self._sendgrid = SendgridFactory() - return self._sendgrid - + def monitoring(self): + if self._monitoring is None: + from Jumpscale.builders.monitoring.BuilderMonitoringFactory import BuilderMonitoringFactory + self._monitoring = BuilderMonitoringFactory() + return self._monitoring @property - def digitalocean(self): - if self._digitalocean is None: - from Jumpscale.clients.digitalocean.DigitalOceanFactory import DigitalOceanFactory - - self._digitalocean = DigitalOceanFactory() - return self._digitalocean - + def _template(self): + if self.__template is None: + from Jumpscale.builders.TEMPLATE.BuilderGrafanaFactory import GrafanaFactory + self.__template = GrafanaFactory() + return self.__template @property - def currencylayer(self): - if self._currencylayer is None: - from Jumpscale.clients.currencylayer.CurrencyLayer import CurrencyLayerFactory + def virtualization(self): + if self._virtualization is None: + from Jumpscale.builders.virtualization.BuilderVirtualizationFactory import BuilderAppsFactory + self._virtualization = BuilderAppsFactory() + return self._virtualization + @property + def db(self): + if self._db is None: + from Jumpscale.builders.db.BuildDBFactory import BuildDBFactory + self._db = BuildDBFactory() + return self._db + @property + def runtimes(self): + if self._runtimes is None: + from Jumpscale.builders.runtimes.BuilderRuntimesFactory import BuilderRuntimesFactory + self._runtimes = BuilderRuntimesFactory() + return self._runtimes + @property + def storage(self): + if self._storage is None: + from Jumpscale.builders.storage.BuilderStorageFactory import BuilderAppsFactory + self._storage = BuilderAppsFactory() + return self._storage + @property + def tools(self): + if self._tools is None: + from Jumpscale.builders.tools.BuilderTools import BuilderTools + self._tools = BuilderTools() + return self._tools + @property + def system(self): + if self._system is None: + from Jumpscale.builders.system.BuilderSystemFactory import BuilderSystemPackage + self._system = BuilderSystemPackage() + return self._system + @property + def apps(self): + if self._apps is None: + from Jumpscale.builders.apps.BuilderAppsFactory import BuilderAppsFactory + self._apps = BuilderAppsFactory() + return self._apps + @property + def libs(self): + if self._libs is None: + from Jumpscale.builders.libs.BuilderLibsFactory import BuilderLibsFactory + self._libs = BuilderLibsFactory() + return self._libs + @property + def systemtools(self): + if self._systemtools is None: + from Jumpscale.builders.systemtools.BuilderSystemToolsFactory import BuilderSystemToolsFactory + self._systemtools = BuilderSystemToolsFactory() + return self._systemtools + @property + def blockchain(self): + if self._blockchain is None: + from Jumpscale.builders.blockchain.BuilderBlockchainFactory import BuilderBlockchainFactory + self._blockchain = BuilderBlockchainFactory() + return self._blockchain + @property + def web(self): + if self._web is None: + from Jumpscale.builders.web.BuilderWebFactory import BuilderWebFactory + self._web = BuilderWebFactory() + return self._web + @property + def network(self): + if self._network is None: + from Jumpscale.builders.network.BuilderNetworkFactory import BuilderNetworkFactory + self._network = BuilderNetworkFactory() + return self._network + @property + def buildenv(self): + if self._buildenv is None: + from Jumpscale.builders.buildenv.BuildEnv import BuildEnv + self._buildenv = BuildEnv() + return self._buildenv - self._currencylayer = CurrencyLayerFactory() - return self._currencylayer +j.builders = group_builders() +j.core._groups["builders"] = j.builders - @property - def sonic(self): - if self._sonic is None: - from Jumpscale.clients.sonic.SonicFactory import SonicFactory - self._sonic = SonicFactory() - return self._sonic +class group_sal(JSGroup): + def __init__(self): + + self._docker = None + self._nfs = None + self._bind = None + self._nic = None + self._bcdbfs = None + self._nginx = None + self._ubuntu = None + self._netconfig = None + self._tls = None + self._disklayout = None + self._sshd = None + self._qemu_img = None + self._openvswitch = None + self._kvm = None + self._samba = None + self._rsync = None + self._ufw = None + self._hostsfile = None + self._nettools = None + self._fs = None + self._fswalker = None + self._unix = None + self._ssl = None + self._process = None + self._windows = None + self._btrfs = None + self._dnsmasq = None + self._coredns = None + @property - def zhubdirect(self): - if self._zhubdirect is None: - from Jumpscale.clients.zero_hub_direct.HubDirectFactory import HubDirectFactory - - self._zhubdirect = HubDirectFactory() - return self._zhubdirect - + def docker(self): + if self._docker is None: + from Jumpscale.tools.docker.Docker import Docker + self._docker = Docker() + return self._docker @property - def corex(self): - if self._corex is None: - from Jumpscale.clients.corex.CoreXFactory import CoreXClientFactory - - self._corex = CoreXClientFactory() - return self._corex - + def nfs(self): + if self._nfs is None: + from Jumpscale.sal.nfs.NFS import NFS + self._nfs = NFS() + return self._nfs @property - def syncthing(self): - if self._syncthing is None: - from Jumpscale.clients.syncthing.SyncthingFactory import SyncthingFactory - - self._syncthing = SyncthingFactory() - return self._syncthing - + def bind(self): + if self._bind is None: + from Jumpscale.sal.bind.BindDNS import BindDNS + self._bind = BindDNS() + return self._bind @property - def redis_config(self): - if self._redis_config is None: - from Jumpscale.clients.redisconfig.RedisConfigFactory import RedisConfigFactory - - self._redis_config = RedisConfigFactory() - return self._redis_config - + def nic(self): + if self._nic is None: + from Jumpscale.sal.nic.UnixNetworkManager import UnixNetworkManager + self._nic = UnixNetworkManager() + return self._nic @property - def gitea(self): - if self._gitea is None: - from Jumpscale.clients.gitea.GiteaFactory import GiteaFactory - - self._gitea = GiteaFactory() - return self._gitea - + def bcdbfs(self): + if self._bcdbfs is None: + from Jumpscale.sal.bcdbfs.BCDBFS import BCDBFS + self._bcdbfs = BCDBFS() + return self._bcdbfs @property - def ovh(self): - if self._ovh is None: - from Jumpscale.clients.ovh.OVHFactory import OVHFactory - - self._ovh = OVHFactory() - return self._ovh - + def nginx(self): + if self._nginx is None: + from Jumpscale.sal.nginx.Nginx import NginxFactory + self._nginx = NginxFactory() + return self._nginx @property - def freeflowpages(self): - if self._freeflowpages is None: - from Jumpscale.clients.freeflow.FreeFlowFactory import FreeFlowFactory - - self._freeflowpages = FreeFlowFactory() - return self._freeflowpages - + def ubuntu(self): + if self._ubuntu is None: + from Jumpscale.sal.ubuntu.Ubuntu import Ubuntu + self._ubuntu = Ubuntu() + return self._ubuntu @property - def trello(self): - if self._trello is None: - from Jumpscale.clients.trello.TrelloFactory import Trello - - self._trello = Trello() - return self._trello - + def netconfig(self): + if self._netconfig is None: + from Jumpscale.sal.netconfig.Netconfig import Netconfig + self._netconfig = Netconfig() + return self._netconfig @property - def intercom(self): - if self._intercom is None: - from Jumpscale.clients.intercom.IntercomFactory import Intercom - - self._intercom = Intercom() - return self._intercom - + def tls(self): + if self._tls is None: + from Jumpscale.sal.tls.TLSFactory import TLSFactory + self._tls = TLSFactory() + return self._tls @property - def btc_alpha(self): - if self._btc_alpha is None: - from Jumpscale.clients.btc_alpha.BTCFactory import GitHubFactory - - self._btc_alpha = GitHubFactory() - return self._btc_alpha - + def disklayout(self): + if self._disklayout is None: + from Jumpscale.sal.disklayout.DiskManager import DiskManager + self._disklayout = DiskManager() + return self._disklayout @property - def logger(self): - if self._logger is None: - from Jumpscale.clients.logger.LoggerFactory import LoggerFactory - - self._logger = LoggerFactory() - return self._logger - + def sshd(self): + if self._sshd is None: + from Jumpscale.sal.sshd.SSHD import SSHD + self._sshd = SSHD() + return self._sshd @property - def racktivity(self): - if self._racktivity is None: - from Jumpscale.clients.racktivity.RacktivityFactory import RacktivityFactory - - self._racktivity = RacktivityFactory() - return self._racktivity - + def qemu_img(self): + if self._qemu_img is None: + from Jumpscale.sal.qemu_img.Qemu_img import QemuImg + self._qemu_img = QemuImg() + return self._qemu_img @property - def zdb(self): - if self._zdb is None: - from Jumpscale.clients.stor_zdb.ZDBClientFactory import ZDBClientFactory - - self._zdb = ZDBClientFactory() - return self._zdb - + def openvswitch(self): + if self._openvswitch is None: + from Jumpscale.sal.openvswitch.NetConfigFactory import NetConfigFactory + self._openvswitch = NetConfigFactory() + return self._openvswitch @property - def s3(self): - if self._s3 is None: - from Jumpscale.clients.s3.S3Factory import S3Factory - - self._s3 = S3Factory() - return self._s3 - + def kvm(self): + if self._kvm is None: + from Jumpscale.sal.kvm.KVM import KVM + self._kvm = KVM() + return self._kvm @property - def alphavantage(self): - if self._alphavantage is None: - from Jumpscale.clients.alphavantage.AlphaVantage import AlphaVantageClient - - self._alphavantage = AlphaVantageClient() - return self._alphavantage - + def samba(self): + if self._samba is None: + from Jumpscale.sal.samba.Samba import Samba + self._samba = Samba() + return self._samba @property - def git(self): - if self._git is None: - from Jumpscale.clients.git.GitFactory import GitFactory - - self._git = GitFactory() - return self._git - + def rsync(self): + if self._rsync is None: + from Jumpscale.sal.rsync.RsyncFactory import RsyncFactory + self._rsync = RsyncFactory() + return self._rsync @property - def sqlitedb(self): - if self._sqlitedb is None: - from Jumpscale.clients.stor_sqlite.DBSQLiteFactory import DBSQLiteFactory - - self._sqlitedb = DBSQLiteFactory() - return self._sqlitedb - + def ufw(self): + if self._ufw is None: + from Jumpscale.sal.ufw.UFWManager import UFWManager + self._ufw = UFWManager() + return self._ufw @property - def graphql(self): - if self._graphql is None: - from Jumpscale.clients.graphql.GraphQLFactory import GraphQLFactory - - self._graphql = GraphQLFactory() - return self._graphql - + def hostsfile(self): + if self._hostsfile is None: + from Jumpscale.sal.hostfile.HostFile import HostFile + self._hostsfile = HostFile() + return self._hostsfile @property - def tarantool(self): - if self._tarantool is None: - from Jumpscale.clients.tarantool.TarantoolFactory import TarantoolFactory - - self._tarantool = TarantoolFactory() - return self._tarantool - + def nettools(self): + if self._nettools is None: + from Jumpscale.sal.nettools.NetTools import NetTools + self._nettools = NetTools() + return self._nettools @property - def traefik(self): - if self._traefik is None: - from Jumpscale.clients.traefik.TraefikFactory import TraefikFactory - - self._traefik = TraefikFactory() - return self._traefik - + def fs(self): + if self._fs is None: + from Jumpscale.sal.fs.SystemFS import SystemFS + self._fs = SystemFS() + return self._fs @property - def telegram_bot(self): - if self._telegram_bot is None: - from Jumpscale.clients.telegram_bot.TelegramBotFactory import TelegramBotFactory - - self._telegram_bot = TelegramBotFactory() - return self._telegram_bot - + def fswalker(self): + if self._fswalker is None: + from Jumpscale.sal.fs.SystemFSWalker import SystemFSWalker + self._fswalker = SystemFSWalker() + return self._fswalker @property - def influxdb(self): - if self._influxdb is None: - from Jumpscale.clients.influxdb.InfluxdbFactory import InfluxdbFactory - - self._influxdb = InfluxdbFactory() - return self._influxdb - + def unix(self): + if self._unix is None: + from Jumpscale.sal.unix.Unix import UnixSystem + self._unix = UnixSystem() + return self._unix @property - def zboot(self): - if self._zboot is None: - from Jumpscale.clients.zero_boot.ZerobootFactory import ZerobootFactory - - self._zboot = ZerobootFactory() - return self._zboot - + def ssl(self): + if self._ssl is None: + from Jumpscale.sal.ssl.SSLFactory import SSLFactory + self._ssl = SSLFactory() + return self._ssl @property - def peewee(self): - if self._peewee is None: - from Jumpscale.clients.peewee.PeeweeFactory import PeeweeFactory - - self._peewee = PeeweeFactory() - return self._peewee - + def process(self): + if self._process is None: + from Jumpscale.sal.process.SystemProcess import SystemProcess + self._process = SystemProcess() + return self._process @property - def zerotier(self): - if self._zerotier is None: - from Jumpscale.clients.zerotier.ZerotierFactory import ZerotierFactory - - self._zerotier = ZerotierFactory() - return self._zerotier - + def windows(self): + if self._windows is None: + from Jumpscale.sal.windows.Windows import WindowsSystem + self._windows = WindowsSystem() + return self._windows + @property + def btrfs(self): + if self._btrfs is None: + from Jumpscale.sal.btrfs.BtrfsExtension import BtfsExtensionFactory + self._btrfs = BtfsExtensionFactory() + return self._btrfs @property - def gdrive(self): - if self._gdrive is None: - from Jumpscale.clients.gdrive.GDriveFactory import GDriveFactory - - self._gdrive = GDriveFactory() - return self._gdrive - + def dnsmasq(self): + if self._dnsmasq is None: + from Jumpscale.sal.dnsmasq.DnsmasqFactory import DnsmasqFactory + self._dnsmasq = DnsmasqFactory() + return self._dnsmasq @property - def virtualbox(self): - if self._virtualbox is None: - from Jumpscale.clients.virtualbox.VirtualboxFactory import VirtualboxFactory + def coredns(self): + if self._coredns is None: + from Jumpscale.clients.coredns.alternative.CoreDnsFactory import CoreDnsFactory + self._coredns = CoreDnsFactory() + return self._coredns - self._virtualbox = VirtualboxFactory() - return self._virtualbox +j.sal = group_sal() +j.core._groups["sal"] = j.sal - @property - def gedis_backend(self): - if self._gedis_backend is None: - from DigitalMe.clients.gedis_backends.GedisBackendClientFactory import GedisBackendClientFactory - self._gedis_backend = GedisBackendClientFactory() - return self._gedis_backend +class group_tutorials(JSGroup): + def __init__(self): + + self._base = None + @property - def gedis(self): - if self._gedis is None: - from DigitalMe.clients.gedis.GedisClientFactory import GedisClientFactory + def base(self): + if self._base is None: + from Jumpscale.tutorials.base.Tutorial import Tutorial + self._base = Tutorial() + return self._base - self._gedis = GedisClientFactory() - return self._gedis +j.tutorials = group_tutorials() +j.core._groups["tutorials"] = j.tutorials - @property - def multicast(self): - if self._multicast is None: - from DigitalMe.clients.multicast.MulticastFactory import MulticastFactory - self._multicast = MulticastFactory() - return self._multicast +class group_data_units(JSGroup): + def __init__(self): + + self._sizes = None + + @property + def sizes(self): + if self._sizes is None: + from Jumpscale.data.numtools.units.Units import Bytes + self._sizes = Bytes() + return self._sizes -j.clients = group_clients() -j.core._groups["clients"] = j.clients +j.data_units = group_data_units() +j.core._groups["data_units"] = j.data_units -class group_world(JSGroup): +class group_sal_zos(JSGroup): def __init__(self): - - self._system = None + + self._stats_collector = None + self._farm = None + self._traefik = None + self._disks = None + self._gateway = None + self._tfchain = None + self._ftpclient = None + self._storagepools = None + self._ippoolmanager = None self._hypervisor = None + self._sandbox = None + self._minio = None + self._zt_bootstrap = None + self._zrobot = None + self._bootstrapbot = None + self._zstor = None + self._zerodb = None + self._node = None + self._capacity = None + self._influx = None + self._userbot = None + self._vm = None + self._grafana = None + self._etcd = None + self._coredns = None + self._containers = None + self._mongodb = None + self._primitives = None + self._network = None + @property - def system(self): - if self._system is None: - from DigitalMe.tools.kosmos.WorldSystem import WorldSystem - - self._system = WorldSystem() - return self._system - + def stats_collector(self): + if self._stats_collector is None: + from Jumpscale.sal_zos.stats_collector.stats_collector_factory import StatsCollectorFactory + self._stats_collector = StatsCollectorFactory() + return self._stats_collector + @property + def farm(self): + if self._farm is None: + from Jumpscale.sal_zos.farm.FarmFactory import FarmFactory + self._farm = FarmFactory() + return self._farm + @property + def traefik(self): + if self._traefik is None: + from Jumpscale.sal_zos.traefik.TraefikFactory import TraefikFactory + self._traefik = TraefikFactory() + return self._traefik + @property + def disks(self): + if self._disks is None: + from Jumpscale.sal_zos.disks.DisksFactory import DisksFactory + self._disks = DisksFactory() + return self._disks + @property + def gateway(self): + if self._gateway is None: + from Jumpscale.sal_zos.gateway.gatewayFactory import GatewayFactory + self._gateway = GatewayFactory() + return self._gateway + @property + def tfchain(self): + if self._tfchain is None: + from Jumpscale.sal_zos.tfchain.TfChainFactory import TfChainFactory + self._tfchain = TfChainFactory() + return self._tfchain + @property + def ftpclient(self): + if self._ftpclient is None: + from Jumpscale.sal_zos.ftpClient.ftpFactory import FtpFactory + self._ftpclient = FtpFactory() + return self._ftpclient + @property + def storagepools(self): + if self._storagepools is None: + from Jumpscale.sal_zos.storage.StorageFactory import ContainerFactory + self._storagepools = ContainerFactory() + return self._storagepools + @property + def ippoolmanager(self): + if self._ippoolmanager is None: + from Jumpscale.sal_zos.ip_pool_manager.IPPoolManagerFactory import IPPoolManagerFactory + self._ippoolmanager = IPPoolManagerFactory() + return self._ippoolmanager @property def hypervisor(self): if self._hypervisor is None: - from DigitalMe.tools.kosmos.world_example.HyperVisorCoordinator.CoordinatorHypervisor import ( - CoordinatorHypervisor, - ) - - self._hypervisor = CoordinatorHypervisor() + from Jumpscale.sal_zos.hypervisor.HypervisorFactory import HypervisorFactory + self._hypervisor = HypervisorFactory() return self._hypervisor - - -j.world = group_world() -j.core._groups["world"] = j.world - - -class group_kosmos(JSGroup): - def __init__(self): - - self._zos = None - @property - def zos(self): - if self._zos is None: - from DigitalMe.kosmos.zos.ZOSFactory import ZOSCmdFactory + def sandbox(self): + if self._sandbox is None: + from Jumpscale.sal_zos.sandbox.ZOSSandboxFactory import ZOSSandboxFactory + self._sandbox = ZOSSandboxFactory() + return self._sandbox + @property + def minio(self): + if self._minio is None: + from Jumpscale.sal_zos.minio.MinioFactory import MinioFactory + self._minio = MinioFactory() + return self._minio + @property + def zt_bootstrap(self): + if self._zt_bootstrap is None: + from Jumpscale.sal_zos.zerotier_bootstrap.ZerotierBootstrapFactory import ZerotierBootstrapFactory + self._zt_bootstrap = ZerotierBootstrapFactory() + return self._zt_bootstrap + @property + def zrobot(self): + if self._zrobot is None: + from Jumpscale.sal_zos.zrobot.ZRobotFactory import ZeroRobotFactory + self._zrobot = ZeroRobotFactory() + return self._zrobot + @property + def bootstrapbot(self): + if self._bootstrapbot is None: + from Jumpscale.sal_zos.bootstrap_bot.BootstrapBotFactory import BootstrapBotFactory + self._bootstrapbot = BootstrapBotFactory() + return self._bootstrapbot + @property + def zstor(self): + if self._zstor is None: + from Jumpscale.sal_zos.zstor.ZStorFactory import ZeroStorFactory + self._zstor = ZeroStorFactory() + return self._zstor + @property + def zerodb(self): + if self._zerodb is None: + from Jumpscale.sal_zos.zerodb.zerodbFactory import ZerodbFactory + self._zerodb = ZerodbFactory() + return self._zerodb + @property + def node(self): + if self._node is None: + from Jumpscale.sal_zos.node.NodeFactory import PrimitivesFactory + self._node = PrimitivesFactory() + return self._node + @property + def capacity(self): + if self._capacity is None: + from Jumpscale.sal_zos.capacity.CapacityFactory import CapacityFactory + self._capacity = CapacityFactory() + return self._capacity + @property + def influx(self): + if self._influx is None: + from Jumpscale.sal_zos.influxdb.influxdbFactory import InfluxDBFactory + self._influx = InfluxDBFactory() + return self._influx + @property + def userbot(self): + if self._userbot is None: + from Jumpscale.sal_zos.user_bot.UserBotFactory import UserBotFactory + self._userbot = UserBotFactory() + return self._userbot + @property + def vm(self): + if self._vm is None: + from Jumpscale.sal_zos.vm.ZOS_VMFactory import ZOS_VMFactory + self._vm = ZOS_VMFactory() + return self._vm + @property + def grafana(self): + if self._grafana is None: + from Jumpscale.sal_zos.grafana.grafanaFactory import GrafanaFactory + self._grafana = GrafanaFactory() + return self._grafana + @property + def etcd(self): + if self._etcd is None: + from Jumpscale.sal_zos.ETCD.ETCDFactory import ETCDFactory + self._etcd = ETCDFactory() + return self._etcd + @property + def coredns(self): + if self._coredns is None: + from Jumpscale.sal_zos.coredns.CorednsFactory import CorednsFactory + self._coredns = CorednsFactory() + return self._coredns + @property + def containers(self): + if self._containers is None: + from Jumpscale.sal_zos.container.ContainerFactory import ContainerFactory + self._containers = ContainerFactory() + return self._containers + @property + def mongodb(self): + if self._mongodb is None: + from Jumpscale.sal_zos.mongodb.MongodbFactory import MongodbFactory + self._mongodb = MongodbFactory() + return self._mongodb + @property + def primitives(self): + if self._primitives is None: + from Jumpscale.sal_zos.primitives.PrimitivesFactory import PrimitivesFactory + self._primitives = PrimitivesFactory() + return self._primitives + @property + def network(self): + if self._network is None: + from Jumpscale.sal_zos.network.NetworkFactory import NetworkFactory + self._network = NetworkFactory() + return self._network + +j.sal_zos = group_sal_zos() +j.core._groups["sal_zos"] = j.sal_zos - self._zos = ZOSCmdFactory() - return self._zos -j.kosmos = group_kosmos() -j.core._groups["kosmos"] = j.kosmos