Allow user to get connection parameters

parent 2094f4e9
...@@ -28,12 +28,13 @@ ...@@ -28,12 +28,13 @@
############################################################################## ##############################################################################
import argparse import argparse
import slapos.slap.slap import ConfigParser
import pprint
from optparse import OptionParser, Option
import os
from slapos.slap import ResourceNotReady from slapos.slap import ResourceNotReady
import slapos.slap.slap
import sys import sys
import os
from optparse import OptionParser, Option
import ConfigParser
class Parser(OptionParser): class Parser(OptionParser):
""" """
...@@ -207,7 +208,8 @@ slapos-request allows you to request slapos instances.""" % sys.argv[0] ...@@ -207,7 +208,8 @@ slapos-request allows you to request slapos instances.""" % sys.argv[0]
print("Instance requested.\nState is : %s.\nYou can " print("Instance requested.\nState is : %s.\nYou can "
"rerun to get up-to-date informations." % ( "rerun to get up-to-date informations." % (
partition.getState())) 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: except ResourceNotReady:
print("Instance requested. Master is provisionning it. Please rerun in a " 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")
......
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