Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Import alias Import alias Expr Call AttributeLoad NameLoad attr Str Str ImportFrom alias identifier alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults ListLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert CompareIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMult Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str If Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad NameLoad Index Num body Assign SubscriptStore NameLoad Index Num Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Raise Call NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Raise Call NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad Num NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot CompareIn Str NameLoad body If BoolOpAnd UnaryOpNot NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore BinOpMod Str NameLoad orelse Assign NameStore BinOpMod Str NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore ListLoad Str orelse If NameLoad body Raise Call NameLoad BinOpMod Str NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad Num NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword AttributeLoad NameLoad attr keyword ListLoad Str Return TupleLoad NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name TupleStore NameStore NameStore body Assert CompareEq NameLoad AttributeLoad NameLoad attr decorator_list
N/A N/A Samba Python tests. N/A os N/A ldb N/A samba N/A samba.auth samba param samba.samdb SamDB N/A subprocess N/A tempfile N/A N/A N/A samba ensure_external_module testtools testtools testtools.testcase TestCase TesttoolsTestCase TestSkipped TestCase N/A TesttoolsTestCase N/A N/A A Samba test case. setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestCase self setUp N/A test_debug_level N/A N/A os getenv TEST_DEBUG_LEVEL N/A N/A test_debug_level None N/A N/A test_debug_level N/A int test_debug_level N/A N/A self _old_debug_level N/A N/A samba get_debug_level N/A N/A N/A samba set_debug_level test_debug_level N/A N/A N/A self addCleanup N/A samba set_debug_level test_debug_level N/A get_loadparm N/A N/A self N/A N/A N/A N/A env_loadparm N/A get_credentials N/A N/A self N/A N/A N/A cmdline_credentials N/A N/A LdbTestCase N/A TesttoolsTestCase N/A N/A Trivial test case for running tests against a LDB. setUp N/A N/A self N/A N/A N/A N/A N/A N/A super LdbTestCase self setUp N/A N/A self filename N/A N/A os tempnam N/A N/A self ldb N/A N/A samba Ldb N/A self filename N/A set_modules N/A N/A self modules N/A N/A N/A N/A Change the modules for this Ldb. N/A m N/A N/A ldb Message N/A N/A m dn N/A N/A ldb Dn N/A self ldb @MODULES N/A N/A m N/A @LIST N/A N/A , join modules N/A N/A N/A N/A self ldb add m N/A N/A self ldb N/A N/A samba Ldb N/A self filename N/A N/A TestCaseInTempDir N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestCaseInTempDir self setUp N/A N/A self tempdir N/A N/A tempfile mkdtemp N/A N/A N/A self addCleanup N/A self _remove_tempdir N/A _remove_tempdir N/A N/A self N/A N/A N/A N/A N/A self assertEquals N/A N/A N/A os listdir N/A self tempdir N/A N/A N/A os rmdir N/A self tempdir N/A N/A self tempdir None N/A N/A env_loadparm N/A N/A N/A N/A N/A lp N/A N/A param LoadParm N/A N/A N/A N/A N/A lp load N/A N/A os environ N/A SMB_CONF_PATH N/A N/A N/A KeyError N/A N/A N/A Exception SMB_CONF_PATH not set N/A lp N/A env_get_var_value N/A N/A var_name N/A N/A N/A Returns value for variable in os.environ

    Function throws AssertionError if variable is defined.
    Unit-test based python tests require certain input params
    to be set in environment, otherwise they can't be run
     N/A N/A var_name N/A N/A N/A os environ keys N/A Please supply %s in environment var_name N/A N/A N/A os environ N/A var_name N/A N/A cmdline_credentials None RpcInterfaceTestCase N/A TestCase N/A N/A DCE/RPC Test case. N/A ValidNetbiosNameTests N/A TestCase N/A test_valid N/A N/A self N/A N/A N/A N/A N/A self assertTrue N/A N/A samba valid_netbios_name FOO N/A test_too_long N/A N/A self N/A N/A N/A N/A N/A self assertFalse N/A N/A samba valid_netbios_name N/A FOO 10 N/A test_invalid_characters N/A N/A self N/A N/A N/A N/A N/A self assertFalse N/A N/A samba valid_netbios_name *BLA N/A N/A BlackboxProcessError N/A Exception N/A N/A This is raised when check_output() process returns a non-zero exit status

    Exception instance should contain the exact exit code (S.returncode),
    command line (S.cmd), process output (S.stdout) and process error stream
    (S.stderr)
     __init__ N/A N/A self returncode cmd stdout stderr N/A N/A N/A N/A self returncode returncode N/A N/A self cmd cmd N/A N/A self stdout stdout N/A N/A self stderr stderr N/A __str__ N/A N/A self N/A N/A N/A N/A Command '%s'; exit status %d; stdout: '%s'; stderr: '%s' N/A N/A self cmd N/A self returncode N/A self stdout N/A self stderr N/A N/A BlackboxTestCase N/A TestCase N/A N/A Base test case for blackbox tests. _make_cmdline N/A N/A self line N/A N/A N/A bindir N/A N/A N/A os path abspath N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ ../../../../bin N/A parts N/A N/A line split N/A N/A N/A N/A os path exists N/A N/A N/A os path join bindir N/A parts N/A 0 N/A N/A N/A parts N/A 0 N/A N/A N/A os path join bindir N/A parts N/A 0 N/A line N/A N/A join parts N/A line N/A check_run N/A N/A self line N/A N/A N/A line N/A N/A self _make_cmdline line N/A p N/A N/A subprocess Popen line stdout N/A subprocess PIPE stderr N/A subprocess PIPE shell True N/A retcode N/A N/A p wait N/A retcode N/A N/A N/A BlackboxProcessError retcode line N/A N/A N/A p stdout read N/A N/A N/A p stderr read N/A check_output N/A N/A self line N/A N/A N/A line N/A N/A self _make_cmdline line N/A p N/A N/A subprocess Popen line stdout N/A subprocess PIPE stderr N/A subprocess PIPE shell True close_fds True N/A retcode N/A N/A p wait N/A retcode N/A N/A N/A BlackboxProcessError retcode line N/A N/A N/A p stdout read N/A N/A N/A p stderr read N/A N/A N/A N/A p stdout read N/A N/A connect_samdb N/A N/A samdb_url lp session_info credentials flags ldb_options ldap_only N/A None None None 0 None False N/A N/A Create SamDB instance and connects to samdb_url database.

    :param samdb_url: Url for database to connect to.
    :param lp: Optional loadparm object
    :param session_info: Optional session information
    :param credentials: Optional credentials, defaults to anonymous.
    :param flags: Optional LDB flags
    :param ldap_only: If set, only remote LDAP connection will be created.

    Added value for tests is that we have a shorthand function
    to make proper URL for ldb.connect() while using default
    parameters for connection based on test environment
     N/A samdb_url N/A N/A samdb_url lower N/A N/A N/A :// samdb_url N/A N/A N/A N/A ldap_only N/A N/A N/A os path isfile samdb_url N/A N/A samdb_url N/A tdb://%s samdb_url N/A N/A samdb_url N/A ldap://%s samdb_url N/A N/A N/A samdb_url startswith ldap:// N/A N/A ldb_options N/A modules:paged_searches N/A N/A ldap_only N/A N/A N/A AssertionError N/A Trying to connect to %s while remote connection is required samdb_url N/A N/A lp None N/A N/A lp N/A env_loadparm N/A N/A session_info None N/A N/A session_info N/A N/A N/A samba auth system_session lp N/A N/A credentials None N/A N/A credentials cmdline_credentials N/A N/A SamDB url samdb_url lp lp session_info session_info credentials credentials flags flags options ldb_options N/A connect_samdb_ex N/A N/A samdb_url lp session_info credentials flags ldb_options ldap_only N/A None None None 0 None False N/A N/A Connects to samdb_url database

    :param samdb_url: Url for database to connect to.
    :param lp: Optional loadparm object
    :param session_info: Optional session information
    :param credentials: Optional credentials, defaults to anonymous.
    :param flags: Optional LDB flags
    :param ldap_only: If set, only remote LDAP connection will be created.
    :return: (sam_db_connection, rootDse_record) tuple
     N/A sam_db N/A connect_samdb samdb_url lp session_info credentials flags ldb_options ldap_only N/A res N/A N/A sam_db search base expression scope N/A ldb SCOPE_BASE attrs N/A * N/A N/A sam_db N/A res N/A 0 N/A delete_force N/A N/A samdb dn N/A N/A N/A N/A N/A N/A N/A samdb delete dn N/A N/A N/A N/A ldb LdbError N/A N/A num _ N/A N/A N/A num N/A ldb ERR_NO_SUCH_OBJECT N/A