X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fmachine.py;h=4bc8ff6de0f5ce6045cc24f93e72eb22f510a7a7;hb=596ccbe375a3a45e1625b798bb42da3df284ed09;hp=8c9a40bb4ceafe4a07f0cb2e84603622dca4f2da;hpb=31063e719029bcb9c6b65c210156cf920375c4da;p=osm%2FN2VC.git diff --git a/juju/machine.py b/juju/machine.py index 8c9a40b..4bc8ff6 100644 --- a/juju/machine.py +++ b/juju/machine.py @@ -1,24 +1,45 @@ class Machine(object): - def run(self): + def run(self, command, timeout=None): """Run command on this machine. + :param str command: The command to run + :param int timeout: Time to wait before command is considered failed + """ pass - def scp(self): + def scp( + self, source_path, user=None, destination_path=None, proxy=False, + scp_opts=None): """Transfer files to this machine. + :param str source_path: Path of file(s) to transfer + :param str user: Remote username + :param str destination_path: Destination of transferred files on + remote machine + :param bool proxy: Proxy through the Juju API server + :param str scp_opts: Additional options to the `scp` command + """ pass - def ssh(self): + def ssh( + self, command, user=None, proxy=False, ssh_opts=None): """Execute a command over SSH on this machine. + :param str command: Command to execute + :param str user: Remote username + :param bool proxy: Proxy through the Juju API server + :param str ssh_opts: Additional options to the `ssh` command + """ pass - def status_history(self): + def status_history(self, num=20, utc=False): """Get status history for this machine. + :param int num: Size of history backlog + :param bool utc: Display time as UTC in RFC3339 format + """ pass