Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias alias Import alias ImportFrom alias Import alias ImportFrom alias Import alias Import alias Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias ImportFrom alias identifier Import alias Assign NameStore Str Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults Str body Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num If CompareLt Call NameLoad NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore SubscriptLoad Call NameLoad Index Num With Call NameLoad NameLoad NameStore body Return Call AttributeLoad NameLoad attr keyword Call AttributeLoad Call AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad IfExp NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Call NameLoad attr With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Call NameLoad attr TryExcept body With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str NameStore body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore UnaryOpNot CompareEq NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If BoolOpAnd NameLoad NameLoad body Print Str Print Str Expr Call NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr TryExcept body Return SubscriptLoad Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index Num Index Num handlers ExceptHandler type NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Assign NameStore BinOpAdd NameLoad Str If UnaryOpNot BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str handlers ExceptHandler type NameLoad body Pass Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str NameLoad body Expr Str Assign NameStore BinOpAdd NameLoad IfExp Call AttributeLoad NameLoad attr Str Str Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num attr ClassDef bases NameLoad body Pass decorator_list TryExcept body If CompareEq NameLoad Str body Raise NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad TryExcept body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str If BoolOpAnd NameLoad CompareEq SubscriptLoad NameLoad Index Str Str body Assign NameStore SubscriptStore NameLoad Index Str Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Assign NameStore SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str If BoolOpOr CompareEq Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Str attr NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Str attr NameLoad handlers ExceptHandler type NameLoad body Pass handlers ExceptHandler type NameLoad body Pass For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore Call NameLoad ListComp SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str comprehension NameStore NameLoad Assert CompareEq Call NameLoad NameLoad Num Call AttributeLoad Str attr NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr If NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Return Call NameLoad GeneratorExp TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Return Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assert CompareGt NameLoad Num Call AttributeLoad Str attr NameLoad If NameLoad body Assert BoolOpAnd CompareEq NameLoad Num NameLoad Str Assign NameStore IfExp NameLoad Str Str TryExcept body Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Print Call AttributeLoad Str attr NameLoad Expr Call NameLoad Num Expr Call NameLoad Assign NameStore Call NameLoad NameLoad If Call NameLoad NameLoad body If NameLoad body Expr Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Num Assign NameStore Num If NameLoad body Assign NameStore Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad orelse AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad Call NameLoad Index Num Index Num Assign NameStore Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword IfExp NameLoad Str Str If NameLoad body Assign NameStore ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr For NameStore NameLoad body If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Assign NameStore NameLoad Break orelse Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Num Assign NameStore BinOpAdd NameLoad Call AttributeLoad Str attr keyword NameLoad Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num attr Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str With Call AttributeLoad NameLoad attr keyword ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad NameLoad keyword NameLoad orelse If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad If NameLoad body Print Call AttributeLoad Str attr NameLoad Print Str Expr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assert CompareEq Call NameLoad NameLoad Num Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Dict NameLoad NameLoad keyword NameLoad keyword Num FunctionDef arguments args defaults body Expr Call NameLoad NameLoad keyword Dict NameLoad Str Expr Call AttributeLoad NameLoad attr Str decorator_list With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad NameLoad FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad Str attr ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Expr Call NameLoad Str NameLoad decorator_list With Call AttributeLoad NameLoad attr keyword NameLoad keyword Str body Expr Call NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign TupleStore NameStore NameStore SubscriptLoad Call NameLoad NameLoad Index Num With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad 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 decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Slice Num If CompareIs NameLoad NameLoad body If CompareGt Call NameLoad NameLoad Num body Assign NameStore Num orelse Assign NameStore Num Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str ListLoad NameLoad DictComp NameLoad Dict Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad Str comprehension TupleStore NameStore NameStore SubscriptLoad Call AttributeLoad NameLoad attr Slice NameLoad NameLoad NameLoad Str ListLoad Str Str Str NameLoad With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad If CompareEq Call NameLoad NameLoad Num body Print Call AttributeLoad Str attr NameLoad orelse Print Call AttributeLoad Str attr NameLoad Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If SubscriptLoad SubscriptLoad NameLoad Index Str Index Str body Print Call AttributeLoad Str attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str orelse Print Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body TryExcept body Assign NameStore SubscriptLoad SubscriptLoad Call NameLoad NameLoad keyword NameLoad Index NameLoad Index Num handlers ExceptHandler type NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore ListLoad For NameStore NameLoad body TryExcept body Assign NameStore SubscriptLoad SubscriptLoad Call NameLoad NameLoad keyword NameLoad Index NameLoad Index Num handlers ExceptHandler type NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str With Call AttributeLoad NameLoad attr keyword NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Index Num For NameStore NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore SubscriptLoad SubscriptLoad Call NameLoad NameLoad Index NameLoad Slice Num Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore SubscriptLoad Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Index Num With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad SubscriptLoad NameLoad Index Str For NameStore NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Str With Call AttributeLoad NameLoad attr keyword NameLoad keyword Str body Expr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad TupleLoad SubscriptLoad NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body TryExcept body Assign NameStore SubscriptLoad SubscriptLoad Call NameLoad NameLoad keyword NameLoad Index NameLoad Index Num handlers ExceptHandler type NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr keyword NameLoad keyword Str body Expr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad ListComp TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str comprehension NameStore NameLoad If NameLoad body Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str With Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index NameLoad body FunctionDef arguments args defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Num Return Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore SubscriptLoad Call AttributeLoad Call NameLoad NameLoad attr Index Num For TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr body Assign SubscriptStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index Str SubscriptStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index Str SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index NameLoad With Call AttributeLoad NameLoad attr keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index Str body FunctionDef arguments args defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list Expr Call NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call NameLoad Str keyword NameLoad For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad With Call AttributeLoad NameLoad attr keyword ListComp NameLoad comprehension TupleStore NameStore NameStore NameLoad keyword Str body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Str keyword NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Print Call AttributeLoad Str attr keyword NameLoad keyword Call NameLoad NameLoad keyword SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index Str Index Str keyword IfExp CompareGt Call NameLoad NameLoad Num Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str body Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad If CompareEq Call NameLoad NameLoad Num body Print Call AttributeLoad Str attr NameLoad orelse If CompareIs SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Index Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad orelse Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad SubscriptLoad Call NameLoad Index Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Str body If BoolOpOr UnaryOpNot Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body TryExcept body Expr Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword UnaryOpNot AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call NameLoad AttributeLoad NameLoad attr Raise orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Num orelse If CompareEq NameLoad Str body If BoolOpOr UnaryOpNot Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body TryExcept body Expr Call NameLoad Num keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad handlers ExceptHandler body Expr Call NameLoad AttributeLoad NameLoad attr Raise orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Num orelse If CompareEq NameLoad Str body Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call NameLoad keyword AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call NameLoad keyword AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call NameLoad keyword AttributeLoad NameLoad attr Expr Call NameLoad keyword AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call NameLoad AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call NameLoad orelse If CompareEq NameLoad Str body Expr Call NameLoad AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call NameLoad keyword AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Raise Call NameLoad Call AttributeLoad Str attr keyword NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str TryFinally body Assign NameStore Call AttributeLoad NameLoad attr finalbody If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list Assign AttributeStore AttributeLoad NameLoad attr attr SubscriptLoad Call NameLoad Index Num If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A argparse N/A subprocess N/A shlex N/A re N/A os N/A sys N/A json N/A hashlib collections defaultdict OrderedDict N/A time StringIO StringIO N/A webbrowser distutils.version LooseVersion N/A logging N/A paramiko N/A N/A N/A logging basicConfig N/A log N/A N/A logging getLogger cstar_docker N/A N/A N/A log setLevel N/A logging DEBUG fabric api fab fabric.contrib.files append fab_append cstar_perf.tool fab_deploy fabric.tasks execute fab_execute N/A tasks N/A CONTAINER_DEFAULT_MEMORY 2G N/A N/A N/A fab env user cstar N/A docker_image_name datastax/cstar_docker N/A dockerfile 
FROM ubuntu:latest
MAINTAINER Ryan McGuire <ryan@datastax.com>

