Francesco Romani has uploaded a new change for review.
Change subject: vdscli: rename constants and make them private ......................................................................
vdscli: rename constants and make them private
the various d_* constants found in the vdscli module should not be exported and their naming should reflect they are private.
Change-Id: I525505f6bdf77db9595539c3f67b3399447c3242 Signed-off-by: Francesco Romani fromani@redhat.com --- M lib/vdsm/vdscli.py 1 file changed, 15 insertions(+), 15 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/35272/1
diff --git a/lib/vdsm/vdscli.py b/lib/vdsm/vdscli.py index f8690da..d4bd39a 100644 --- a/lib/vdsm/vdscli.py +++ b/lib/vdsm/vdscli.py @@ -27,10 +27,10 @@ from . import sslutils
-d_useSSL = False -d_tsPath = '/etc/pki/vdsm' -d_addr = '0' -d_port = '54321' +_USE_SSL = False +_TRUSTED_STORE_PATH = '/etc/pki/vdsm' +_ADDRESS = '0' +_PORT = '54321'
def wrap_transport(transport): @@ -60,15 +60,15 @@
def __guessDefaults(): - global d_useSSL, d_tsPath, d_addr, d_port + global _USE_SSL, _TRUSTED_STORE_PATH, _ADDRESS, _PORT VDSM_CONF = '/etc/vdsm/vdsm.conf' try: from .config import config config.read(VDSM_CONF) - d_useSSL = config.getboolean('vars', 'ssl') - d_tsPath = config.get('vars', 'trust_store_path') - d_port = config.get('addresses', 'management_port') - d_addr = config.get('addresses', 'management_ip') + _USE_SSL = config.getboolean('vars', 'ssl') + _TRUSTED_STORE_PATH = config.get('vars', 'trust_store_path') + _PORT = config.get('addresses', 'management_port') + _ADDRESS = config.get('addresses', 'management_ip') except: pass
@@ -76,9 +76,9 @@ __guessDefaults()
-def cannonizeHostPort(hostPort=None, port=d_port): +def cannonizeHostPort(hostPort=None, port=_PORT): if hostPort is None or hostPort == '0': - addr = d_addr + addr = _ADDRESS if ':' in addr: # __guessDefaults() might set an IPv6 address, cannonize it addr = '[%s]' % addr @@ -95,9 +95,9 @@ TransportClass=sslutils.VerifyingSafeTransport): hostPort = cannonizeHostPort(hostPort) if useSSL is None: - useSSL = d_useSSL + useSSL = _USE_SSL if tsPath is None: - tsPath = d_tsPath + tsPath = _TRUSTED_STORE_PATH if useSSL: KEYFILE = tsPath + '/keys/vdsmkey.pem' CERTFILE = tsPath + '/certs/vdsmcert.pem' @@ -117,7 +117,7 @@ return server
if __name__ == '__main__': - print('connecting to %s:%s ssl %s ts %s' % (d_addr, d_port, - d_useSSL, d_tsPath)) + print('connecting to %s:%s ssl %s ts %s' % ( + _ADDRESS, _PORT, _USE_SSL, _TRUSTED_STORE_PATH)) server = connect() print(server.getVdsCapabilities())
Francesco Romani has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 2: Verified+1
verified using git grep for each attribute renamed. Found no reference outside the module.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/12657/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/13609/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/13447/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created_staging/226/ : FAILURE
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 2:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/12699/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/13651/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/13489/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created_staging/268/ : FAILURE
Dan Kenigsberg has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 2: Code-Review+1
Francesco Romani has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 3:
rebased
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 3:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/12789/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/13741/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/13578/ : SUCCESS
Yeela Kaplan has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 3: Code-Review+1
mooli tayer has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 3: Code-Review+1
Dan Kenigsberg has submitted this change and it was merged.
Change subject: vdscli: rename constants and make them private ......................................................................
vdscli: rename constants and make them private
the various d_* constants found in the vdscli module should not be exported and their naming should reflect they are private.
Change-Id: I525505f6bdf77db9595539c3f67b3399447c3242 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: http://gerrit.ovirt.org/35272 Reviewed-by: Piotr Kliczewski piotr.kliczewski@gmail.com Reviewed-by: Yeela Kaplan ykaplan@redhat.com Reviewed-by: mooli tayer mtayer@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/vdscli.py 1 file changed, 15 insertions(+), 15 deletions(-)
Approvals: Piotr Kliczewski: Looks good to me, but someone else must approve Yeela Kaplan: Looks good to me, but someone else must approve mooli tayer: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified
Dan Kenigsberg has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 3: Code-Review+2
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscli: rename constants and make them private ......................................................................
Patch Set 4:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-el6-x86_64_merg... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc21-x86_64_merged/272/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-fc20-x86_64_mer... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged_test_debug/489/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-el7-x86_64_merg... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc20-x86_64_merged/287/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/4281/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el6-x86_64_merged/294/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el7-x86_64_merged/296/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-fc21-x86_64_mer... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/6119/ : SUCCESS
vdsm-patches@lists.fedorahosted.org