Change in vdsm[master]: vdscli: make __getLocalVdsName more robust

danken at redhat.com danken at redhat.com
Wed Jun 26 09:50:28 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: vdscli: make __getLocalVdsName more robust
......................................................................


Patch Set 2: (3 inline comments)

....................................................
File lib/vdsm/vdscli.py.in
Line 17: # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
Line 18: #
Line 19: # Refer to the README and COPYING files for full details of the license
Line 20: #
Line 21: 
it should wait for another patch.
Line 22: import xmlrpclib
Line 23: import subprocess
Line 24: import os
Line 25: from vdsm import SecureXMLRPCServer


Line 83:                               '%s/certs/vdsmcert.pem' % tsPath],
Line 84:                              stdout=subprocess.PIPE, stderr=subprocess.PIPE,
Line 85:                              close_fds=True)
Line 86:         out, err = p.communicate()
Line 87:         if p.returncode != 0:
no, please. This function is just a heuristic for guessing the local vdsm name.
Line 88:             return '0'
Line 89: 
Line 90:     for keyval in out[:-1].split('/'):
Line 91:         key, val = keyval.split('=')


Line 88:             return '0'
Line 89: 
Line 90:     for keyval in out[:-1].split('/'):
Line 91:         key, val = keyval.split('=')
Line 92:         if key == 'CN':
'CN' stands for "Common name" in the SSL RFE.
Line 93:             return val
Line 94: 
Line 95:     return '0'
Line 96: 


-- 
To view, visit http://gerrit.ovirt.org/16059
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I56bf79904cdf5d0dfcba773f096df1d3ec1670fe
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Petr Ĺ ebek <psebek at redhat.com>


More information about the vdsm-patches mailing list