From e0f8b833df94a4a979daac8aa6916cbe69754ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= <cedric.dsm@tiolive.com> Date: Thu, 4 Oct 2012 10:30:43 +0200 Subject: [PATCH] Allow user to get connection parameters --- slapos/client.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/slapos/client.py b/slapos/client.py index 7da314b0e..da039043e 100644 --- a/slapos/client.py +++ b/slapos/client.py @@ -28,12 +28,13 @@ ############################################################################## import argparse -import slapos.slap.slap +import ConfigParser +import pprint +from optparse import OptionParser, Option +import os from slapos.slap import ResourceNotReady +import slapos.slap.slap import sys -import os -from optparse import OptionParser, Option -import ConfigParser class Parser(OptionParser): """ @@ -207,10 +208,11 @@ slapos-request allows you to request slapos instances.""" % sys.argv[0] print("Instance requested.\nState is : %s.\nYou can " "rerun to get up-to-date informations." % ( partition.getState())) - # XXX-Cedric : provide a way for user to fetch parameter, url, object, etc + print("Connection parameters of instance are:\n%s" % pprint.pprint( + partition.getConnectionParameterDict())) except ResourceNotReady: print("Instance requested. Master is provisionning it. Please rerun in a " - "couple of minutes to get connection informations") + "couple of minutes to get connection informations") exit(2) def run(): -- 2.30.9