|
@@ -109,50 +109,50 @@ def validate_group(group):
|
|
|
def test_get_group():
|
|
def test_get_group():
|
|
|
try:
|
|
try:
|
|
|
grpname = get_default_group()
|
|
grpname = get_default_group()
|
|
|
- print 'get_group: %s' % grpname
|
|
|
|
|
|
|
+ print('get_group: %s' % grpname)
|
|
|
except:
|
|
except:
|
|
|
raise
|
|
raise
|
|
|
- print "Can not find user group"
|
|
|
|
|
|
|
+ print("Can not find user group")
|
|
|
pass
|
|
pass
|
|
|
try:
|
|
try:
|
|
|
grpname = get_default_group(group='tbordaz')
|
|
grpname = get_default_group(group='tbordaz')
|
|
|
- print 'get_group: %s' % grpname
|
|
|
|
|
|
|
+ print('get_group: %s' % grpname)
|
|
|
except:
|
|
except:
|
|
|
raise
|
|
raise
|
|
|
- print "Can not find user group"
|
|
|
|
|
|
|
+ print("Can not find user group")
|
|
|
pass
|
|
pass
|
|
|
try:
|
|
try:
|
|
|
grpname = get_default_group(group='coucou')
|
|
grpname = get_default_group(group='coucou')
|
|
|
- print 'get_group: %s' % grpname
|
|
|
|
|
|
|
+ print('get_group: %s' % grpname)
|
|
|
except:
|
|
except:
|
|
|
- print "Can not find user group coucou"
|
|
|
|
|
|
|
+ print("Can not find user group coucou")
|
|
|
pass
|
|
pass
|
|
|
try:
|
|
try:
|
|
|
grpname = get_default_group('thierry')
|
|
grpname = get_default_group('thierry')
|
|
|
- print 'get_group: %s' % grpname
|
|
|
|
|
|
|
+ print('get_group: %s' % grpname)
|
|
|
except:
|
|
except:
|
|
|
raise
|
|
raise
|
|
|
- print "Can not find user group thierry"
|
|
|
|
|
|
|
+ print("Can not find user group thierry")
|
|
|
pass
|
|
pass
|
|
|
try:
|
|
try:
|
|
|
grpname = get_default_group(1000)
|
|
grpname = get_default_group(1000)
|
|
|
- print 'get_group: %s' % grpname
|
|
|
|
|
|
|
+ print('get_group: %s' % grpname)
|
|
|
except:
|
|
except:
|
|
|
raise
|
|
raise
|
|
|
- print "Can not find user group 1000"
|
|
|
|
|
|
|
+ print("Can not find user group 1000")
|
|
|
pass
|
|
pass
|
|
|
try:
|
|
try:
|
|
|
grpname = get_default_group(20532)
|
|
grpname = get_default_group(20532)
|
|
|
- print 'get_group: %s' % grpname
|
|
|
|
|
|
|
+ print('get_group: %s' % grpname)
|
|
|
except:
|
|
except:
|
|
|
raise
|
|
raise
|
|
|
- print "Can not find user group 20532"
|
|
|
|
|
|
|
+ print("Can not find user group 20532")
|
|
|
pass
|
|
pass
|
|
|
try:
|
|
try:
|
|
|
grpname = get_default_group(123)
|
|
grpname = get_default_group(123)
|
|
|
- print 'get_group: %s' % grpname
|
|
|
|
|
|
|
+ print('get_group: %s' % grpname)
|
|
|
except:
|
|
except:
|
|
|
- print "Can not find user group 123"
|
|
|
|
|
|
|
+ print("Can not find user group 123")
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
def get_default_port():
|
|
def get_default_port():
|
|
@@ -332,9 +332,9 @@ class DSadmCmd(object):
|
|
|
|
|
|
|
|
rc = pipe.wait()
|
|
rc = pipe.wait()
|
|
|
if rc == 0:
|
|
if rc == 0:
|
|
|
- print "Directory %s %s" % (serverid, action_str)
|
|
|
|
|
|
|
+ print("Directory %s %s" % (serverid, action_str))
|
|
|
else:
|
|
else:
|
|
|
- print "Failure: directory %s not %s (%s)" % (serverid, action_str, rc)
|
|
|
|
|
|
|
+ print("Failure: directory %s not %s (%s)" % (serverid, action_str, rc))
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
def start_action(self, args):
|
|
def start_action(self, args):
|
|
@@ -383,9 +383,9 @@ class DSadmCmd(object):
|
|
|
|
|
|
|
|
rc = pipe.wait()
|
|
rc = pipe.wait()
|
|
|
if rc == 0:
|
|
if rc == 0:
|
|
|
- print "Directory server \'%s\' successfully deleted" % serverid
|
|
|
|
|
|
|
+ print("Directory server \'%s\' successfully deleted" % serverid)
|
|
|
else:
|
|
else:
|
|
|
- print "Fail to delete directory \'%s\': %d" % (serverid, rc)
|
|
|
|
|
|
|
+ print("Fail to delete directory \'%s\': %d" % (serverid, rc))
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
#
|
|
#
|
|
@@ -498,9 +498,9 @@ class DSadmCmd(object):
|
|
|
os.unlink(tempf.name)
|
|
os.unlink(tempf.name)
|
|
|
rc = pipe.wait()
|
|
rc = pipe.wait()
|
|
|
if rc == 0:
|
|
if rc == 0:
|
|
|
- print "Directory server \'%s\' successfully created" % serverid
|
|
|
|
|
|
|
+ print("Directory server \'%s\' successfully created" % serverid)
|
|
|
else:
|
|
else:
|
|
|
- print "Fail to create directory \'%s\': %d" % (serverid, rc)
|
|
|
|
|
|
|
+ print("Fail to create directory \'%s\': %d" % (serverid, rc))
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
#
|
|
#
|