Module Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Str FunctionDef arguments args defaults body TryFinally body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Yield NameLoad finalbody Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list AttributeLoad NameLoad attr ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad ListLoad Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword Num Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword Num FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str Str Str Str Str Assign NameStore ListLoad Str Str Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults CompareNotEq Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args NameParam defaults Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults CompareNotEq Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args NameParam defaults Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults ListLoad Str Str Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults CompareNotEq Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args NameParam defaults Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults ListLoad Str Str Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults CompareNotEq Call AttributeLoad NameLoad attr Str Num FunctionDef arguments args NameParam defaults body Raise Call AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore ListLoad Str Str Str Str Str Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults NameLoad Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Yield NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd Str SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Num BinOpSub Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Num BinOpSub Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Num BinOpSub Call AttributeLoad NameLoad attr BinOpMult Num Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad NameStore body With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Num BinOpSub Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Num BinOpSub Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr Dict Str TupleLoad Num Num ListLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr Dict Str TupleLoad Num Num ListLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore Str With Call NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Str TupleLoad Num Num ListLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr Dict Str TupleLoad Num Num ListLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Str Assign NameStore Str With Call AttributeLoad NameLoad attr NameStore body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Dict Str Str With Call NameLoad BinOpMod Str NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr Dict Str TupleLoad Num Num ListLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore ListLoad Str Str Str Str NameLoad NameLoad NameLoad NameLoad BinOpMod Str NameLoad BinOpMod Str NameLoad Str FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad decorator_list Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Return Call NameLoad NameLoad If CompareIn NameLoad ListLoad Str Str Str Str Str BinOpMod Str NameLoad body Return NameLoad For NameStore NameLoad body If CompareEq NameLoad Call NameLoad NameLoad body Return NameLoad If CompareEq NameLoad BinOpAdd Call NameLoad NameLoad Str body Return NameLoad If CompareIn NameLoad ListComp BinOpMod Str NameLoad comprehension NameStore ListLoad NameLoad NameLoad NameLoad NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults Call NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Return Call NameLoad NameLoad If CompareEq NameLoad Str body Return ListLoad Str Str Str Str If CompareEq NameLoad Str body Return NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults Call NameLoad NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Return Call NameLoad NameLoad For NameStore NameLoad body If CompareEq NameLoad Call NameLoad NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults Call NameLoad NameLoad Assign NameStore ListLoad Dict Str Str Str Str Str Str Str AttributeLoad NameLoad attr Str Str Str Str Dict Str Str Str Str Str Str Str Str Str Str Str AttributeLoad NameLoad attr Str Str Str Str Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If CompareIn NameLoad ListLoad Str Str body Return Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args NameParam defaults Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args NameParam NameParam defaults NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Return Call NameLoad NameLoad Return Num decorator_list Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults Call NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Return Call NameLoad NameLoad Return decorator_list Expr Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad ListLoad Str Str attr Dict Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore ListLoad Call NameLoad NameLoad Call NameLoad BinOpMod Str NameLoad Call NameLoad NameLoad Call NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore ListLoad Call NameLoad Str Call NameLoad Str Call NameLoad NameLoad Call NameLoad BinOpMod Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore ListLoad Dict Str Str Str Str Str Str Str AttributeLoad NameLoad attr Str Str Str Str Dict Str Str Str Str Str Str Str AttributeLoad NameLoad attr Str Str Str Str Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list Assign NameStore BinOpSub Call AttributeLoad NameLoad attr BinOpMult Num Num Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str TupleLoad NameLoad NameLoad Expr Call NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad ListLoad Str Str attr Dict Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Dict Str NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore ListLoad For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword NameLoad keyword Str keyword Str Return NameLoad decorator_list With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad ListLoad Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign NameStore Call NameLoad ListLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str FunctionDef arguments args NameParam defaults body Return BinOpSub Call AttributeLoad NameLoad attr Num decorator_list Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Return Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Num keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword TupleLoad NameLoad Num decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Str If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Str With Call AttributeLoad NameLoad attr NameStore body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad NameStore body With Call AttributeLoad NameLoad attr NameStore body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad NameStore body With Call AttributeLoad NameLoad attr NameStore body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list
N/A N/A contextlib N/A hashlib N/A os N/A time N/A mock oslo_concurrency lockutils oslo_concurrency processutils oslo_log formatters oslo_log log logging oslo_serialization jsonutils oslo_utils importutils six.moves cStringIO nova conductor N/A nova.conf nova context nova objects nova test nova.tests.unit fake_instance nova utils nova.virt.libvirt imagecache nova.virt.libvirt utils libvirt_utils N/A CONF N/A N/A nova conf CONF N/A N/A N/A CONF import_opt host nova.netconf intercept_log_messages N/A N/A N/A N/A N/A N/A N/A mylog N/A N/A logging getLogger nova N/A stream N/A cStringIO N/A handler N/A N/A N/A logging logging StreamHandler stream N/A N/A N/A handler setFormatter N/A N/A formatters ContextFormatter N/A N/A N/A N/A mylog logger addHandler handler N/A N/A stream N/A N/A N/A N/A N/A mylog logger removeHandler handler N/A N/A contextlib contextmanager ImageCacheManagerTestCase N/A N/A test NoDBTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super ImageCacheManagerTestCase self setUp N/A N/A self stock_instance_names N/A set N/A instance-00000001 instance-00000002 instance-00000003 banana-42-hamster N/A test_read_stored_checksum_missing N/A N/A self N/A N/A N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A False N/A csum N/A N/A imagecache read_stored_checksum /tmp/foo timestamped False N/A N/A N/A self assertIsNone csum N/A test_get_age_of_file N/A N/A self mock_getmtime mock_time mock_exists N/A N/A N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A exists age N/A N/A image_cache_manager _get_age_of_file /tmp N/A N/A N/A self assertTrue exists N/A N/A N/A self assertEqual 1000000 age N/A N/A N/A N/A mock patch object N/A os path exists return_value True N/A N/A N/A mock patch object time time return_value 2000000 N/A N/A N/A mock patch object N/A os path getmtime return_value 1000000 test_get_age_of_file_not_exists N/A N/A self mock_exists N/A N/A N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A exists age N/A N/A image_cache_manager _get_age_of_file /tmp N/A N/A N/A self assertFalse exists N/A N/A N/A self assertEqual 0 age N/A N/A N/A N/A mock patch object N/A os path exists return_value False test_read_stored_checksum N/A N/A self N/A N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self flags image_info_filename_pattern $instances_path/%(image)s.info group libvirt N/A csum_input {"sha1": "fdghkfhkgjjksfdgjksjkghsdf"}
 N/A fname N/A N/A N/A os path join tmpdir aaa N/A info_fname N/A N/A imagecache get_info_filename fname N/A f N/A open info_fname w N/A N/A N/A f write csum_input N/A N/A N/A f close N/A csum_output N/A N/A imagecache read_stored_checksum fname timestamped False N/A N/A N/A self assertEqual N/A N/A csum_input rstrip N/A {"sha1": "%s"} csum_output N/A test_read_stored_checksum_legacy_essex N/A N/A self N/A N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self flags image_info_filename_pattern $instances_path/%(image)s.info group libvirt N/A fname N/A N/A N/A os path join tmpdir aaa N/A old_fname N/A fname .sha1 N/A f N/A open old_fname w N/A N/A N/A f write fdghkfhkgjjksfdgjksjkghsdf N/A N/A N/A f close N/A csum_output N/A N/A imagecache read_stored_checksum fname timestamped False N/A N/A N/A self assertEqual csum_output fdghkfhkgjjksfdgjksjkghsdf N/A N/A N/A self assertFalse N/A N/A N/A os path exists old_fname N/A info_fname N/A N/A imagecache get_info_filename fname N/A N/A N/A self assertTrue N/A N/A N/A os path exists info_fname N/A test_list_base_images N/A N/A self N/A N/A N/A listing N/A 00000001 ephemeral_0_20_None 17d1b00b81642842e514494a78e804e9a511637c_5368709120.info 00000004 swap_1000 N/A images N/A e97222e91fc4241f49a7f520d1dcf446751129b3_sm e09c675c2d1cfac32dae3c2d83689c8c94bc693b_sm e97222e91fc4241f49a7f520d1dcf446751129b3 17d1b00b81642842e514494a78e804e9a511637c 17d1b00b81642842e514494a78e804e9a511637c_5368709120 17d1b00b81642842e514494a78e804e9a511637c_10737418240 N/A N/A N/A listing extend images N/A N/A N/A self stub_out os.listdir N/A N/A N/A x N/A listing N/A N/A N/A self stub_out os.path.isfile N/A N/A N/A x N/A True N/A base_dir /var/lib/nova/instances/_base N/A N/A N/A self flags instances_path /var/lib/nova/instances N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager _list_base_images base_dir N/A sanitized N/A N/A ent N/A image_cache_manager unexplained_images N/A N/A N/A N/A sanitized append N/A N/A ent replace N/A base_dir / N/A N/A N/A self assertEqual N/A sorted sanitized N/A sorted images N/A expected N/A N/A N/A os path join base_dir e97222e91fc4241f49a7f520d1dcf446751129b3 N/A N/A N/A self assertIn expected N/A image_cache_manager unexplained_images N/A expected N/A N/A N/A os path join base_dir 17d1b00b81642842e514494a78e804e9a511637c_10737418240 N/A N/A N/A self assertIn expected N/A image_cache_manager unexplained_images N/A unexpected N/A N/A N/A os path join base_dir 00000004 N/A N/A N/A self assertNotIn unexpected N/A image_cache_manager unexplained_images N/A ent N/A image_cache_manager unexplained_images N/A N/A N/A N/A self assertTrue N/A N/A ent startswith base_dir N/A N/A N/A self assertEqual N/A len N/A image_cache_manager originals 2 N/A expected N/A N/A N/A os path join base_dir 17d1b00b81642842e514494a78e804e9a511637c N/A N/A N/A self assertIn expected N/A image_cache_manager originals N/A unexpected N/A N/A N/A os path join base_dir 17d1b00b81642842e514494a78e804e9a511637c_10737418240 N/A N/A N/A self assertNotIn unexpected N/A image_cache_manager originals N/A N/A N/A self assertEqual 1 N/A len N/A image_cache_manager back_swap_images N/A N/A N/A self assertIn swap_1000 N/A image_cache_manager back_swap_images N/A test_list_backing_images_small N/A N/A self N/A N/A N/A N/A N/A self stub_out os.listdir N/A N/A N/A x N/A N/A _base instance-00000001 instance-00000002 instance-00000003 N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A N/A N/A N/A x find instance- -1 N/A N/A N/A N/A self stubs Set libvirt_utils get_disk_backing_file N/A N/A N/A x N/A e97222e91fc4241f49a7f520d1dcf446751129b3_sm N/A found N/A N/A N/A os path join N/A CONF instances_path N/A CONF image_cache_subdirectory_name e97222e91fc4241f49a7f520d1dcf446751129b3_sm N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager unexplained_images N/A found N/A N/A image_cache_manager instance_names N/A self stock_instance_names N/A inuse_images N/A N/A image_cache_manager _list_backing_images N/A N/A N/A self assertEqual inuse_images N/A found N/A N/A N/A self assertEqual N/A len N/A image_cache_manager unexplained_images 0 N/A test_list_backing_images_resized N/A N/A self N/A N/A N/A N/A N/A self stub_out os.listdir N/A N/A N/A x N/A N/A _base instance-00000001 instance-00000002 instance-00000003 N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A N/A N/A N/A x find instance- -1 N/A N/A N/A N/A self stubs Set libvirt_utils get_disk_backing_file N/A N/A N/A x N/A e97222e91fc4241f49a7f520d1dcf446751129b3_10737418240 N/A found N/A N/A N/A os path join N/A CONF instances_path N/A CONF image_cache_subdirectory_name e97222e91fc4241f49a7f520d1dcf446751129b3_10737418240 N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager unexplained_images N/A found N/A N/A image_cache_manager instance_names N/A self stock_instance_names N/A inuse_images N/A N/A image_cache_manager _list_backing_images N/A N/A N/A self assertEqual inuse_images N/A found N/A N/A N/A self assertEqual N/A len N/A image_cache_manager unexplained_images 0 N/A test_list_backing_images_instancename N/A N/A self N/A N/A N/A N/A N/A self stub_out os.listdir N/A N/A N/A x N/A N/A _base banana-42-hamster N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A N/A N/A N/A x find banana-42-hamster -1 N/A N/A N/A N/A self stubs Set libvirt_utils get_disk_backing_file N/A N/A N/A x N/A e97222e91fc4241f49a7f520d1dcf446751129b3_sm N/A found N/A N/A N/A os path join N/A CONF instances_path N/A CONF image_cache_subdirectory_name e97222e91fc4241f49a7f520d1dcf446751129b3_sm N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager unexplained_images N/A found N/A N/A image_cache_manager instance_names N/A self stock_instance_names N/A inuse_images N/A N/A image_cache_manager _list_backing_images N/A N/A N/A self assertEqual inuse_images N/A found N/A N/A N/A self assertEqual N/A len N/A image_cache_manager unexplained_images 0 N/A test_list_backing_images_disk_notexist N/A N/A self N/A N/A N/A N/A N/A self stub_out os.listdir N/A N/A N/A x N/A N/A _base banana-42-hamster N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A N/A N/A N/A x find banana-42-hamster -1 fake_get_disk N/A N/A disk_path N/A N/A N/A N/A N/A processutils ProcessExecutionError N/A N/A N/A N/A N/A self stubs Set libvirt_utils get_disk_backing_file fake_get_disk N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager unexplained_images N/A N/A N/A image_cache_manager instance_names N/A self stock_instance_names N/A N/A N/A self assertRaises N/A processutils ProcessExecutionError N/A image_cache_manager _list_backing_images N/A test_find_base_file_nothing N/A N/A self N/A N/A N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A False N/A base_dir /var/lib/nova/instances/_base N/A fingerprint 549867354867 N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A res N/A list N/A N/A image_cache_manager _find_base_file base_dir fingerprint N/A N/A N/A self assertEqual 0 N/A len res N/A test_find_base_file_small N/A N/A self N/A N/A N/A fingerprint 968dd6cc49e01aaa044ed11c0cce733e0fa44a6a N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A N/A N/A x endswith N/A %s_sm fingerprint N/A base_dir /var/lib/nova/instances/_base N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A res N/A list N/A N/A image_cache_manager _find_base_file base_dir fingerprint N/A base_file N/A N/A N/A os path join base_dir N/A fingerprint _sm N/A N/A N/A self assertEqual res N/A N/A base_file True False N/A test_find_base_file_resized N/A N/A self N/A N/A N/A fingerprint 968dd6cc49e01aaa044ed11c0cce733e0fa44a6a N/A listing N/A 00000001 ephemeral_0_20_None 968dd6cc49e01aaa044ed11c0cce733e0fa44a6a_10737418240 00000004 N/A N/A N/A self stub_out os.listdir N/A N/A N/A x N/A listing N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A N/A N/A x endswith N/A %s_10737418240 fingerprint N/A N/A N/A self stub_out os.path.isfile N/A N/A N/A x N/A True N/A base_dir /var/lib/nova/instances/_base N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager _list_base_images base_dir N/A res N/A list N/A N/A image_cache_manager _find_base_file base_dir fingerprint N/A base_file N/A N/A N/A os path join base_dir N/A fingerprint _10737418240 N/A N/A N/A self assertEqual res N/A N/A base_file False True N/A test_find_base_file_all N/A N/A self N/A N/A N/A fingerprint 968dd6cc49e01aaa044ed11c0cce733e0fa44a6a N/A listing N/A 00000001 ephemeral_0_20_None 968dd6cc49e01aaa044ed11c0cce733e0fa44a6a_sm 968dd6cc49e01aaa044ed11c0cce733e0fa44a6a_10737418240 00000004 N/A N/A N/A self stub_out os.listdir N/A N/A N/A x N/A listing N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A True N/A N/A N/A self stub_out os.path.isfile N/A N/A N/A x N/A True N/A base_dir /var/lib/nova/instances/_base N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager _list_base_images base_dir N/A res N/A list N/A N/A image_cache_manager _find_base_file base_dir fingerprint N/A base_file1 N/A N/A N/A os path join base_dir fingerprint N/A base_file2 N/A N/A N/A os path join base_dir N/A fingerprint _sm N/A base_file3 N/A N/A N/A os path join base_dir N/A fingerprint _10737418240 N/A N/A N/A self assertEqual res N/A N/A base_file1 False False N/A base_file2 True False N/A base_file3 False True N/A _make_base_file N/A N/A self checksum lock N/A True True N/A N/A Make a base file for testing. N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self flags image_info_filename_pattern $instances_path/%(image)s.info group libvirt N/A fname N/A N/A N/A os path join tmpdir aaa N/A base_file N/A open fname w N/A N/A N/A base_file write data N/A N/A N/A base_file close N/A lock N/A N/A lockdir N/A N/A N/A os path join tmpdir locks N/A lockname N/A N/A N/A os path join lockdir nova-aaa N/A N/A N/A os mkdir lockdir N/A lock_file N/A open lockname w N/A N/A N/A lock_file write data N/A N/A N/A lock_file close N/A base_file N/A open fname r N/A checksum N/A N/A N/A N/A imagecache write_stored_checksum fname N/A N/A N/A base_file close N/A N/A fname N/A N/A contextlib contextmanager test_remove_base_file N/A N/A self N/A N/A N/A N/A N/A self _make_base_file fname N/A N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager _remove_base_file fname N/A info_fname N/A N/A imagecache get_info_filename fname N/A lock_name N/A nova- N/A N/A N/A N/A os path split fname N/A -1 N/A lock_dir N/A N/A N/A os path join N/A CONF instances_path locks N/A lock_file N/A N/A N/A os path join lock_dir lock_name N/A N/A N/A self assertTrue N/A N/A N/A os path exists fname N/A N/A N/A self assertTrue N/A N/A N/A os path exists info_fname N/A N/A N/A self assertTrue N/A N/A N/A os path exists lock_file N/A N/A N/A os utime fname N/A -1 N/A N/A N/A time time 3601 N/A N/A N/A image_cache_manager _remove_base_file fname N/A N/A N/A self assertFalse N/A N/A N/A os path exists fname N/A N/A N/A self assertFalse N/A N/A N/A os path exists info_fname N/A N/A N/A self assertFalse N/A N/A N/A os path exists lock_file N/A test_remove_base_file_original N/A N/A self N/A N/A N/A N/A N/A self _make_base_file fname N/A N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager originals N/A fname N/A N/A N/A image_cache_manager _remove_base_file fname N/A info_fname N/A N/A imagecache get_info_filename fname N/A N/A N/A self assertTrue N/A N/A N/A os path exists fname N/A N/A N/A self assertTrue N/A N/A N/A os path exists info_fname N/A N/A N/A os utime fname N/A -1 N/A N/A N/A time time 3601 N/A N/A N/A image_cache_manager _remove_base_file fname N/A N/A N/A self assertTrue N/A N/A N/A os path exists fname N/A N/A N/A self assertTrue N/A N/A N/A os path exists info_fname N/A N/A N/A os utime fname N/A -1 N/A N/A N/A time time N/A 3600 25 N/A N/A N/A image_cache_manager _remove_base_file fname N/A N/A N/A self assertFalse N/A N/A N/A os path exists fname N/A N/A N/A self assertFalse N/A N/A N/A os path exists info_fname N/A test_remove_base_file_dne N/A N/A self N/A N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self flags image_info_filename_pattern $instances_path/%(image)s.info group libvirt N/A fname N/A N/A N/A os path join tmpdir aaa N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager _remove_base_file fname N/A test_remove_base_file_oserror N/A N/A self N/A N/A N/A N/A intercept_log_messages stream N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self flags image_info_filename_pattern $instances_path/%(image)s.info group libvirt N/A fname N/A N/A N/A os path join tmpdir aaa N/A N/A N/A os mkdir fname N/A N/A N/A os utime fname N/A -1 N/A N/A N/A time time 3601 N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager _remove_base_file fname N/A N/A N/A self assertTrue N/A N/A N/A os path exists fname N/A N/A N/A self assertNotEqual N/A N/A N/A N/A stream getvalue find Failed to remove -1 N/A test_handle_base_image_unused N/A N/A self N/A N/A N/A img 123 N/A N/A N/A self _make_base_file fname N/A N/A N/A N/A os utime fname N/A -1 N/A N/A N/A time time 3601 N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager unexplained_images N/A fname N/A N/A N/A image_cache_manager _handle_base_image img fname N/A N/A N/A self assertEqual N/A image_cache_manager unexplained_images N/A N/A N/A N/A self assertEqual N/A image_cache_manager removable_base_files N/A fname N/A N/A N/A self assertEqual N/A image_cache_manager corrupt_base_files N/A N/A test_handle_base_image_used N/A N/A self mock_mtime N/A N/A N/A img 123 N/A N/A N/A self _make_base_file fname N/A N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager unexplained_images N/A fname N/A N/A image_cache_manager used_images N/A 123 N/A 1 0 N/A banana-42 N/A N/A N/A image_cache_manager _handle_base_image img fname N/A N/A N/A mock_mtime assert_called_once_with fname N/A N/A N/A self assertEqual N/A image_cache_manager unexplained_images N/A N/A N/A N/A self assertEqual N/A image_cache_manager removable_base_files N/A N/A N/A N/A self assertEqual N/A image_cache_manager corrupt_base_files N/A N/A N/A N/A N/A mock patch object libvirt_utils update_mtime test_handle_base_image_used_remotely N/A N/A self mock_mtime N/A N/A N/A img 123 N/A N/A N/A self _make_base_file fname N/A N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager unexplained_images N/A fname N/A N/A image_cache_manager used_images N/A 123 N/A 0 1 N/A banana-42 N/A N/A N/A image_cache_manager _handle_base_image img fname N/A N/A N/A mock_mtime assert_called_once_with fname N/A N/A N/A self assertEqual N/A image_cache_manager unexplained_images N/A N/A N/A N/A self assertEqual N/A image_cache_manager removable_base_files N/A N/A N/A N/A self assertEqual N/A image_cache_manager corrupt_base_files N/A N/A N/A N/A N/A mock patch object libvirt_utils update_mtime test_handle_base_image_absent N/A N/A self N/A N/A N/A img 123 N/A N/A intercept_log_messages stream N/A N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager used_images N/A 123 N/A 1 0 N/A banana-42 N/A N/A N/A image_cache_manager _handle_base_image img None N/A N/A N/A self assertEqual N/A image_cache_manager unexplained_images N/A N/A N/A N/A self assertEqual N/A image_cache_manager removable_base_files N/A N/A N/A N/A self assertEqual N/A image_cache_manager corrupt_base_files N/A N/A N/A N/A self assertNotEqual N/A N/A N/A N/A stream getvalue find an absent base file -1 N/A test_handle_base_image_used_missing N/A N/A self N/A N/A N/A img 123 N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self flags image_info_filename_pattern $instances_path/%(image)s.info group libvirt N/A fname N/A N/A N/A os path join tmpdir aaa N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager unexplained_images N/A fname N/A N/A image_cache_manager used_images N/A 123 N/A 1 0 N/A banana-42 N/A N/A N/A image_cache_manager _handle_base_image img fname N/A N/A N/A self assertEqual N/A image_cache_manager unexplained_images N/A N/A N/A N/A self assertEqual N/A image_cache_manager removable_base_files N/A N/A N/A N/A self assertEqual N/A image_cache_manager corrupt_base_files N/A N/A test_handle_base_image_checksum_fails N/A N/A self mock_mtime N/A N/A N/A N/A N/A self flags checksum_base_images True group libvirt N/A img 123 N/A N/A N/A self _make_base_file fname N/A N/A N/A open fname w f N/A N/A N/A N/A f write banana N/A d N/A sha1 21323454 N/A N/A open N/A %s.info fname w f N/A N/A N/A N/A f write N/A N/A jsonutils dumps d N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager unexplained_images N/A fname N/A N/A image_cache_manager used_images N/A 123 N/A 1 0 N/A banana-42 N/A N/A N/A image_cache_manager _handle_base_image img fname N/A N/A N/A mock_mtime assert_called_once_with fname N/A N/A N/A self assertEqual N/A image_cache_manager unexplained_images N/A N/A N/A N/A self assertEqual N/A image_cache_manager removable_base_files N/A N/A N/A N/A self assertEqual N/A image_cache_manager corrupt_base_files N/A fname N/A N/A N/A N/A mock patch object libvirt_utils update_mtime test_verify_base_images N/A N/A self mock_lock mock_mtime N/A N/A N/A hashed_1 356a192b7913b04c54574d18c28d46e6395428ab N/A hashed_21 472b07b9fcf2c2451e8781e944bf5f77cd8457c8 N/A hashed_22 12c6fc06c99a462375eeb3f43dfd832b08ca9e17 N/A hashed_42 92cfceb39d57d914ed8b14d0e37643de0797ae56 N/A N/A N/A self flags instances_path /instance_path image_cache_subdirectory_name _base N/A base_file_list N/A 00000001 ephemeral_0_20_None e97222e91fc4241f49a7f520d1dcf446751129b3_sm e09c675c2d1cfac32dae3c2d83689c8c94bc693b_sm hashed_42 hashed_1 hashed_21 hashed_22 N/A %s_5368709120 hashed_1 N/A %s_10737418240 hashed_1 00000004 fq_path N/A N/A path N/A N/A N/A N/A N/A N/A os path join /instance_path/_base/ path N/A N/A orig_exists N/A N/A os path exists exists N/A N/A path N/A N/A N/A N/A N/A N/A path startswith /instance_path N/A N/A N/A orig_exists path N/A N/A path N/A /instance_path /instance_path/_base /instance_path/instance-1/disk /instance_path/instance-2/disk /instance_path/instance-3/disk N/A /instance_path/_base/%s.info hashed_42 N/A N/A True N/A p base_file_list N/A N/A N/A path N/A fq_path p N/A N/A True N/A N/A path N/A N/A fq_path p .info N/A N/A False N/A N/A path N/A N/A /instance_path/_base/%s_sm i N/A i N/A hashed_1 hashed_21 hashed_22 hashed_42 N/A N/A False N/A N/A N/A self fail N/A Unexpected path existence check: %s path N/A N/A N/A N/A self stub_out os.path.exists N/A N/A N/A x N/A N/A exists x N/A orig_listdir N/A os listdir listdir N/A N/A path N/A N/A N/A N/A N/A N/A path startswith /instance_path N/A N/A N/A orig_listdir path N/A N/A path /instance_path N/A N/A N/A instance-1 instance-2 instance-3 _base N/A N/A path /instance_path/_base N/A N/A base_file_list N/A N/A N/A self fail N/A Unexpected directory listed: %s path N/A N/A N/A N/A self stub_out os.listdir N/A N/A N/A x N/A N/A listdir x N/A orig_isfile N/A N/A os path isfile isfile N/A N/A path N/A N/A N/A N/A N/A N/A path startswith /instance_path N/A N/A N/A orig_isfile path N/A p base_file_list N/A N/A N/A path N/A fq_path p N/A N/A True N/A N/A N/A self fail N/A Unexpected isfile call: %s path N/A N/A N/A N/A self stub_out os.path.isfile N/A N/A N/A x N/A N/A isfile x N/A instances N/A N/A image_ref host name uuid vm_state task_state 1 N/A CONF host instance-1 123 N/A image_ref kernel_id ramdisk_id host name uuid vm_state task_state 1 21 22 N/A CONF host instance-2 456 N/A all_instances N/A N/A N/A fake_instance fake_instance_obj None instance N/A instance instances N/A image_cache_manager N/A N/A imagecache ImageCacheManager get_disk_backing_file N/A N/A path N/A N/A N/A N/A path N/A /instance_path/instance-1/disk /instance_path/instance-2/disk N/A N/A N/A fq_path N/A %s_5368709120 hashed_1 N/A N/A N/A self fail N/A Unexpected backing file lookup: %s path N/A N/A N/A N/A N/A self stubs Set libvirt_utils get_disk_backing_file N/A N/A N/A x N/A N/A get_disk_backing_file x N/A N/A N/A N/A self stubs Set image_cache_manager _verify_checksum N/A N/A N/A x y N/A True N/A orig_getmtime N/A N/A os path getmtime getmtime N/A N/A path N/A N/A N/A N/A N/A N/A path startswith /instance_path N/A N/A N/A orig_getmtime path N/A 1000000 N/A N/A N/A N/A self stub_out os.path.getmtime N/A N/A N/A x N/A N/A getmtime x N/A orig_remove N/A os remove remove N/A N/A path N/A N/A N/A N/A N/A N/A path startswith /instance_path N/A N/A N/A orig_remove path N/A N/A N/A N/A N/A self stub_out os.remove N/A N/A N/A x N/A N/A remove x N/A N/A N/A N/A self mox StubOutWithMock N/A N/A objects block_device BlockDeviceMappingList bdms_by_instance_uuid N/A ctxt N/A N/A context get_admin_context N/A N/A N/A N/A N/A N/A N/A objects block_device BlockDeviceMappingList bdms_by_instance_uuid ctxt N/A 123 456 AndReturn N/A N/A N/A N/A N/A self mox ReplayAll N/A N/A N/A image_cache_manager update ctxt all_instances N/A active N/A N/A fq_path hashed_1 N/A fq_path N/A %s_5368709120 hashed_1 N/A fq_path hashed_21 N/A fq_path hashed_22 N/A act active N/A N/A N/A N/A self assertIn act N/A image_cache_manager active_base_files N/A N/A N/A self assertEqual N/A len N/A image_cache_manager active_base_files N/A len active N/A rem N/A N/A fq_path e97222e91fc4241f49a7f520d1dcf446751129b3_sm N/A fq_path e09c675c2d1cfac32dae3c2d83689c8c94bc693b_sm N/A fq_path hashed_42 N/A fq_path N/A %s_10737418240 hashed_1 N/A N/A N/A N/A self assertIn rem N/A image_cache_manager removable_base_files N/A N/A N/A self assertEqual N/A len N/A image_cache_manager corrupt_base_files 0 N/A N/A N/A N/A mock patch object libvirt_utils update_mtime N/A N/A N/A mock patch object lockutils external_lock test_verify_base_images_no_base N/A N/A self N/A N/A N/A N/A N/A self flags instances_path /tmp/no/such/dir/name/please N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager update None N/A N/A test_is_valid_info_file N/A N/A self N/A N/A N/A hashed e97222e91fc4241f49a7f520d1dcf446751129b3 N/A N/A N/A self flags instances_path /tmp/no/such/dir/name/please N/A N/A N/A self flags image_info_filename_pattern $instances_path/_base/%(image)s.info group libvirt N/A base_filename N/A N/A N/A os path join N/A CONF instances_path _base hashed N/A is_valid_info_file N/A imagecache is_valid_info_file N/A N/A N/A self assertFalse N/A is_valid_info_file banana N/A N/A N/A self assertFalse N/A is_valid_info_file N/A N/A N/A os path join N/A CONF instances_path _base 00000001 N/A N/A N/A self assertFalse N/A is_valid_info_file base_filename N/A N/A N/A self assertFalse N/A is_valid_info_file N/A base_filename .sha1 N/A N/A N/A self assertTrue N/A is_valid_info_file N/A base_filename .info N/A test_configured_checksum_path N/A N/A self N/A N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self flags image_info_filename_pattern $instances_path/%(image)s.info group libvirt N/A N/A N/A os mkdir N/A N/A N/A os path join tmpdir _base N/A instances N/A N/A image_ref host name uuid vm_state task_state 1 N/A CONF host instance-1 123 N/A image_ref host name uuid vm_state task_state 1 N/A CONF host instance-2 456 N/A all_instances N/A N/A instance instances N/A N/A N/A N/A all_instances append N/A N/A fake_instance fake_instance_obj None instance touch N/A N/A filename N/A N/A N/A f N/A open filename w N/A N/A N/A f write Touched N/A N/A N/A f close N/A N/A old N/A N/A N/A time time N/A 25 3600 N/A hashed e97222e91fc4241f49a7f520d1dcf446751129b3 N/A base_filename N/A N/A N/A os path join tmpdir hashed N/A N/A touch base_filename N/A N/A touch N/A base_filename .info N/A N/A N/A os utime N/A base_filename .info N/A old old N/A N/A touch N/A base_filename .info N/A N/A N/A os utime N/A base_filename .info N/A old old N/A N/A N/A N/A self mox StubOutWithMock N/A N/A objects block_device BlockDeviceMappingList bdms_by_instance_uuid N/A ctxt N/A N/A context get_admin_context N/A N/A N/A N/A N/A N/A N/A objects block_device BlockDeviceMappingList bdms_by_instance_uuid ctxt N/A 123 456 AndReturn N/A N/A N/A N/A N/A self mox ReplayAll N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager update ctxt all_instances N/A N/A N/A self assertTrue N/A N/A N/A os path exists base_filename N/A N/A N/A self assertTrue N/A N/A N/A os path exists N/A base_filename .info N/A test_run_image_cache_manager_pass N/A N/A self N/A N/A N/A was N/A called False fake_get_all_by_filters N/A N/A context N/A args kwargs N/A N/A N/A was N/A called True N/A instances N/A N/A x N/A range 2 N/A N/A N/A N/A instances append N/A N/A fake_instance fake_db_instance image_ref 1 uuid x name x vm_state task_state N/A instances N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self stub_out nova.db.instance_get_all_by_filters fake_get_all_by_filters N/A compute N/A N/A importutils import_object N/A CONF compute_manager N/A N/A N/A self flags use_local True group conductor N/A N/A compute conductor_api N/A N/A conductor API N/A ctxt N/A N/A context get_admin_context N/A N/A N/A compute _run_image_cache_manager_pass ctxt N/A N/A N/A self assertTrue N/A was N/A called N/A test_store_swap_image N/A N/A self N/A N/A N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager _store_swap_image swap_ N/A N/A N/A image_cache_manager _store_swap_image swap_123 N/A N/A N/A image_cache_manager _store_swap_image swap_456 N/A N/A N/A image_cache_manager _store_swap_image swap_abc N/A N/A N/A image_cache_manager _store_swap_image 123_swap N/A N/A N/A image_cache_manager _store_swap_image swap_129_ N/A N/A N/A self assertEqual N/A len N/A image_cache_manager back_swap_images 2 N/A expect_set N/A set N/A swap_123 swap_456 N/A N/A N/A self assertEqual N/A image_cache_manager back_swap_images expect_set N/A test_age_and_verify_swap_images N/A N/A self mock_remove mock_getmtime mock_exist mock_mtime mock_lock N/A N/A N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A expected_remove N/A set N/A expected_exist N/A set N/A swap_128 swap_256 N/A N/A N/A N/A image_cache_manager back_swap_images add swap_128 N/A N/A N/A N/A image_cache_manager back_swap_images add swap_256 N/A N/A N/A N/A image_cache_manager used_swap_images add swap_128 getmtime N/A N/A path N/A N/A N/A N/A N/A N/A time time 1000000 N/A N/A N/A mock_getmtime side_effect getmtime removefile N/A N/A path N/A N/A N/A N/A N/A N/A path startswith /tmp_age_test N/A N/A N/A N/A os remove path N/A fn N/A N/A N/A N/A os path split path N/A -1 N/A N/A N/A expected_remove add fn N/A N/A N/A expected_exist remove fn N/A N/A N/A mock_remove side_effect removefile N/A N/A N/A image_cache_manager _age_and_verify_swap_images None /tmp_age_test N/A N/A N/A self assertEqual 1 N/A len expected_exist N/A N/A N/A self assertEqual 1 N/A len expected_remove N/A N/A N/A self assertIn swap_128 expected_exist N/A N/A N/A self assertIn swap_256 expected_remove N/A N/A N/A N/A mock patch object lockutils external_lock N/A N/A N/A mock patch object libvirt_utils update_mtime N/A N/A mock patch os.path.exists return_value True N/A N/A mock patch os.path.getmtime N/A N/A mock patch os.remove test_lock_acquired_on_removing_old_enough_files N/A N/A self mock_get_age mock_synchronized N/A N/A N/A base_file /tmp_age_test N/A lock_path N/A N/A N/A os path join N/A CONF instances_path locks N/A lock_file N/A N/A N/A N/A os path split base_file N/A -1 N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A N/A image_cache_manager _remove_old_enough_file base_file 60 remove_sig False remove_lock False N/A N/A N/A mock_synchronized assert_called_once_with lock_file external True lock_path lock_path N/A N/A N/A N/A mock patch object utils synchronized N/A N/A N/A mock patch object N/A imagecache ImageCacheManager _get_age_of_file return_value N/A True 100 N/A VerifyChecksumTestCase N/A N/A test NoDBTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super VerifyChecksumTestCase self setUp N/A N/A self img N/A container_format id ami 42 N/A N/A N/A self flags checksum_base_images True group libvirt N/A _make_checksum N/A N/A self tmpdir N/A N/A N/A testdata OpenStack Software delivers a massively scalable cloud operating system. N/A fname N/A N/A N/A os path join tmpdir aaa N/A info_fname N/A N/A imagecache get_info_filename fname N/A N/A open fname w f N/A N/A N/A N/A f write testdata N/A N/A fname info_fname testdata N/A _write_file N/A N/A self info_fname info_attr testdata N/A N/A N/A f N/A open info_fname w N/A N/A info_attr csum valid N/A N/A csum N/A N/A hashlib sha1 N/A N/A N/A csum update testdata N/A N/A N/A f write N/A {"sha1": "%s"}
 N/A N/A csum hexdigest N/A N/A N/A info_attr csum invalid, not json N/A N/A N/A N/A f write banana N/A N/A N/A N/A f write {"sha1": "banana"} N/A N/A N/A f close N/A _check_body N/A N/A self tmpdir info_attr N/A N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self flags image_info_filename_pattern $instances_path/%(image)s.info group libvirt N/A N/A fname info_fname testdata N/A N/A self _make_checksum tmpdir N/A N/A N/A self _write_file info_fname info_attr testdata N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A N/A image_cache_manager fname N/A test_verify_checksum N/A N/A self N/A N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A image_cache_manager fname N/A N/A self _check_body tmpdir csum valid N/A res N/A N/A image_cache_manager _verify_checksum N/A self img fname N/A N/A N/A self assertTrue res N/A test_verify_checksum_disabled N/A N/A self N/A N/A N/A N/A N/A self flags checksum_base_images False group libvirt N/A N/A N/A utils tempdir tmpdir N/A N/A N/A image_cache_manager fname N/A N/A self _check_body tmpdir csum valid N/A res N/A N/A image_cache_manager _verify_checksum N/A self img fname N/A N/A N/A self assertIsNone res N/A test_verify_checksum_invalid_json N/A N/A self N/A N/A N/A N/A intercept_log_messages stream N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A image_cache_manager fname N/A N/A self _check_body tmpdir csum invalid, not json N/A res N/A N/A image_cache_manager _verify_checksum N/A self img fname create_if_missing False N/A N/A N/A self assertFalse res N/A log N/A N/A stream getvalue N/A N/A N/A self assertNotEqual N/A N/A log find image verification skipped -1 N/A test_verify_checksum_invalid_repaired N/A N/A self N/A N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A image_cache_manager fname N/A N/A self _check_body tmpdir csum invalid, not json N/A res N/A N/A image_cache_manager _verify_checksum N/A self img fname create_if_missing True N/A N/A N/A self assertIsNone res N/A test_verify_checksum_invalid N/A N/A self N/A N/A N/A N/A intercept_log_messages stream N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A image_cache_manager fname N/A N/A self _check_body tmpdir csum invalid, valid json N/A res N/A N/A image_cache_manager _verify_checksum N/A self img fname N/A N/A N/A self assertFalse res N/A log N/A N/A stream getvalue N/A N/A N/A self assertNotEqual N/A N/A log find image verification failed -1 N/A test_verify_checksum_file_missing N/A N/A self N/A N/A N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A self flags instances_path tmpdir N/A N/A N/A self flags image_info_filename_pattern $instances_path/%(image)s.info group libvirt N/A N/A fname info_fname testdata N/A N/A self _make_checksum tmpdir N/A image_cache_manager N/A N/A imagecache ImageCacheManager N/A res N/A N/A image_cache_manager _verify_checksum aaa fname N/A N/A N/A self assertIsNone res N/A N/A N/A self assertTrue N/A N/A N/A os path exists info_fname N/A N/A