RUN   apt-get update &&   apt-get -y upgrade &&   apt-get install -y       build-essential       software-properties-common       git       unzip       python       python-dev       python-pip       openssh-server       libssl-dev       ant       libjna-java       psmisc       python-software-properties       libjpeg-dev       lxc

RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections &&     add-apt-repository ppa:webupd8team/java &&     apt-get update &&     apt-get install -y       oracle-java8-installer       oracle-java7-installer       oracle-java8-set-default

# Download and compile cassandra, we don't use this verison, but what
# this does is provide a git cache and primes the ~/.m2 directory to
# speed things up:
RUN groupadd -g 999 docker
RUN useradd -ms /bin/bash -G docker cstar
USER cstar
RUN git clone http://github.com/apache/cassandra.git ~/.docker_cassandra.git 
RUN cd ~/.docker_cassandra.git &&     JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 ant clean jar
USER root

#### Setup SSH
RUN mkdir /var/run/sshd &&     echo 'root:root' | chpasswd &&     sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config &&     `### SSH login fix. Otherwise user is kicked off after login` &&     sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile

RUN mkdir -p /home/cstar/.ssh &&   chmod 700 /home/cstar/.ssh &&   echo '{ssh_pub_key}' > /home/cstar/.ssh/authorized_keys &&   ssh-keygen -P '' -f /home/cstar/.ssh/id_rsa &&   cat /home/cstar/.ssh/id_rsa.pub >> /home/cstar/.ssh/authorized_keys &&   chmod 600 /home/cstar/.ssh/authorized_keys &&   echo  'Host *' > /home/cstar/.ssh/config &&   echo  '    StrictHostKeyChecking no' >> /home/cstar/.ssh/config &&  echo  '    UserKnownHostsFile=/dev/null' >> /home/cstar/.ssh/config &&   chown -R cstar:cstar /home/cstar/.ssh

RUN mkdir -p /root/.ssh &&   chmod 700 /root/.ssh &&   cp /home/cstar/.ssh/authorized_keys /root/.ssh/authorized_keys &&   cp /home/cstar/.ssh/id_rsa /root/.ssh/id_rsa &&   cp /home/cstar/.ssh/config /root/.ssh/config

RUN mkdir -p /home/cstar/git/cstar_perf &&     chown -R cstar:cstar /home/cstar/git &&     mkdir -p /data/cstar_perf &&     chown -R cstar:cstar /data
VOLUME ["/home/cstar/git/cstar_perf"]

RUN echo "%wheel        ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers &&     groupadd wheel &&     gpasswd -a cstar wheel

### Expose SSH and Cassandra ports
EXPOSE 22 7000 7001 7199 9042 9160 61620 61621

