Module ImportFrom alias Assign NameStore Str Assign NameStore Str Import alias identifier ImportFrom alias Import alias Import alias ImportFrom alias If CompareLt AttributeLoad NameLoad attr Str body Assign NameStore Str orelse Assign NameStore Str ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str NameLoad Str Str Call NameLoad Str NameLoad Str Str NameLoad Str Str Str NameLoad Str Dict Str Str Str Str Str Str Str Str NameLoad Str ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword Str keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return Call NameLoad AttributeLoad NameLoad attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body With Call NameLoad BinOpAdd NameLoad Str Call NameLoad keyword NameLoad body Import alias With Call NameLoad Str NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad Str Str Str Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str decorator_list Call NameLoad BinOpAdd NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list Call NameLoad BinOpAdd NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str decorator_list Call NameLoad BinOpAdd NameLoad Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Call NameLoad Str Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list Call NameLoad Str Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore SubscriptLoad NameLoad Index Str Expr Call NameLoad Str Num Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr ListComp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num attr Str NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr Call NameLoad keyword Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr Call NameLoad keyword Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad With Call NameLoad Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad With Call NameLoad Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad With Call NameLoad Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad With Call NameLoad Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad Str Str keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str NameLoad Dict Str Str Str Str Str Str Str Str Str NameLoad Str Str Dict Str Str Str Str Str Str Str Str Str Str Str Str Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad Call NameLoad Str keyword Num keyword NameLoad Call NameLoad Str keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad keyword Str Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad Str Str With Call NameLoad Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad Str Str keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad keyword Str Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad Str Str With Call NameLoad Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad Str Str keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad keyword Str Assign AttributeStore AttributeLoad NameLoad attr attr TupleLoad Str Str With Call NameLoad Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad keyword NameLoad Assign NameStore ListLoad Str Str Str Str Str Str Expr Call NameLoad Str Call AttributeLoad Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num attr Str Expr Call AttributeLoad NameLoad attr CompareIn Call AttributeLoad Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num attr Str NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Call NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareIn Str Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr CompareIn Str Call AttributeLoad Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num attr Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore TupleLoad AttributeLoad NameLoad attr Str Num Assign AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Assign TupleStore NameStore AttributeStore NameLoad attr TupleLoad AttributeLoad NameLoad attr Call NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Expr Yield Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad Call NameLoad NameLoad Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr attr Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body If NameLoad body If CompareIn Str NameLoad body Return Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad SubscriptLoad NameLoad Index Num attr Str If CompareIn Str NameLoad body If CompareEq SubscriptLoad NameLoad Index Str Str body Return Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad orelse If NameLoad body If CompareIsNot Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str NameLoad body Return Call AttributeLoad NameLoad attr Str orelse Return Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad SubscriptLoad NameLoad Index Num attr Str decorator_list decorator_list Call NameLoad Str
N/A __future__ print_function N/A __author__ Nitin Kumar, Rick Sherman N/A __credits__ Jeremy Schulman N/A unittest2 unittest nose.plugins.attrib attr N/A os N/A sys six StringIO N/A N/A N/A sys version 3 N/A N/A builtin_string __builtin__ N/A N/A builtin_string builtins contextlib contextmanager jnpr.junos Device jnpr.junos.exception RpcError SwRollbackError RpcTimeoutError jnpr.junos.utils.sw SW jnpr.junos.facts.swver version_info ncclient.manager Manager make_device_handler ncclient.transport SSHSession lxml etree mock patch MagicMock call mock_open N/A facts N/A domain hostname ifd_style version_info 2RE serialnumber fqdn virtual switch_style version HOME srx_cluster model RE0 vc_capable personality None firefly CLASSIC N/A version_info 12.1X46-D15.3 False aaf5fe5f9b88 firefly True NONE 12.1X46-D15.3 /cf/var/home/rick False FIREFLY-PERIMETER N/A status last_reboot_reason model up_time Testing Router rebooted after a normal shutdown. FIREFLY-PERIMETER RE 6 hours, 29 minutes, 30 seconds False SRX_BRANCH TestSW N/A N/A unittest TestCase N/A setUp N/A N/A self mock_connect N/A N/A N/A N/A mock_connect side_effect N/A self _mock_manager N/A N/A self dev N/A Device host 1.1.1.1 user rick password password123 gather_facts False N/A N/A N/A N/A self dev open N/A N/A N/A self dev _facts facts N/A N/A self sw N/A N/A self get_sw N/A N/A patch ncclient.manager.connect get_sw N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A N/A SW N/A self dev N/A N/A patch jnpr.junos.Device.execute tearDown N/A N/A self mock_session N/A N/A N/A N/A N/A N/A self dev close N/A N/A patch ncclient.operations.session.CloseSession.request test_sw_hashfile N/A N/A self N/A N/A N/A N/A patch N/A builtin_string .open N/A mock_open create True N/A N/A jnpr.junos.utils.sw N/A N/A open foo h N/A N/A N/A N/A h read side_effect N/A abc a N/A N/A N/A N/A N/A N/A jnpr junos utils sw _hashfile h N/A MagicMock N/A N/A N/A self assertEqual N/A N/A h read call_count 3 N/A test_sw_constructor_multi_re N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A N/A self sw N/A SW N/A self dev N/A N/A N/A self assertFalse N/A N/A self sw _multi_RE N/A N/A patch jnpr.junos.Device.execute test_sw_constructor_multi_vc N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A N/A self sw N/A SW N/A self dev N/A N/A N/A self assertFalse N/A N/A self sw _multi_VC N/A N/A patch jnpr.junos.Device.execute test_sw_local_sha256 N/A N/A self mock_built_open N/A N/A N/A package test.tgz N/A N/A N/A self assertEqual N/A N/A SW local_sha256 package e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 N/A N/A patch N/A builtin_string .open test_sw_local_md5 N/A N/A self mock_built_open N/A N/A N/A package test.tgz N/A N/A N/A self assertEqual N/A N/A N/A self sw local_md5 package d41d8cd98f00b204e9800998ecf8427e N/A N/A patch N/A builtin_string .open test_sw_local_sha1 N/A N/A self mock_built_open N/A N/A N/A package test.tgz N/A N/A N/A self assertEqual N/A N/A SW local_sha1 package da39a3ee5e6b4b0d3255bfef95601890afd80709 N/A N/A patch N/A builtin_string .open test_sw_progress N/A N/A self N/A N/A N/A N/A N/A self capture N/A SW progress N/A self dev running output N/A N/A N/A N/A self assertEqual 1.1.1.1: running
 output N/A test_sw_put N/A N/A self mock_scp_put mock_scp N/A N/A N/A package test.tgz N/A N/A N/A N/A self sw put package N/A N/A N/A self assertTrue N/A N/A call test.tgz /var/tmp N/A mock_scp_put mock_calls N/A N/A patch paramiko.SSHClient N/A patch scp.SCPClient.put test_sw_put_progress N/A N/A self mock_enter mock_scp mock_exit N/A N/A N/A package test.tgz N/A N/A mock_scp side_effect N/A self _fake_scp N/A N/A N/A self capture N/A N/A self sw put package progress N/A self _my_scp_progress output N/A N/A N/A N/A self assertEqual test.tgz 100 50
 output N/A N/A patch jnpr.junos.utils.scp.SCP.__exit__ N/A patch jnpr.junos.utils.scp.SCP.__init__ N/A patch jnpr.junos.utils.scp.SCP.__enter__ _fake_scp N/A N/A self N/A args kwargs N/A N/A progress N/A kwargs N/A progress N/A N/A progress test.tgz 100 50 N/A test_sw_pkgadd N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A package test.tgz N/A N/A N/A self assertTrue N/A N/A N/A self sw pkgadd package N/A N/A patch jnpr.junos.Device.execute test_sw_pkgadd_pkg_set N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A pkg_set N/A abc.tgz pqr.tgz N/A N/A N/A self sw _mixed_VC True N/A N/A N/A N/A self sw pkgadd pkg_set N/A N/A N/A self assertEqual N/A N/A i text N/A i N/A N/A N/A N/A N/A mock_execute call_args N/A 0 N/A 0 findall set pkg_set N/A N/A patch jnpr.junos.Device.execute test_sw_validate N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A package package.tgz N/A N/A N/A self assertTrue N/A N/A N/A self sw validate package N/A N/A patch jnpr.junos.Device.execute test_sw_remote_checksum_not_found N/A N/A self mock_execute N/A N/A N/A xml <rpc-error>
        <error-severity>error</error-severity>
        <error-message>
        md5: /var/tmp/123: No such file or directory
        </error-message>
        </rpc-error> N/A N/A mock_execute side_effect N/A RpcError rsp N/A N/A etree fromstring xml N/A package test.tgz N/A N/A N/A self assertEqual N/A N/A N/A self sw remote_checksum package None N/A N/A patch jnpr.junos.Device.execute test_sw_remote_checksum_not_rpc_error N/A N/A self mock_execute N/A N/A N/A xml <rpc-error>
        <error-severity>error</error-severity>
        <error-message>
        something else!
        </error-message>
        </rpc-error> N/A N/A mock_execute side_effect N/A RpcError rsp N/A N/A etree fromstring xml N/A package test.tgz N/A N/A N/A self assertRaises RpcError N/A N/A N/A N/A N/A self sw remote_checksum package N/A N/A patch jnpr.junos.Device.execute test_sw_safe_copy N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A package safecopy.tgz N/A N/A N/A self sw put N/A MagicMock N/A N/A patch jnpr.junos.utils.sw.SW.local_md5 N/A N/A N/A N/A self assertTrue N/A N/A N/A self sw safe_copy package progress N/A self _myprogress cleanfs True checksum 96a35ab371e1ca10408c3caecdbd8a67 N/A N/A patch jnpr.junos.Device.execute test_sw_safe_copy_return_false N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A package safecopy.tgz N/A N/A N/A self sw put N/A MagicMock N/A N/A patch jnpr.junos.utils.sw.SW.local_md5 N/A N/A N/A N/A self assertFalse N/A N/A N/A self sw safe_copy package progress N/A self _myprogress cleanfs True N/A N/A patch jnpr.junos.Device.execute test_sw_safe_copy_checksum_none N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A package safecopy.tgz N/A N/A N/A self sw put N/A MagicMock N/A N/A patch jnpr.junos.utils.sw.SW.local_md5 N/A MagicMock return_value 96a35ab371e1ca10408c3caecdbd8a67 N/A N/A N/A N/A self assertTrue N/A N/A N/A self sw safe_copy package progress N/A self _myprogress cleanfs True N/A N/A patch jnpr.junos.Device.execute test_sw_safe_install N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A package install.tgz N/A N/A N/A self sw put N/A MagicMock N/A N/A patch jnpr.junos.utils.sw.SW.local_md5 N/A MagicMock return_value 96a35ab371e1ca10408c3caecdbd8a67 N/A N/A N/A N/A self assertTrue N/A N/A N/A self sw install package progress N/A self _myprogress cleanfs True N/A N/A patch jnpr.junos.Device.execute test_sw_safe_install_copy_fail N/A N/A self mock_copy N/A N/A N/A N/A mock_copy return_value False N/A N/A N/A self assertFalse N/A N/A N/A self sw install file N/A N/A patch jnpr.junos.utils.sw.SW.safe_copy test_sw_install_validate N/A N/A self mock_validate N/A N/A N/A N/A mock_validate return_value False N/A N/A N/A self assertFalse N/A N/A N/A self sw install file validate True no_copy True N/A N/A patch jnpr.junos.utils.sw.SW.validate test_sw_install_multi_mx N/A N/A self mock_pkgadd N/A N/A N/A N/A mock_pkgadd return_value True N/A N/A N/A self sw _multi_RE True N/A N/A N/A self sw _multi_MX True N/A N/A N/A self assertTrue N/A N/A N/A self sw install file no_copy True N/A N/A patch jnpr.junos.utils.sw.SW.pkgadd test_sw_install_multi_vc N/A N/A self mock_pkgadd N/A N/A N/A N/A mock_pkgadd return_value True N/A N/A N/A self sw _multi_RE True N/A N/A N/A self sw _multi_VC True N/A N/A N/A self sw _RE_list N/A version_RE0 version_RE1 N/A N/A N/A self assertTrue N/A N/A N/A self sw install file no_copy True N/A N/A patch jnpr.junos.utils.sw.SW.pkgadd test_sw_install_mixed_vc N/A N/A self mock_pkgadd N/A N/A N/A N/A mock_pkgadd return_value True N/A N/A N/A self sw _mixed_VC True N/A N/A N/A self sw _RE_list N/A version_RE0 version_RE1 N/A N/A N/A self assertTrue N/A N/A N/A self sw install pkg_set N/A abc.tgz pqr.tgz no_copy True N/A N/A patch jnpr.junos.utils.sw.SW.pkgadd test_sw_install_multi_vc_mode_disabled N/A N/A self mock_pkgadd N/A N/A N/A N/A mock_pkgadd return_value True N/A N/A N/A self dev _facts N/A domain RE1 ifd_style version_RE1 version_RE0 2RE serialnumber fqdn RE0 switch_style version master hostname HOME vc_mode model vc_capable personality None N/A status model mastership_state OK RE-EX8208 backup SWITCH 12.3R7.7 12.3 True XXXXXX XXXXXX N/A status model mastership_state OK RE-EX8208 master VLAN 12.3R5-S3.1 RE0 XXXXXX /var/home/sn Disabled EX8208 True SWITCH N/A sw N/A N/A self get_sw N/A N/A N/A sw install package abc.tgz no_copy True N/A N/A N/A self assertFalse N/A sw _multi_VC N/A calls N/A N/A call /var/tmp/abc.tgz dev_timeout 1800 re0 True N/A call /var/tmp/abc.tgz dev_timeout 1800 re1 True N/A N/A N/A mock_pkgadd assert_has_calls calls N/A N/A patch jnpr.junos.utils.sw.SW.pkgadd test_sw_install_mixed_vc_with_copy N/A N/A self mock_pkgadd N/A N/A N/A N/A mock_pkgadd return_value True N/A N/A N/A self sw _mixed_VC True N/A N/A N/A self sw put N/A MagicMock N/A N/A N/A self sw remote_checksum N/A MagicMock return_value d41d8cd98f00b204e9800998ecf8427e N/A N/A N/A self sw _RE_list N/A version_RE0 version_RE1 N/A N/A patch jnpr.junos.utils.sw.SW.local_md5 N/A MagicMock return_value d41d8cd98f00b204e9800998ecf8427e N/A N/A N/A N/A self assertTrue N/A N/A N/A self sw install pkg_set N/A install.tgz install.tgz cleanfs False N/A N/A patch jnpr.junos.utils.sw.SW.pkgadd test_sw_install_mixed_vc_safe_copy_false N/A N/A self mock_pkgadd N/A N/A N/A N/A mock_pkgadd return_value True N/A N/A N/A self sw _mixed_VC True N/A N/A N/A self sw safe_copy N/A MagicMock return_value False N/A N/A N/A self sw remote_checksum N/A MagicMock return_value d41d8cd98f00b204e9800998ecf8427e N/A N/A N/A self sw _RE_list N/A version_RE0 version_RE1 N/A N/A patch jnpr.junos.utils.sw.SW.local_md5 N/A MagicMock return_value d41d8cd98f00b204e9800998ecf8427e N/A N/A N/A N/A self assertFalse N/A N/A N/A self sw install pkg_set N/A install.tgz install.tgz cleanfs False N/A N/A patch jnpr.junos.utils.sw.SW.pkgadd test_sw_install_mixed_vc_ValueError N/A N/A self mock_pkgadd N/A N/A N/A N/A mock_pkgadd return_value True N/A N/A N/A self sw _mixed_VC True N/A N/A N/A self sw remote_checksum N/A MagicMock return_value d41d8cd98f00b204e9800998ecf8427e N/A N/A N/A self sw _RE_list N/A version_RE0 version_RE1 N/A N/A patch jnpr.junos.utils.sw.SW.local_md5 N/A MagicMock return_value d41d8cd98f00b204e9800998ecf8427e N/A N/A N/A N/A self assertRaises ValueError N/A N/A self sw install pkg_set install.tgz cleanfs False N/A N/A patch jnpr.junos.utils.sw.SW.pkgadd test_sw_install_mixed_vc_TypeError N/A N/A self mock_pkgadd N/A N/A N/A N/A N/A self assertRaises TypeError N/A N/A self sw install cleanfs False N/A N/A patch jnpr.junos.utils.sw.SW.pkgadd test_sw_install_kwargs_force_host N/A N/A self mock_execute N/A N/A N/A N/A N/A N/A self sw install file no_copy True force_host True N/A rpc N/A <request-package-add><force-host/><no-validate/><package-name>/var/tmp/file</package-name></request-package-add> <request-package-add><force-host/><package-name>/var/tmp/file</package-name><no-validate/></request-package-add> <request-package-add><package-name>/var/tmp/file</package-name><no-validate/><force-host/></request-package-add> <request-package-add><no-validate/><force-host/><package-name>/var/tmp/file</package-name></request-package-add> <request-package-add><no-validate/><package-name>/var/tmp/file</package-name><force-host/></request-package-add> <request-package-add><package-name>/var/tmp/file</package-name><force-host/><no-validate/></request-package-add> N/A N/A print nitsss N/A N/A N/A N/A etree tostring N/A N/A N/A mock_execute call_args N/A 0 N/A 0 decode utf-8) N/A N/A N/A self assertTrue N/A N/A N/A N/A N/A etree tostring N/A N/A N/A mock_execute call_args N/A 0 N/A 0 decode utf-8) rpc N/A N/A patch jnpr.junos.Device.execute test_sw_rollback N/A N/A self mock_execute N/A N/A N/A rsp <rpc-reply><output>junos-vsrx-12.1X46-D30.2-domestic will become active at next reboot</output></rpc-reply> N/A N/A mock_execute side_effect N/A N/A etree XML rsp N/A msg junos-vsrx-12.1X46-D30.2-domestic will become active at next reboot N/A N/A N/A self assertEqual N/A N/A N/A self sw rollback msg N/A N/A patch jnpr.junos.Device.execute test_sw_rollback_multi N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A msg N/A fpc1 fpc0 Junos version 'D10.2' will become active at next reboot JUNOS version "D10.2" will become active at next reboot N/A N/A N/A self assertEqual N/A eval N/A N/A N/A self sw rollback msg N/A N/A patch jnpr.junos.Device.execute test_sw_rollback_multi_exception N/A N/A self mock_execute N/A N/A N/A fname request-package-rollback-multi-error.xml N/A N/A mock_execute side_effect N/A N/A self _read_file fname N/A N/A N/A self assertRaises SwRollbackError N/A N/A self sw rollback N/A N/A patch jnpr.junos.Device.execute test_sw_rollback_exception N/A N/A self mock_execute N/A N/A N/A rsp <rpc-reply><output>WARNING: Cannot rollback, /packages/junos.old is not valid</output></rpc-reply> N/A N/A mock_execute side_effect N/A N/A etree XML rsp N/A N/A N/A self assertRaises SwRollbackError N/A N/A self sw rollback N/A N/A patch jnpr.junos.Device.execute test_sw_inventory N/A N/A self N/A N/A N/A N/A N/A N/A N/A self sw dev rpc file_list N/A MagicMock side_effect N/A self _mock_manager N/A N/A N/A self assertEqual N/A N/A self sw inventory N/A current rollback None None N/A test_sw_reboot N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A N/A N/A self sw _multi_MX True N/A N/A N/A self assertTrue N/A Shutdown NOW N/A N/A N/A self sw reboot N/A N/A patch jnpr.junos.Device.execute test_sw_reboot_at N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A N/A N/A self assertTrue N/A Shutdown at N/A N/A N/A self sw reboot at 201407091815 N/A N/A patch jnpr.junos.Device.execute test_sw_reboot_multi_re_vc N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A N/A N/A self sw _multi_RE True N/A N/A N/A self sw _multi_VC False N/A N/A N/A self assertTrue N/A Shutdown NOW N/A N/A N/A self sw reboot N/A N/A patch jnpr.junos.Device.execute test_sw_reboot_mixed_vc N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A N/A N/A self sw _mixed_VC True N/A N/A N/A N/A self sw reboot N/A N/A N/A self assertTrue N/A all-members N/A N/A N/A N/A etree tostring N/A N/A N/A mock_execute call_args N/A 0 N/A 0 decode utf-8 N/A N/A patch jnpr.junos.Device.execute test_sw_reboot_exception N/A N/A self mock_execute N/A N/A N/A rsp N/A N/A etree XML <rpc-reply><a>test</a></rpc-reply> N/A N/A mock_execute side_effect N/A RpcError rsp rsp N/A N/A N/A self assertRaises Exception N/A N/A self sw reboot N/A N/A patch jnpr.junos.Device.execute test_sw_reboot_exception_RpcTimeoutError N/A N/A self mock_execute N/A N/A N/A rsp N/A N/A self dev request-reboot 60 N/A N/A mock_execute side_effect N/A RpcTimeoutError rsp N/A N/A N/A self assertRaises Exception N/A N/A self sw reboot N/A N/A patch jnpr.junos.Device.execute test_sw_poweroff N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A N/A N/A self sw _multi_MX True N/A N/A N/A self assertTrue N/A Shutdown NOW N/A N/A N/A self sw poweroff N/A N/A patch jnpr.junos.Device.execute test_sw_poweroff_exception N/A N/A self mock_execute N/A N/A N/A rsp N/A N/A etree XML <rpc-reply><a>test</a></rpc-reply> N/A N/A mock_execute side_effect N/A RpcError rsp rsp N/A N/A N/A self assertRaises Exception N/A N/A self sw poweroff N/A N/A patch jnpr.junos.Device.execute test_sw_poweroff_multi_re_vc N/A N/A self mock_execute N/A N/A N/A N/A mock_execute side_effect N/A self _mock_manager N/A N/A N/A self sw _multi_RE True N/A N/A N/A self sw _multi_VC False N/A N/A N/A self assertTrue N/A Shutdown NOW N/A N/A N/A self sw poweroff N/A N/A patch jnpr.junos.Device.execute _myprogress N/A N/A self dev report N/A N/A N/A N/A _my_scp_progress N/A N/A self _path _total _xfrd N/A N/A N/A N/A print _path _total _xfrd N/A capture N/A N/A self command N/A args kwargs N/A N/A N/A out N/A sys stdout N/A N/A sys stdout N/A StringIO N/A N/A command args kwargs N/A N/A N/A N/A sys stdout seek 0 N/A N/A N/A N/A N/A sys stdout read N/A N/A sys stdout out N/A contextmanager _read_file N/A N/A self fname N/A N/A ncclient.xml_ NCElement N/A fpath N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ rpc-reply fname N/A foo N/A N/A N/A open fpath read N/A rpc_reply N/A N/A N/A NCElement foo N/A N/A N/A N/A N/A self dev _conn _device_handler transform_reply _NCElement__doc N/A 0 N/A rpc_reply N/A _mock_manager N/A N/A self N/A args kwargs N/A N/A kwargs N/A N/A N/A dev_timeout kwargs N/A N/A N/A N/A self _read_file N/A N/A N/A args N/A 0 tag .xml N/A N/A path kwargs N/A N/A N/A N/A kwargs N/A path /packages N/A N/A N/A N/A self _read_file file-list_dir.xml N/A device_params N/A kwargs N/A device_params N/A device_handler N/A make_device_handler device_params N/A session N/A SSHSession device_handler N/A N/A Manager session device_handler N/A N/A args N/A N/A N/A N/A N/A N/A args N/A 0 find at None N/A N/A N/A N/A self _read_file request-reboot-at.xml N/A N/A N/A N/A self _read_file N/A N/A N/A args N/A 0 tag .xml N/A N/A N/A attr unit