Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""Tests that commandlines are correctly parsed to Command keyword args """
"""Run a command on the server""" api.Backend.xmlclient.connect(fallback=False) except errors.NetworkError: raise nose.SkipTest('%r: Server not available: %r' % (self.__module__, api.env.xmlrpc_uri))
def fake_stdin(self, string_in): """Context manager that temporarily replaces stdin to read a string"""
version=API_VERSION)
uid=u'admin', rights=False, raw=False, all=False, version=API_VERSION)
uid=u'admin', rights=False, raw=False, all=False, version=API_VERSION)
'group_add', cn=u'tgroup1', description=u'Test group', nonposix=False, external=False, raw=False, all=False, version=API_VERSION)
# Test CSV splitting is done correctly # The following is as it would appear on the command line: r'sudocmdgroup-add-member tcmdgroup1 --sudocmds=abc,\"de,f\",\\,g', 'sudocmdgroup_add_member', cn=u'tcmdgroup1', sudocmd=[u'abc', u'de,f', u'\\', u'g'], raw=False, all=False, version=API_VERSION)
'group_add', cn=u'tgroup1', description=u'Test group', nonposix=True, external=False, raw=False, all=False, version=API_VERSION)
'group_add', cn=u'tgroup1', description=u'Test group', gidnumber=u'1234', nonposix=False, external=False, raw=False, all=False, version=API_VERSION)
cn=u'tgroup1', description=u'Test group', nonposix=False, external=False, raw=False, all=False, version=API_VERSION)
'dnsrecord_add', dnszoneidnsname=u'test-example.com', idnsname=u'ns', arecord=[u'1.2.3.4'], structured=False, force=False, raw=False, all=False, version=API_VERSION)
idnssoamname=u'ns.test-example.com', force=True) except errors.NotFound: raise nose.SkipTest('DNS is not configured') dnszoneidnsname=u'test-example.com', idnsname=u'ns', arecord=u'1.2.3.4') 'dnsrecord_del', dnszoneidnsname=u'test-example.com', idnsname=u'ns', del_all=True, structured=False, raw=False, all=False, version=API_VERSION) 'dnsrecord_del', dnszoneidnsname=u'test-example.com', idnsname=u'ns', del_all=True, structured=False, raw=False, all=False, version=API_VERSION) finally:
idnssoamname=u'ns.test-example.com', force=True) except errors.NotFound: raise nose.SkipTest('DNS is not configured') u'2 1 FD2693C1EFFC11A8D2BE57229212A04B45663791') dnszoneidnsname=u'test-example.com', idnsname=u'ns', sshfprecord=record) 'dnsrecord_del', dnszoneidnsname=u'test-example.com', idnsname=u'ns', del_all=False, sshfprecord=records, structured=False, raw=False, all=False, version=API_VERSION) finally:
'dnsrecord_add', dnszoneidnsname=u'test-example.com', idnsname=u'sshfp', sshfp_part_fp_type=sshfp_parts[0], sshfp_part_algorithm=sshfp_parts[1], sshfp_part_fingerprint=sshfp_parts[2], structured=False, raw=False, all=False, force=False, version=API_VERSION)
# NOTE: when a DNS record part is passed via command line, it is not # converted to its base type when transfered via wire '--sshfp-algorithm=%d' % sshfp_parts[0], 'dnsrecord_add', dnszoneidnsname=u'test-example.com', idnsname=u'sshfp', sshfp_part_fp_type=sshfp_parts[0], sshfp_part_algorithm=unicode(sshfp_parts[1]), # passed via cmdline sshfp_part_fingerprint=sshfp_parts[2], structured=False, raw=False, all=False, force=False, version=API_VERSION)
'--sshfp-algorithm=%d --sshfp-fp-type=%d' % (sshfp_parts[0], sshfp_parts[1]), 'dnsrecord_add', dnszoneidnsname=u'test-example.com', idnsname=u'sshfp', sshfp_part_fp_type=unicode(sshfp_parts[0]), # passed via cmdline sshfp_part_algorithm=unicode(sshfp_parts[1]), # passed via cmdline sshfp_part_fingerprint=sshfp_parts[2], structured=False, raw=False, all=False, force=False, version=API_VERSION) |