RUN pip install supervisor
RUN echo "[unix_http_server]" > /supervisord.conf &&     echo "file=/tmp/supervisor.sock"                                                        >> /supervisord.conf &&     echo ""                                                                                 >> /supervisord.conf &&     echo "[supervisord]"                                                                    >> /supervisord.conf &&     echo "logfile=/tmp/supervisord.log "                                                    >> /supervisord.conf &&     echo "logfile_maxbytes=50MB        "                                                    >> /supervisord.conf &&     echo "logfile_backups=10           "                                                    >> /supervisord.conf &&     echo "loglevel=info                "                                                    >> /supervisord.conf &&     echo "pidfile=/tmp/supervisord.pid "                                                    >> /supervisord.conf &&     echo "nodaemon=false               "                                                    >> /supervisord.conf &&     echo "minfds=1024                  "                                                    >> /supervisord.conf &&     echo "minprocs=200                 "                                                    >> /supervisord.conf &&     echo ""                                                                                 >> /supervisord.conf &&     echo "[rpcinterface:supervisor]"                                                        >> /supervisord.conf &&     echo "supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface" >> /supervisord.conf &&     echo ""                                                                                 >> /supervisord.conf &&     echo ""                                                                                 >> /supervisord.conf &&     echo "[supervisorctl]"                                                                  >> /supervisord.conf &&     echo "serverurl=unix:///tmp/supervisor.sock "                                           >> /supervisord.conf &&     echo ""                                                                                 >> /supervisord.conf &&     echo "[program:sshd]"                                                                   >> /supervisord.conf &&     echo "command=/usr/sbin/sshd -D"                                                        >> /supervisord.conf &&     echo "user=root"                                                                        >> /supervisord.conf &&     echo "autostart=true"                                                                   >> /supervisord.conf &&     echo "autorestart=true"                                                                 >> /supervisord.conf &&     echo "redirect_stderr=true"                                                             >> /supervisord.conf

