Commit f51f1b48 authored by Marco Mariani's avatar Marco Mariani

console: ipython support

parent 845e7fb6
......@@ -46,6 +46,7 @@ setup(name=name,
] + additional_install_requires,
extra_requires={'docs': (
# -*- coding: utf-8 -*-
import textwrap
from slapos.cli.config import ClientConfigCommand
from slapos.client import init, do_console, ClientConfig
......@@ -38,4 +40,27 @@ class ConsoleCommand(ClientConfigCommand):
configp = self.fetch_config(args)
conf = ClientConfig(args, configp)
local = init(conf)
import IPython
except ImportError:
def do_ipython_console(local):
from IPython import embed
slapos console allows you interact with slap API. You can play with the global
"slap" object and with the global request() and supply() methods.
examples :
>>> # Request instance
>>> request(kvm, "myuniquekvm")
>>> # Request software installation on owned computer
>>> supply(kvm, "mycomputer")
>>> # Fetch instance informations on already launched instance
>>> request(kvm, "myuniquekvm").getConnectionParameter("url")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment