From: Thierry Parmentelat Date: Mon, 13 Dec 2010 15:34:50 +0000 (+0100) Subject: the sface config now only has (*) a registry API URL and (*) a slice API URL X-Git-Tag: sface-0.1-4~2 X-Git-Url: http://git.onelab.eu/?p=sface.git;a=commitdiff_plain;h=0e91674d48246994c7d6bb121cb1ebd55980dee7;hp=80846fa1ed82047adef59ad390528008fa2cd55e the sface config now only has (*) a registry API URL and (*) a slice API URL messages in the config window reminf the usual port #s for SM and AM --- diff --git a/sface/config.py b/sface/config.py index d74d239..781d0a8 100644 --- a/sface/config.py +++ b/sface/config.py @@ -13,16 +13,16 @@ class Config: d_registry= "http://www.planet-lab.org:12345" d_slicemgr= "http://www.planet-lab.org:12347" - d_aggmgr= "http://www.planet-lab.org:12346" +# d_aggmgr= "http://www.planet-lab.org:12346" supported = [ # local code name, config variable name, default ('slice', 'SFI_SLICE' , None, '-s','--slice', "slice HRN"), ('user', 'SFI_USER', None, '-u','--user', "user HRN"), ('authority', 'SFI_AUTH', None, '-t','--auth', "users's authority HRN"), - ('registry', 'SFI_REGISTRY', d_registry, '-r','--registry', "registry's URL"), - ('slicemgr', 'SFI_SM' , d_slicemgr, '-m','--slicemgr', "slice manager's URL"), - ('aggmgr', 'SFI_AM', d_aggmgr, '-a','--aggregate', "aggregate manager's URL"), + ('registry', 'SFI_REGISTRY', d_registry, '-r','--registry', "registry API URL"), + ('slicemgr', 'SFI_SM' , d_slicemgr, '-m','--slicemgr', "slice API URL"), +# ('aggmgr', 'SFI_AM', d_aggmgr, '-a','--aggregate', "aggregate manager's URL"), ('verbose', 'SFACE_VERBOSE',True, '-v','--verbose', "UI verbosity"), ('debug', 'SFACE_DEBUG', False, '-d','--debug', "UI debug flag"), ] diff --git a/sface/screens/configscreen.py b/sface/screens/configscreen.py index 80105a4..97e697c 100644 --- a/sface/screens/configscreen.py +++ b/sface/screens/configscreen.py @@ -5,6 +5,11 @@ from PyQt4.QtGui import * from sface.config import config from sface.screens.sfascreen import SfaScreen +static_labels = { + 'registry': "usual port for registry: 12345", + 'slicemgr': ["usual port for slice manager: 12347","usual port for aggregate: 12346"], +} + class ConfigWidget(QWidget): def __init__(self, parent): QWidget.__init__(self, parent) @@ -14,6 +19,12 @@ class ConfigWidget(QWidget): for (field,msg) in config.field_labels(): # edit : text or checkbox default=config.field_default(field) + if static_labels.has_key(field): + labels=static_labels[field] + if not isinstance(labels,list): labels = [ labels, ] + for label in labels: + glayout.addWidget(QLabel(label),row,1) + row+=1 if isinstance(default,bool): edit=QCheckBox(msg) if config.is_true(config.get(field)): diff --git a/sface/sfiprocess.py b/sface/sfiprocess.py index 8bb6627..eee34bb 100644 --- a/sface/sfiprocess.py +++ b/sface/sfiprocess.py @@ -100,8 +100,8 @@ class SfiProcess(QObject): def getRSpecFromSM(self): return self.__getRSpec(config.getSlicemgr()) - def getRSpecFromAM(self): - return self.__getRSpec(config.getAggmgr()) +# def getRSpecFromAM(self): +# return self.__getRSpec(config.getAggmgr()) def getRecord(self, hrn): args = ["-u", config.getUser(), "-a", config.getAuthority(),