CMD ["supervisord", "-n", "-c", "/supervisord.conf"]
 check_docker_version N/A N/A expected_version N/A 1.6.0 N/A N/A version_cmd N/A N/A shlex split docker --version N/A N/A N/A p N/A N/A subprocess Popen version_cmd stdout N/A subprocess PIPE N/A version_string N/A N/A N/A p communicate N/A 0 N/A N/A N/A OSError N/A N/A N/A AssertionError Failed to run docker, it may not be installed? N/A m N/A N/A re match Docker version ([^,]+), .* version_string N/A m N/A N/A version N/A N/A N/A m groups N/A 0 N/A N/A N/A LooseVersion version expected_version N/A N/A N/A AssertionError N/A N/A Found docker version {}. This tool requires version {}+ format version expected_version N/A get_dockerfile N/A N/A N/A N/A N/A ssh_pub_file N/A N/A get_ssh_key_pair N/A 1 N/A N/A open ssh_pub_file f N/A N/A N/A N/A dockerfile format ssh_pub_key N/A N/A N/A N/A f read strip N/A build_docker_image N/A N/A tag force N/A docker_image_name False N/A N/A force N/A N/A rmi_cmd N/A N/A shlex split N/A N/A docker rmi -f {} - format tag N/A N/A N/A log info Removing docker image... N/A p N/A N/A subprocess call rmi_cmd N/A build_cmd N/A N/A shlex split N/A N/A docker build -t {} {} - format tag N/A force --no-cache N/A p N/A N/A subprocess Popen build_cmd stdin N/A subprocess PIPE N/A N/A N/A p communicate N/A get_dockerfile N/A N/A N/A p returncode 0 N/A N/A dockerfile_hash N/A N/A N/A os path join N/A N/A N/A os path expanduser ~ .cstar_perf cstar_docker_image_hash N/A docker_image_hash N/A N/A N/A N/A hashlib sha256 N/A get_dockerfile hexdigest N/A N/A open dockerfile_hash w f N/A N/A N/A N/A f write docker_image_hash N/A check_if_build_necessary N/A N/A exit_if_not_ready N/A True N/A N/A Checks the previous hash of the dockerfile against the latest
    version to determine if a rebuild is nescessary N/A current_dockerfile_hash N/A N/A N/A N/A hashlib sha256 N/A get_dockerfile hexdigest N/A N/A N/A N/A open N/A N/A N/A os path join N/A N/A N/A os path expanduser ~ .cstar_perf cstar_docker_image_hash f N/A N/A previous_dockerfile_hash N/A N/A N/A N/A f read strip N/A needs_rebuild N/A N/A current_dockerfile_hash previous_dockerfile_hash N/A N/A N/A IOError N/A N/A needs_rebuild True N/A N/A needs_rebuild exit_if_not_ready N/A N/A The Dockerfile has changed since you last built the image. You must rebuild your image: N/A    cstar_docker build N/A N/A exit 1 N/A get_container_data N/A N/A container N/A N/A N/A inspect_cmd N/A N/A shlex split N/A N/A docker inspect {} format container N/A p N/A N/A subprocess Popen inspect_cmd stdout N/A subprocess PIPE stderr N/A subprocess PIPE N/A N/A N/A N/A N/A N/A json loads N/A N/A N/A p communicate N/A 0 N/A 0 N/A N/A N/A IndexError N/A N/A N/A AssertionError N/A N/A No docker container or image with id: {} format container N/A get_ssh_key_pair N/A N/A N/A N/A N/A Create a cstar_docker specific SSH key, or return the previously generated one N/A key_path N/A N/A N/A os path join N/A N/A N/A os path expanduser ~ .cstar_perf cstar_docker_key N/A pub_key_path N/A key_path .pub N/A N/A N/A N/A N/A N/A os path exists key_path N/A N/A N/A os path exists pub_key_path N/A N/A N/A N/A N/A N/A os mkdir N/A N/A N/A os path join N/A N/A N/A os path expanduser ~ .cstar_perf N/A N/A N/A IOError N/A N/A N/A key N/A N/A N/A N/A paramiko rsakey RSAKey generate 2048 N/A N/A open key_path w f N/A N/A N/A N/A key write_private_key f N/A N/A open pub_key_path w f N/A N/A N/A N/A f write ssh-rsa  N/A N/A N/A f write N/A N/A key get_base64 N/A N/A N/A f write N/A N/A  cstar_docker generated {} format N/A N/A time ctime N/A N/A N/A f write N/A N/A N/A os chmod key_path 384 N/A N/A N/A os chmod pub_key_path 384 N/A N/A key_path pub_key_path N/A get_clusters N/A N/A cluster_regex all_metadata N/A all False N/A N/A Get all clusters matching the cluster name regex.

    Returns a list of names, unless all_metadata=True, then a map of
    all container inspection data is returned.
     N/A cluster_regex N/A cluster_regex N/A N/A N/A cluster_regex endswith $ $ N/A clusters N/A defaultdict list N/A cluster_nodes N/A defaultdict list N/A p N/A N/A subprocess Popen N/A N/A shlex split docker ps -aq stdout N/A subprocess PIPE N/A containers N/A N/A N/A N/A N/A p communicate N/A 0 strip NoContainersException N/A Exception N/A N/A N/A N/A N/A N/A N/A containers N/A N/A NoContainersException N/A containers N/A N/A containers split N/A container containers N/A N/A data N/A get_container_data container N/A N/A N/A labels N/A N/A data N/A Config N/A Labels N/A N/A labels N/A N/A labels N/A cstar_node true N/A N/A container_name N/A data N/A Name N/A N/A N/A data N/A Name lstrip / N/A node_num N/A labels N/A node N/A int N/A labels N/A node N/A N/A N/A N/A N/A cluster_regex lower all$ N/A N/A re match cluster_regex N/A labels N/A cluster_name N/A N/A N/A N/A N/A clusters N/A N/A labels N/A cluster_name append data N/A N/A N/A N/A cluster_nodes N/A N/A labels N/A cluster_name append container_name N/A N/A N/A KeyError N/A N/A N/A N/A N/A NoContainersException N/A N/A N/A N/A cluster_name cluster_data N/A N/A clusters items N/A N/A N/A N/A cluster_data sort key N/A N/A N/A x N/A N/A N/A N/A x N/A Config N/A Labels N/A node N/A cluster_types N/A set N/A N/A N/A N/A x N/A Config N/A Labels N/A cluster_type N/A x cluster_data N/A N/A N/A len cluster_types 1 N/A N/A {} has more than one cluster_type: {} format cluster_name cluster_types N/A N/A cluster_name nodes N/A N/A cluster_nodes items N/A N/A N/A N/A nodes sort N/A all_metadata N/A N/A clusters N/A N/A cluster_nodes N/A get_ips N/A N/A cluster_name N/A N/A N/A clusters N/A get_clusters cluster_name all_metadata True N/A cluster N/A clusters N/A cluster_name N/A N/A tuple N/A N/A N/A c N/A Name N/A N/A c N/A NetworkSettings N/A IPAddress N/A c cluster N/A check_cluster_exists N/A N/A cluster_regex N/A N/A N/A existing_nodes N/A get_clusters cluster_regex N/A N/A bool N/A len existing_nodes N/A launch N/A N/A num_nodes cluster_name destroy_existing install_tool frontend mount_host_src verbose client_double_duty N/A cnode False True False False False False N/A N/A Launch cluster nodes, return metadata (ip addresses etc) for the nodes N/A N/A num_nodes 0 N/A N/A Cannot start a cluster with {} nodes format num_nodes N/A frontend N/A N/A N/A N/A num_nodes 1 client_double_duty Can only start a frontend with a single node N/A cluster_type N/A frontend frontend cluster N/A N/A N/A N/A get_container_data docker_image_name N/A N/A N/A AssertionError N/A N/A N/A N/A The docker image {} was not found, build the docker image first with: 'cstar_docker build' format docker_image_name N/A N/A exit 1 N/A N/A check_if_build_necessary N/A existing_nodes N/A get_clusters cluster_name N/A N/A len existing_nodes N/A N/A destroy_existing N/A N/A N/A destroy cluster_name N/A N/A N/A N/A log error N/A N/A Cannot launch cluster '{}' as it already exists. format cluster_name N/A N/A N/A log error You must destroy the existing cluster, or use --destroy-existing in your launch command N/A N/A exit 1 N/A first_cassandra_node 1 N/A client_double_duty N/A N/A first_cassandra_node 0 N/A N/A N/A log info N/A N/A Launching a {} node cluster... format num_nodes N/A N/A num_nodes 1 N/A N/A N/A log info N/A N/A Launching a {} node cluster with a separate client node ... format num_nodes N/A node_data N/A OrderedDict N/A i N/A range num_nodes N/A N/A node_name N/A %s_%02d N/A cluster_name i N/A ssh_path N/A N/A N/A N/A os path split N/A N/A get_ssh_key_pair N/A 0 N/A 0 N/A run_cmd N/A N/A docker run --ulimit memlock=100000000:100000000 --privileged --label cstar_node=true --label cluster_name={cluster_name} --label cluster_type={cluster_type} --label node={node_num}  -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/bin/docker -d -m {CONTAINER_DEFAULT_MEMORY} --name={node_name} {port_settings} -h {node_name} format cluster_name cluster_name node_num i node_name node_name cluster_type cluster_type CONTAINER_DEFAULT_MEMORY CONTAINER_DEFAULT_MEMORY ssh_path ssh_path port_settings N/A frontend -p 127.0.0.1:8000:8000 N/A mount_host_src N/A N/A candidates N/A N/A N/A N/A os path abspath N/A N/A N/A os path join N/A N/A N/A os path dirname N/A N/A N/A os path realpath __file__ N/A os pardir N/A os pardir N/A os pardir N/A N/A os getcwd N/A d candidates N/A N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join d .git N/A N/A N/A os path exists N/A N/A N/A os path join d tool N/A N/A N/A os path exists N/A N/A N/A os path join d frontend N/A N/A cstar_dir d N/A N/A N/A N/A N/A log error Could not mount your git checkout of cstar_perf because none could be found. Try installing cstar_perf in developer mode: 'pip install -e ./tool' or try running cstar_docker from the same directory as your checkout N/A N/A exit 1 N/A run_cmd N/A run_cmd N/A N/A  -v {cstar_dir}:/home/cstar/git/cstar_perf format cstar_dir cstar_dir N/A run_cmd N/A N/A run_cmd docker_image_name N/A N/A N/A log debug run_cmd N/A p N/A N/A subprocess Popen N/A N/A shlex split run_cmd stdout N/A subprocess PIPE stderr N/A subprocess PIPE N/A container_id N/A N/A N/A N/A N/A p communicate N/A 0 strip N/A N/A node_data N/A node_name N/A get_container_data container_id N/A hosts N/A OrderedDict N/A N/A name data N/A N/A node_data items N/A N/A N/A hosts N/A name N/A N/A data N/A NetworkSettings N/A IPAddress N/A N/A N/A fab settings hosts N/A n N/A n N/A N/A hosts values N/A N/A N/A fab_execute N/A fab_deploy setup_hosts_file hosts N/A frontend N/A N/A N/A N/A log info Installing cstar_perf.frontend ...  N/A N/A __install_cstar_perf_frontend cluster_name hosts mount_host_src mount_host_src N/A N/A install_tool N/A N/A N/A N/A log info Installing cstar_perf.tool ...  N/A N/A __install_cstar_perf_tool cluster_name hosts mount_host_src mount_host_src first_cassandra_node first_cassandra_node N/A verbose N/A N/A N/A N/A Started {} nodes: format num_nodes N/A N/A N/A info cluster_name N/A node_data N/A __install_cstar_perf_frontend N/A N/A cluster_name hosts mount_host_src N/A False N/A N/A N/A N/A len hosts 1 Cannot install frontend onto more than one node N/A N/A host ip N/A N/A hosts popitem N/A N/A N/A fab settings hosts ip N/A N/A N/A fab_execute N/A fab_deploy setup_fab_dir N/A N/A __install_cstar_perf_tool cluster_name N/A host ip mount_host_src mount_host_src first_cassandra_node 0 setup_cassandra N/A N/A N/A N/A N/A N/A __update_node_ip_addresses cluster_name static_ips N/A host 127.0.0.1 N/A N/A N/A fab run cstar_perf_bootstrap -v cassandra-2.1.8 N/A N/A N/A N/A fab settings hosts ip N/A N/A N/A fab_execute setup_cassandra setup_boot_items N/A N/A N/A N/A N/A boot_items N/A N/A join N/A [program:cassandra] command=/home/cstar/fab/cassandra/bin/cassandra -f priority=1 user=cstar autostart=true autorestart=false redirect_stderr=true [program:cstar_perf_notifications] command=cstar_perf_notifications -F priority=1 user=cstar autostart=true autorestart=true startretries=30 redirect_stderr=true [program:cstar_perf_server] command=cstar_perf_server priority=2 user=cstar environment=HOME=/home/cstar autostart=true startretries=30 autorestart=true redirect_stderr=true N/A N/A fab_append /supervisord.conf boot_items N/A N/A N/A N/A fab settings hosts ip user root N/A N/A N/A fab_execute setup_boot_items N/A N/A fab_execute N/A fab_deploy install_cstar_perf_frontend N/A N/A N/A fab settings hosts ip N/A N/A N/A fab_execute N/A fab_deploy generate_frontend_credentials N/A N/A N/A subprocess call N/A N/A shlex split N/A N/A docker restart {} format host N/A N/A frontend_name frontend_ip N/A N/A get_ips cluster_name N/A 0 N/A N/A N/A fab settings hosts frontend_ip N/A N/A N/A fab_execute N/A fab_deploy create_default_frontend_users N/A N/A N/A log info cstar_perf service started, opening in your browser: http://localhost:8000 N/A N/A N/A webbrowser open http://localhost:8000 N/A N/A N/A log info Log in with email: admin@example.com and password: admin N/A N/A N/A log info You will need to use the 'cstar_docker associate' command to link up a cluster N/A __install_cstar_perf_tool N/A N/A cluster_name hosts mount_host_src first_cassandra_node N/A False None N/A N/A first_node N/A N/A N/A hosts values N/A 0 N/A other_nodes N/A N/A N/A hosts values N/A 1 N/A N/A first_cassandra_node None N/A N/A N/A N/A len hosts 1 N/A N/A first_cassandra_node 1 N/A N/A first_cassandra_node 0 N/A cluster_config N/A block_devices blockdev_readahead hosts name stress_node user data_file_directories commitlog_directory saved_caches_directory docker N/A None N/A host N/A hostname internal_ip external_ip seed datacenter host ip ip True dc1 N/A N/A host ip N/A N/A N/A hosts items N/A first_cassandra_node cluster_name first_node cstar N/A /data/cstar_perf/data /data/cstar_perf/commitlog /data/cstar_perf/saved_caches True N/A N/A N/A fab settings hosts first_node N/A N/A N/A fab_execute N/A fab_deploy copy_cluster_config cluster_config N/A N/A N/A fab settings hosts first_node N/A N/A N/A fab_execute N/A fab_deploy setup_fab_dir N/A N/A fab_execute N/A fab_deploy install_cstar_perf_tool N/A N/A fab_execute N/A fab_deploy install_cstar_perf_frontend N/A N/A N/A len other_nodes 0 N/A N/A N/A N/A fab settings hosts other_nodes N/A N/A N/A fab_execute N/A fab_deploy copy_fab_dir first_node N/A info N/A N/A cluster_name N/A N/A N/A clusters N/A get_clusters cluster_name all_metadata True N/A containers N/A clusters N/A cluster_name N/A node_names N/A N/A n N/A Name N/A n containers N/A N/A N/A len containers 0 N/A N/A N/A N/A No cluster named {} found format cluster_name N/A N/A N/A N/A Cluster: {}, {} nodes format cluster_name N/A len node_names N/A N/A n node_name N/A enumerate node_names N/A N/A data N/A containers N/A n N/A N/A N/A data N/A State N/A Running N/A N/A N/A N/A     {} : {} format node_name N/A N/A data N/A NetworkSettings N/A IPAddress N/A N/A N/A N/A     {} : offline format node_name N/A destroy N/A N/A cluster_regex N/A N/A N/A Destroy clusters N/A clusters N/A get_clusters cluster_regex N/A N/A cluster containers N/A N/A clusters items N/A N/A N/A N/A len containers 0 N/A N/A N/A N/A log info N/A N/A Destroying {} containers... format cluster_regex N/A container containers N/A N/A destroy_cmd N/A N/A shlex split N/A N/A docker rm -f {} format container N/A N/A N/A subprocess call destroy_cmd stdout N/A subprocess PIPE stderr N/A subprocess PIPE N/A associate N/A N/A frontend_name cluster_names with_dse N/A False N/A N/A N/A N/A frontend N/A N/A N/A get_clusters frontend_name all_metadata True N/A frontend_name N/A 0 N/A N/A N/A IndexError N/A N/A N/A ValueError N/A N/A No frontend cluster named {} found format frontend_name N/A clusters N/A N/A c cluster_names N/A N/A N/A N/A cluster N/A N/A N/A get_clusters c all_metadata True N/A c N/A 0 N/A N/A N/A IndexError N/A N/A N/A ValueError N/A N/A No cluster named {} found format c N/A N/A N/A clusters append cluster N/A frontend_ip N/A N/A frontend N/A NetworkSettings N/A IPAddress N/A N/A N/A fab settings hosts frontend_ip N/A N/A frontend_credentials N/A N/A N/A N/A fab_execute N/A fab_deploy get_frontend_credentials values N/A 0 N/A cluster clusters N/A N/A cluster cluster N/A cluster_name N/A N/A N/A cluster N/A Config N/A Labels N/A cluster_name N/A nodes N/A N/A N/A get_clusters c N/A cluster_name N/A 1 N/A cluster_ip N/A N/A cluster N/A NetworkSettings N/A IPAddress N/A N/A N/A fab settings hosts cluster_ip N/A N/A N/A fab_execute N/A fab_deploy generate_client_credentials cluster_name N/A frontend_credentials N/A public_key N/A frontend_credentials N/A verify_code N/A cluster_credentials N/A N/A N/A N/A fab_execute N/A fab_deploy get_client_credentials values N/A 0 N/A jvms N/A N/A N/A N/A fab_execute N/A fab_deploy get_client_jvms values N/A 0 N/A N/A N/A fab settings hosts frontend_ip N/A N/A N/A fab_execute N/A fab_deploy add_cluster_to_frontend cluster_name nodes N/A cluster_credentials N/A public_key N/A jvm jvms N/A N/A N/A fab_execute N/A fab_deploy add_jvm_to_cluster cluster_name jvm N/A with_dse N/A N/A N/A fab_execute N/A fab_deploy add_product_to_cluster cluster_name dse N/A N/A N/A fab settings hosts cluster_ip user root N/A N/A N/A fab_execute N/A tasks setup_client_daemon N/A frontend N/A Name N/A N/A fab_execute N/A tasks add_or_update_host_ips N/A N/A N/A frontend N/A Name frontend_ip N/A enable_dse N/A N/A cluster_name dse_url dse_username dse_password dse_source_build_artifactory_url dse_source_build_artifactory_username dse_source_build_artifactory_password dse_source_build_oauth_token N/A N/A N/A N/A N/A cluster N/A N/A N/A get_clusters cluster_name all_metadata True N/A cluster_name N/A 0 N/A N/A N/A IndexError N/A N/A N/A ValueError N/A N/A No cluster named {} found format cluster_name N/A cluster_ip N/A N/A cluster N/A NetworkSettings N/A IPAddress N/A N/A N/A fab settings hosts cluster_ip N/A N/A N/A fab_execute N/A fab_deploy enable_dse dse_url dse_username dse_password dse_source_build_artifactory_url dse_source_build_artifactory_username dse_source_build_artifactory_password dse_source_build_oauth_token N/A N/A N/A fab settings hosts cluster_ip user root N/A N/A N/A fab_execute N/A tasks restart_all_services N/A __update_node_ip_addresses N/A N/A cluster_name static_ips N/A None N/A N/A Update node ip addresses

    This is necessary because docker assigns new IP addresses each time a container is restarted

    if static_ips is provided, interpret as a dictionary mapping hosts to ips.
     N/A clusters N/A get_clusters cluster_name all_metadata True N/A cluster N/A clusters N/A cluster_name N/A current_ips N/A dict N/A N/A N/A c N/A Name N/A N/A c N/A NetworkSettings N/A IPAddress N/A c cluster N/A static_ips N/A N/A updated_ips static_ips N/A N/A updated_ips current_ips N/A node0 N/A N/A cluster N/A 0 N/A Name N/A N/A N/A fab settings hosts N/A current_ips N/A node0 N/A get_cluster_config N/A N/A N/A N/A N/A cfg N/A StringIO N/A N/A N/A fab get ~/.cstar_perf/cluster_config.json cfg N/A N/A N/A cfg seek 0 N/A N/A N/A json load cfg N/A N/A cluster_config N/A N/A N/A N/A fab_execute get_cluster_config values N/A 0 N/A N/A host cfg N/A N/A N/A cluster_config N/A hosts items N/A N/A N/A N/A N/A cluster_config N/A hosts N/A host N/A internal_ip N/A N/A N/A cluster_config N/A hosts N/A host N/A external_ip N/A updated_ips N/A host N/A N/A cluster_config N/A stress_node N/A updated_ips N/A node0 N/A N/A N/A fab settings hosts N/A N/A N/A cluster N/A 0 N/A NetworkSettings N/A IPAddress N/A put_cluster_config N/A N/A N/A N/A N/A cfg N/A StringIO N/A N/A N/A json dump cluster_config cfg indent 2 N/A N/A N/A fab put cfg ~/.cstar_perf/cluster_config.json N/A N/A N/A fab_execute put_cluster_config N/A hosts N/A N/A clusters N/A get_clusters all all_metadata True N/A cluster_name N/A N/A clusters keys N/A N/A N/A N/A hosts extend N/A get_ips cluster_name N/A N/A N/A fab settings hosts N/A ip N/A N/A host ip hosts user root N/A N/A N/A fab_execute N/A tasks add_or_update_host_ips hosts N/A N/A fab_execute N/A tasks restart_all_services N/A start N/A N/A cluster_name N/A N/A N/A start cluster N/A clusters N/A get_clusters cluster_name N/A cluster N/A clusters N/A cluster_name N/A container cluster N/A N/A start_cmd N/A N/A shlex split N/A N/A docker start {} format container N/A N/A N/A subprocess call start_cmd stdout N/A subprocess PIPE stderr N/A subprocess PIPE N/A N/A __update_node_ip_addresses cluster_name N/A stop N/A N/A cluster_name N/A N/A N/A stop cluster N/A clusters N/A get_clusters cluster_name N/A cluster N/A clusters N/A cluster_name N/A container cluster N/A N/A stop_cmd N/A N/A shlex split N/A N/A docker stop {} format container N/A N/A N/A subprocess call stop_cmd stdout N/A subprocess PIPE stderr N/A subprocess PIPE N/A list_clusters N/A N/A N/A N/A N/A List clusters N/A clusters N/A get_clusters all all_metadata True N/A N/A cluster containers N/A N/A clusters items N/A N/A N/A N/A {name}, {num_nodes} node{plural} ({cluster_type}) format name cluster num_nodes N/A len containers cluster_type N/A N/A N/A N/A containers N/A 0 N/A Config N/A Labels N/A cluster_type plural N/A N/A N/A len containers 1 s N/A ssh N/A N/A cluster_name node user ssh_key_path N/A cstar N/A N/A N/A os path join N/A N/A N/A os path expanduser ~ .ssh id_rsa N/A N/A clusters N/A get_clusters cluster_name all_metadata True N/A containers N/A clusters N/A cluster_name N/A node_names N/A N/A c N/A Name N/A c containers N/A N/A N/A len containers 0 N/A N/A N/A N/A No cluster named {} found format cluster_name N/A N/A N/A N/A N/A N/A containers N/A node N/A State N/A Running False N/A N/A N/A N/A log error N/A N/A Node is not running. Try starting the cluster: cstar_docker start {} format cluster_name N/A N/A command N/A ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=%s -o User=%s -i %s %s N/A N/A os devnull user N/A N/A get_ssh_key_pair N/A 0 N/A N/A N/A containers N/A node N/A NetworkSettings N/A IPAddress N/A proc N/A N/A subprocess Popen command shell True N/A N/A N/A proc wait N/A execute_cmd N/A N/A cmd args N/A N/A N/A N/A cmd launch N/A N/A N/A N/A N/A check_cluster_exists N/A args name N/A args destroy_existing N/A N/A N/A N/A N/A launch N/A args num_nodes cluster_name N/A args name destroy_existing N/A args destroy_existing install_tool N/A N/A args no_install mount_host_src N/A args mount verbose True client_double_duty N/A args client_double_duty N/A N/A N/A N/A N/A destroy N/A args name N/A N/A N/A N/A N/A log error N/A N/A Cannot launch cluster '{}' as it already exists. format N/A args name N/A N/A N/A log error You must destroy the existing cluster, or use --destroy-existing in your launch command N/A N/A exit 1 N/A N/A N/A cmd frontend N/A N/A N/A N/A N/A check_cluster_exists N/A args name N/A args destroy_existing N/A N/A N/A N/A N/A launch 1 cluster_name N/A args name destroy_existing N/A args destroy_existing frontend True client_double_duty True mount_host_src N/A args mount verbose True N/A N/A N/A N/A N/A destroy N/A args name N/A N/A N/A N/A N/A log error N/A N/A Cannot launch cluster '{}' as it already exists. format N/A args name N/A N/A N/A log error You must destroy the existing cluster, or use --destroy-existing in your launch command N/A N/A exit 1 N/A N/A N/A cmd associate N/A N/A N/A associate N/A args frontend N/A args clusters with_dse N/A args with_dse N/A N/A N/A cmd start N/A N/A N/A start cluster_name N/A args name N/A N/A N/A cmd stop N/A N/A N/A stop cluster_name N/A args name N/A N/A N/A cmd restart N/A N/A N/A stop cluster_name N/A args name N/A N/A start cluster_name N/A args name N/A N/A N/A cmd destroy N/A N/A N/A destroy N/A args cluster_regex N/A N/A N/A cmd list N/A N/A N/A list_clusters N/A N/A N/A cmd info N/A N/A N/A info N/A args cluster_name N/A N/A N/A cmd ssh N/A N/A N/A ssh N/A args cluster_name N/A args node user N/A args login_name N/A N/A N/A cmd build N/A N/A N/A build_docker_image force N/A args force N/A N/A N/A cmd enable_dse N/A N/A N/A enable_dse N/A args frontend N/A args dse_repo_url N/A args dse_repo_username N/A args dse_repo_password N/A args dse_source_build_artifactory_url N/A args dse_source_build_artifactory_username N/A args dse_source_build_artifactory_password N/A args dse_source_build_oauth_token N/A N/A N/A AssertionError N/A N/A Unknown command: {cmd} format cmd cmd N/A main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description cstar_docker.py - Interact with cstar_perf docker clusters formatter_class N/A argparse RawDescriptionHelpFormatter N/A parser_subparsers N/A N/A parser add_subparsers dest command N/A launch N/A N/A parser_subparsers add_parser launch description Launch a cluster with the given name and number of nodes N/A N/A N/A launch add_argument name help The name of the cluster N/A N/A N/A launch add_argument num_nodes type int help The number of Cassandra nodes to launch N/A N/A N/A launch add_argument -c --client-double-duty action store_true help Use node 00 as another Cassandra node, in addition to running the client N/A N/A N/A launch add_argument --no-install help Don't install cstar_perf.tool action store_true N/A N/A N/A launch add_argument -m --mount help Mount the host system's cstar_perf checkout rather than install from github action store_true N/A N/A N/A launch add_argument --destroy-existing help Destroy any existing cluster with the same name before launching action store_true N/A frontend N/A N/A parser_subparsers add_parser frontend description Launch a single node frontend instance N/A N/A N/A frontend add_argument name help The name of the frontend node N/A N/A N/A frontend add_argument -m --mount help Mount the host system's cstar_perf checkout rather than install from github action store_true N/A N/A N/A frontend add_argument --destroy-existing help Destroy any existing cluster with the same name before launching action store_true N/A associate N/A N/A parser_subparsers add_parser associate description Hook up one or more clusters to a cluster N/A N/A N/A associate add_argument frontend help The name of the frontend cluster N/A N/A N/A associate add_argument clusters help The names of the clusters to hook up to the frontend nargs + N/A N/A N/A associate add_argument --with-dse help Enable DSE product for this cluster action store_true default False N/A destroy N/A N/A parser_subparsers add_parser destroy description Destroy clusters - specify a regex of cluster names to destroy, or specify 'all' to destroy all clusters created N/A N/A N/A destroy add_argument cluster_regex help The regex of the names of clusters to destroy N/A list_clusters N/A N/A parser_subparsers add_parser list description List clusters N/A info N/A N/A parser_subparsers add_parser info description Print cluster information N/A N/A N/A info add_argument cluster_name help The name of the cluster N/A ssh N/A N/A parser_subparsers add_parser ssh description SSH to cluster node N/A N/A N/A ssh add_argument cluster_name help The name of the cluster N/A N/A N/A ssh add_argument node help The node number type int nargs ? default 0 N/A N/A N/A ssh add_argument -l --login_name help User to login as (default: cstar) default cstar N/A build N/A N/A parser_subparsers add_parser build description Build the Docker image N/A N/A N/A build add_argument -f --force help Force building the image by removing any existing image first action store_true N/A start N/A N/A parser_subparsers add_parser start description Start an existing cluster N/A N/A N/A start add_argument name help The name of the cluster to start N/A stop N/A N/A parser_subparsers add_parser stop description Stop an existing cluster N/A N/A N/A stop add_argument name help The name of the cluster to stop N/A restart N/A N/A parser_subparsers add_parser restart description Restart an existing cluster N/A N/A N/A restart add_argument name help The name of the cluster to restart N/A enable_dse N/A N/A parser_subparsers add_parser enable_dse description Enable DSE support N/A N/A N/A enable_dse add_argument frontend help The name of the frontend node N/A N/A N/A enable_dse add_argument dse_repo_url help DSE Tarball Repo url N/A N/A N/A enable_dse add_argument dse_repo_username nargs ? default None help DSE Tarball Repo username N/A N/A N/A enable_dse add_argument dse_repo_password nargs ? default None help DSE Tarball Repo password N/A N/A N/A enable_dse add_argument dse_source_build_artifactory_url nargs ? default None help DSE Artifactory URL N/A N/A N/A enable_dse add_argument dse_source_build_artifactory_username nargs ? default None help DSE Artifactory username N/A N/A N/A enable_dse add_argument dse_source_build_artifactory_password nargs ? default None help DSE Artifactory password N/A N/A N/A enable_dse add_argument dse_source_build_oauth_token nargs ? default None help DSE OAuth token for accessing GitHub Repo N/A N/A N/A args N/A N/A parser parse_args N/A N/A N/A N/A len N/A sys argv 1 N/A N/A N/A N/A parser print_help N/A N/A check_docker_version N/A N/A execute_cmd N/A args command args N/A N/A N/A N/A fab env key_filename N/A N/A get_ssh_key_pair N/A 0 N/A N/A __name__ __main__ N/A N/A N/A main