%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 188.40.95.74 / Your IP : 216.73.216.205 Web Server : Apache System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64 User : vlasotin ( 1054) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.7/site-packages/leapp/utils/ |
Upload File : |
import subprocess def reboot_system(): # NOTE(ivasilev) Maybe we could use run? We still can't rely on any code to be finished after workflow calls this # method. subprocess.Popen(['/sbin/shutdown', '-r', 'now']) # noqa; pylint: disable=consider-using-with def get_api_models(actor, what): """ Used to retrieve the full list of models including the ones defined by WorkflowAPIs used by the actor. :param what: A string which either is 'consumes' or 'produces' :type what: str :param actor: type/instance or ActorDefinition instance to retrieve the information from :type actor: leapp.actors.Actor or ActorDefinition :return: Tuple of all produced or consumed models as specified by actor and APIs used by the actor. """ def _enforce_tuple(x): if not isinstance(x, tuple): return (x,) return x def _do_get(api): result = _enforce_tuple(getattr(api, what, ())) for a in _enforce_tuple(api.apis or ()): result = result + _do_get(a) return result return tuple(set(_do_get(actor)))