Module Assign NameStore Str Assign NameStore Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad keyword Str keyword Str keyword Str keyword NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr ListLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Str Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad body Pass decorator_list Expr Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad body Pass decorator_list Expr Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad NameStore body Assign AttributeStore NameLoad attr Dict decorator_list Expr Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad NameStore body Assign AttributeStore NameLoad attr Dict decorator_list Expr Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Dict Str Dict Str Str Str Str Str Str Str Str Str Str Str NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Dict Str Str Str Str Str Str Str Str Str Str Str Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Dict Str Str Str Str Str Str Str Str Str Str Str Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad FunctionDef arguments args defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list Call NameLoad Str
N/A N/A __author__ Rick Sherman, Nitin Kumar N/A __credits__ Jeremy Schulman N/A unittest nose.plugins.attrib attr mock MagicMock jnpr.junos Device jnpr.junos.factory.view View jnpr.junos.op.phyport PhyPortStatsTable PhyPortStatsView lxml etree TestFactoryView N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A 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 self ppt N/A PhyPortStatsTable N/A self dev N/A ret_val <physical-interface>             <name>ge-0/0/0</name>             <admin-status>up</admin-status>             <oper-status>up</oper-status>         </physical-interface> N/A xml N/A N/A etree fromstring ret_val N/A N/A self v N/A PhyPortStatsView N/A self ppt xml N/A test_view_init N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A self v key ge-0/0/0 N/A test_view_init_multi_exception N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError View N/A self ppt N/A test 123 N/A test_view_init_lxml_exception N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError View N/A self ppt N/A test N/A test_view_repr N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A str N/A self v PhyPortStatsView:ge-0/0/0 N/A test_view_d N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A self v D N/A self dev N/A test_view_name N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A self v name ge-0/0/0 N/A test_view_name_xpath_none N/A N/A self N/A N/A N/A N/A N/A self v ITEM_NAME_XPATH None N/A N/A N/A self assertEqual N/A N/A self v name 1.1.1.1 N/A test_view_name_xpath_composite N/A N/A self N/A N/A N/A N/A N/A self v ITEM_NAME_XPATH N/A name missing admin-status N/A N/A N/A self assertEqual N/A N/A self v name N/A ge-0/0/0 None up N/A test_view_asview N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A type N/A N/A N/A self v asview PhyPortStatsTable PhyPortStatsTable N/A test_view_refresh_can_refresh_false N/A N/A self N/A N/A N/A N/A N/A N/A self v _table can_refresh False N/A N/A N/A self assertRaises RuntimeError N/A N/A self v refresh N/A test_view_refresh_can_refresh_true N/A N/A self N/A N/A N/A N/A N/A N/A self v _table can_refresh True N/A N/A N/A N/A self v _table _rpc_get N/A MagicMock N/A N/A N/A N/A self v refresh N/A N/A N/A N/A N/A N/A self v _table _rpc_get assert_called_once_with ge-0/0/0 N/A test_view___getattr__wrong_attr N/A N/A self N/A N/A N/A N/A N/A N/A N/A self v abc N/A N/A N/A Exception N/A ex N/A N/A N/A N/A self assertEqual N/A ex __class__ ValueError N/A test_view_updater_context N/A N/A self N/A N/A N/A N/A N/A N/A self v updater fields False up N/A N/A N/A N/A self assertEqual N/A N/A up __class__ __name__ RunstatViewMore N/A test_view_updater_fields_true N/A N/A self N/A N/A fn N/A N/A N/A N/A N/A N/A N/A N/A self v updater fields True N/A N/A N/A N/A N/A fn N/A N/A N/A self assertEqual N/A N/A self v GROUPS N/A rxerrs ts input-error-list traffic-statistics N/A test_view_updater_groups_true N/A N/A self N/A N/A fn N/A N/A N/A N/A N/A N/A N/A N/A self v updater groups True N/A N/A N/A N/A N/A fn N/A N/A N/A self assertEqual N/A N/A self v GROUPS N/A rxerrs ts input-error-list traffic-statistics N/A test_view_updater_all_false N/A N/A self N/A N/A N/A N/A N/A N/A self v updater all False N/A N/A N/A N/A self assertEqual N/A N/A self v GROUPS N/A rxerrs ts input-error-list traffic-statistics N/A test_view_updater_with_groups_all_true N/A N/A self N/A N/A fn N/A N/A N/A N/A N/A N/A N/A N/A self v updater all True more N/A N/A N/A more groups N/A N/A N/A N/A fn N/A N/A N/A self assertEqual N/A N/A self v GROUPS N/A rxerrs ts input-error-list traffic-statistics N/A test_view_updater_with_groups_all_false N/A N/A self N/A N/A fn N/A N/A N/A N/A N/A N/A N/A N/A self v updater all False more N/A N/A N/A more groups N/A N/A N/A N/A fn N/A N/A N/A self assertEqual N/A N/A self v GROUPS N/A rxerrs ts input-error-list traffic-statistics N/A test_view___getattr__table_item N/A N/A self N/A N/A N/A tbl N/A RouteTable N/A item rpc args_key key view table route-table/rt get-route-information destination rt-destination RouteTableView PhyPortStatsTable N/A N/A N/A N/A N/A self v FIELDS update tbl N/A N/A N/A self assertEqual N/A N/A N/A N/A self v RouteTable __class__ __name__ PhyPortStatsTable N/A test_view___getattr___munch N/A N/A self N/A N/A N/A ret_val <physical-interface>             <name>ge-0/0/0</name>             <admin-status>up</admin-status>             <admin-status>down</admin-status>             <oper-status>up</oper-status>         </physical-interface> N/A xml N/A N/A etree fromstring ret_val N/A N/A self v N/A PhyPortStatsView N/A self ppt xml N/A tbl N/A RouteTable N/A item rpc args_key key view xpath route-table/rt get-route-information destination rt-destination RouteTableView .//admin-status N/A N/A N/A N/A N/A self v FIELDS update tbl N/A N/A N/A self assertEqual N/A N/A self v RouteTable N/A up down N/A test_view___getattr___munch_tag N/A N/A self N/A N/A N/A ret_val <physical-interface>             <name>ge-0/0/0</name>             <admin-status><test>test_tag</test></admin-status>             <oper-status>up</oper-status>         </physical-interface> N/A xml N/A N/A etree fromstring ret_val N/A N/A self v N/A PhyPortStatsView N/A self ppt xml N/A tbl N/A RouteTable N/A item rpc args_key key view xpath route-table/rt get-route-information destination rt-destination RouteTableView .//admin-status N/A N/A N/A N/A N/A self v FIELDS update tbl N/A N/A N/A self assertEqual N/A N/A self v RouteTable admin-status N/A test_view___getattr___raise_RuntimeError N/A N/A self N/A N/A N/A ret_val <physical-interface>             <name>ge-0/0/0</name>             <admin-status><test>test_tag</test></admin-status>             <oper-status>up</oper-status>         </physical-interface> N/A xml N/A N/A etree fromstring ret_val N/A N/A self v N/A PhyPortStatsView N/A self ppt xml N/A tbl N/A RouteTable N/A item rpc args_key key view xpath astype route-table/rt get-route-information destination rt-destination RouteTableView .//admin-status abc N/A N/A N/A N/A N/A self v FIELDS update tbl fn N/A N/A N/A N/A N/A N/A N/A self v RouteTable N/A N/A N/A N/A self assertRaises RuntimeError fn N/A N/A N/A attr unit