Module Import alias json ImportFrom tastypie alias fields ImportFrom tastypie.resources alias Resource ImportFrom corehq.apps.api.resources.v0_1 alias CustomResourceMeta alias LoginAndDomainAuthentication ImportFrom corehq.apps.api.util alias get_object_or_not_exist ImportFrom corehq.apps.api.resources alias HqBaseResource ImportFrom corehq.apps.users.models alias WebUser ImportFrom corehq.util.quickcache alias quickcache ImportFrom models alias Location alias SQLLocation FunctionDef _user_locations_ids arguments args NameParam user NameParam project NameParam only_editable defaults body FunctionDef all_ids arguments args defaults body Return Call AttributeLoad Call AttributeLoad NameLoad SQLLocation attr by_domain AttributeLoad NameLoad project attr name attr values_list Str location_id keyword flat NameLoad True decorator_list If BoolOpOr Call AttributeLoad NameLoad user attr is_domain_admin AttributeLoad NameLoad project attr name UnaryOpNot AttributeLoad NameLoad project attr location_restriction_for_users body Return Call NameLoad all_ids Assign NameStore user_loc IfExp Call NameLoad isinstance NameLoad user NameLoad WebUser Call AttributeLoad NameLoad user attr get_location AttributeLoad NameLoad project attr name AttributeLoad NameLoad user attr location If UnaryOpNot NameLoad user_loc body Return Call NameLoad all_ids Assign NameStore editable Call NameLoad list Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad user_loc attr sql_location attr get_descendants keyword include_self NameLoad True attr values_list Str location_id keyword flat NameLoad True If NameLoad only_editable body Return NameLoad editable orelse Assign NameStore viewable Call NameLoad list Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad user_loc attr sql_location attr get_ancestors attr values_list Str location_id keyword flat NameLoad True Return BinOpAdd NameLoad viewable NameLoad editable decorator_list Call NameLoad quickcache ListLoad Str user._id Str project.name Str only_editable keyword timeout Num 10 ClassDef LocationResource bases NameLoad HqBaseResource body Assign NameStore type Str location Assign NameStore uuid Call AttributeLoad NameLoad fields attr CharField keyword attribute Str location_id keyword readonly NameLoad True keyword unique NameLoad True Assign NameStore location_type Call AttributeLoad NameLoad fields attr CharField keyword attribute Str location_type keyword readonly NameLoad True Assign NameStore is_archived Call AttributeLoad NameLoad fields attr BooleanField keyword attribute Str is_archived keyword readonly NameLoad True Assign NameStore can_edit Call AttributeLoad NameLoad fields attr BooleanField keyword readonly NameLoad True Assign NameStore name Call AttributeLoad NameLoad fields attr CharField keyword attribute Str name keyword readonly NameLoad True keyword unique NameLoad True FunctionDef obj_get arguments args NameParam self NameParam bundle defaults kwarg kwargs body Assign NameStore domain SubscriptLoad NameLoad kwargs Index Str domain Assign NameStore location_id SubscriptLoad NameLoad kwargs Index Str pk Return Call NameLoad get_object_or_not_exist NameLoad Location NameLoad location_id NameLoad domain decorator_list FunctionDef child_queryset arguments args NameParam self NameParam domain NameParam include_inactive NameParam parent defaults body Return Call AttributeLoad AttributeLoad NameLoad parent attr sql_location attr child_locations NameLoad include_inactive decorator_list FunctionDef obj_get_list arguments args NameParam self NameParam bundle defaults kwarg kwargs body Assign NameStore domain SubscriptLoad NameLoad kwargs Index Str domain Assign NameStore project AttributeLoad AttributeLoad NameLoad bundle attr request attr project Assign NameStore parent_id Call AttributeLoad AttributeLoad AttributeLoad NameLoad bundle attr request attr GET attr get Str parent_id NameLoad None Assign NameStore include_inactive Call AttributeLoad NameLoad json attr loads Call AttributeLoad AttributeLoad AttributeLoad NameLoad bundle attr request attr GET attr get Str include_inactive Str false Assign NameStore user AttributeLoad AttributeLoad NameLoad bundle attr request attr couch_user Assign NameStore viewable Call NameLoad _user_locations_ids NameLoad user NameLoad project keyword only_editable NameLoad False If UnaryOpNot NameLoad parent_id body Assign NameStore locs Call AttributeLoad NameLoad SQLLocation attr root_locations NameLoad domain NameLoad include_inactive orelse Assign NameStore parent Call NameLoad get_object_or_not_exist NameLoad Location NameLoad parent_id NameLoad domain Assign NameStore locs Call AttributeLoad NameLoad self attr child_queryset NameLoad domain NameLoad include_inactive NameLoad parent Return ListComp NameLoad child comprehension NameStore child NameLoad locs CompareIn AttributeLoad NameLoad child attr location_id NameLoad viewable decorator_list FunctionDef dehydrate_can_edit arguments args NameParam self NameParam bundle defaults body Assign NameStore editable_ids Call NameLoad _user_locations_ids AttributeLoad AttributeLoad NameLoad bundle attr request attr couch_user AttributeLoad AttributeLoad NameLoad bundle attr request attr project keyword only_editable NameLoad True Return CompareIn AttributeLoad AttributeLoad NameLoad bundle attr obj attr location_id NameLoad editable_ids decorator_list ClassDef Meta bases NameLoad CustomResourceMeta body Assign NameStore authentication Call NameLoad LoginAndDomainAuthentication Assign NameStore object_class NameLoad Location Assign NameStore resource_name Str location Assign NameStore limit Num 0 decorator_list decorator_list ClassDef InternalLocationResource bases NameLoad LocationResource body FunctionDef dispatch arguments args NameParam self NameParam request_type NameParam request defaults kwarg kwargs body Return Call AttributeLoad NameLoad Resource attr dispatch NameLoad self NameLoad request_type NameLoad request NameLoad kwargs decorator_list ClassDef Meta bases NameLoad CustomResourceMeta body Assign NameStore authentication Call NameLoad LoginAndDomainAuthentication Assign NameStore object_class NameLoad Location Assign NameStore resource_name Str location_internal Assign NameStore limit Num 0 decorator_list decorator_list 
Module Import alias logcabin Import alias sys Import alias os Import alias json Import alias gevent Import alias gevent.event Import alias gevent.monkey Expr Call AttributeLoad AttributeLoad NameLoad gevent attr monkey attr patch_all Import alias logging Import alias logging.config Import alias signal Import alias optparse ImportFrom util alias ConfigException ImportFrom configuration alias PyConfigLoader ClassDef LogCabin bases NameLoad object body Expr Str Main-application-object FunctionDef setup arguments args NameParam self defaults body Expr Str Application-setup Expr Call AttributeLoad NameLoad self attr _setup_args Expr Call AttributeLoad NameLoad self attr _setup_logging Expr Call AttributeLoad NameLoad self attr _setup_config Expr Call AttributeLoad NameLoad self attr _setup_signals decorator_list FunctionDef _setup_logging arguments args NameParam self defaults body Expr Call AttributeLoad AttributeLoad NameLoad logging attr config attr dictConfig AttributeLoad NameLoad self attr logconfig Assign AttributeStore NameLoad self attr logger Call AttributeLoad NameLoad logging attr getLogger Str main decorator_list FunctionDef _setup_config arguments args NameParam self defaults body Assign AttributeStore NameLoad self attr config Call NameLoad PyConfigLoader AttributeLoad AttributeLoad NameLoad self attr opts attr config Expr Call AttributeLoad AttributeLoad NameLoad self attr config attr configure Assign AttributeStore NameLoad self attr pipeline AttributeLoad AttributeLoad NameLoad self attr config attr pipeline decorator_list FunctionDef _setup_args arguments args NameParam self defaults body Assign NameStore parser Call AttributeLoad NameLoad optparse attr OptionParser Expr Call AttributeLoad NameLoad parser attr add_option Str -v Str --verbose keyword action Str store_true keyword help Str Verbose-logging-(debug) Expr Call AttributeLoad NameLoad parser attr add_option Str -l Str --log keyword help Str Log-to-the-given-log-file keyword default Str logcabin.log Expr Call AttributeLoad NameLoad parser attr add_option Str -c Str --config keyword help Str Configuration-file-to-use keyword default Str config.py Assign TupleStore NameStore opts NameStore args Call AttributeLoad NameLoad parser attr parse_args Assign NameStore logging_cfg Call AttributeLoad AttributeLoad NameLoad os attr path attr join Call AttributeLoad AttributeLoad NameLoad os attr path attr dirname NameLoad __file__ Str logging.cfg Assign AttributeStore NameLoad self attr logconfig Call AttributeLoad NameLoad json attr load Call NameLoad file NameLoad logging_cfg Assign NameStore logpath Call AttributeLoad AttributeLoad NameLoad os attr path attr abspath AttributeLoad NameLoad opts attr log Assign SubscriptStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad self attr logconfig Index Str handlers Index Str file Index Str filename NameLoad logpath If AttributeLoad NameLoad opts attr verbose body Assign NameStore root SubscriptLoad SubscriptLoad AttributeLoad NameLoad self attr logconfig Index Str loggers Index Str null Expr Call AttributeLoad SubscriptLoad NameLoad root Index Str handlers attr append Str console Assign SubscriptStore NameLoad root Index Str level Str DEBUG orelse Print BinOpMod Str Logging-to-%s NameLoad logpath Assign AttributeStore NameLoad self attr opts NameLoad opts decorator_list FunctionDef _setup_signals arguments args NameParam self defaults body Assign AttributeStore NameLoad self attr shutdown Call AttributeLoad AttributeLoad NameLoad gevent attr event attr Event Expr Call AttributeLoad NameLoad gevent attr signal AttributeLoad NameLoad signal attr SIGTERM AttributeLoad NameLoad self attr _signal Str SIGTERM Expr Call AttributeLoad NameLoad gevent attr signal AttributeLoad NameLoad signal attr SIGINT AttributeLoad NameLoad self attr _signal Str SIGINT decorator_list FunctionDef _signal arguments args NameParam self NameParam name defaults body Expr Call AttributeLoad AttributeLoad NameLoad self attr logger attr info BinOpMod Str %s-received,-shutting-down NameLoad name Expr Call AttributeLoad AttributeLoad NameLoad self attr shutdown attr set decorator_list FunctionDef start arguments args NameParam self defaults body Expr Str Start-the-pipeline. Expr Call AttributeLoad AttributeLoad NameLoad self attr pipeline attr start Expr Call AttributeLoad AttributeLoad NameLoad self attr logger attr info BinOpMod Str Started-pipeline:-%s AttributeLoad NameLoad self attr pipeline decorator_list FunctionDef stop arguments args NameParam self defaults body Expr Str Stop-the-pipeline. Expr Call AttributeLoad AttributeLoad NameLoad self attr logger attr info Str Stopping-pipeline Expr Call AttributeLoad AttributeLoad NameLoad self attr pipeline attr stop decorator_list FunctionDef run arguments args NameParam self defaults body Expr Str Run-the-whole-application,-then-wait-on-termination-by-signal. TryExcept body Expr Call AttributeLoad NameLoad self attr setup handlers ExceptHandler type NameLoad ConfigException name NameStore ex body Expr Call AttributeLoad AttributeLoad NameLoad self attr logger attr error Call NameLoad str NameLoad ex Print AttributeLoad NameLoad sys attr stderr Call NameLoad str NameLoad ex Return NameLoad False Expr Call AttributeLoad NameLoad self attr start Expr Call AttributeLoad AttributeLoad NameLoad self attr shutdown attr wait Expr Call AttributeLoad NameLoad self attr stop Expr Call AttributeLoad AttributeLoad NameLoad self attr logger attr info Str Shutdown-complete Return NameLoad True decorator_list decorator_list If CompareEq NameLoad __name__ Str __main__ body Expr Call AttributeLoad NameLoad logcabin attr main 
Module Import alias logging ImportFrom celery alias Celery ImportFrom django.conf alias settings ImportFrom django.contrib.auth alias login ImportFrom django.contrib.auth.models alias User ImportFrom django.contrib.sites.models alias Site ImportFrom django.core.exceptions alias ObjectDoesNotExist ImportFrom django.http alias HttpRequest ImportFrom django.utils.importlib alias import_module ImportFrom djblets.siteconfig.models alias SiteConfiguration ImportFrom djblets.webapi.resources alias register_resource_for_model alias unregister_resource_for_model ImportFrom reviewboard.extensions.base alias Extension ImportFrom reviewbotext.handlers alias SignalHandlers ImportFrom reviewbotext.models alias Profile alias ToolExecution ImportFrom reviewbotext.resources alias review_bot_review_resource alias tool_executable_resource alias tool_execution_resource alias tool_resource ClassDef ReviewBotExtension bases NameLoad Extension body Expr Str An-extension-for-communicating-with-Review-Bot. Assign NameStore metadata Dict Str Name Str Summary Str Author Str Author-URL Str Review-Bot Str Performs-automated-analysis-and-review-on-code-posted-to-Review-Board. Str Review-Board Str http://www.reviewboard.org/ Assign NameStore is_configurable NameLoad True Assign NameStore has_admin_site NameLoad True Assign NameStore resources ListLoad NameLoad review_bot_review_resource NameLoad tool_resource NameLoad tool_execution_resource NameLoad tool_executable_resource Assign NameStore default_settings Dict Str ship_it Str comment_unmodified Str open_issues Str BROKER_URL Str user Str max_comments NameLoad False NameLoad False NameLoad False Str null NameLoad None Num 30 FunctionDef initialize arguments args NameParam self defaults body Expr Str Initializes-the-extension. Expr Call NameLoad register_resource_for_model NameLoad ToolExecution NameLoad tool_execution_resource Assign AttributeStore NameLoad self attr celery Call NameLoad Celery Str reviewbot.tasks Expr Call NameLoad SignalHandlers NameLoad self decorator_list FunctionDef shutdown arguments args NameParam self defaults vararg args kwarg kwargs body Expr Str Shuts-down-the-extension. Expr Call NameLoad unregister_resource_for_model NameLoad ToolExecution Expr Call AttributeLoad Call NameLoad super NameLoad ReviewBotExtension NameLoad self attr shutdown decorator_list FunctionDef notify arguments args NameParam self NameParam request_payload defaults body Expr Str Initiates-a-review-by-placing-a-message-on-the-message-queue. Assign AttributeStore AttributeLoad AttributeLoad NameLoad self attr celery attr conf attr BROKER_URL SubscriptLoad AttributeLoad NameLoad self attr settings Index Str BROKER_URL Assign NameStore review_settings Dict Str max_comments SubscriptLoad AttributeLoad NameLoad self attr settings Index Str max_comments Assign NameStore payload Dict Str request Str review_settings Str session Str url NameLoad request_payload NameLoad review_settings Call AttributeLoad NameLoad self attr _login_user SubscriptLoad AttributeLoad NameLoad self attr settings Index Str user Call AttributeLoad NameLoad self attr _rb_url If CompareIn Str tool_profile_id NameLoad request_payload body Assign NameStore tool_profile_id Call AttributeLoad NameLoad request_payload attr get Str tool_profile_id TryExcept body Assign NameStore profile Call AttributeLoad AttributeLoad NameLoad Profile attr objects attr get keyword pk NameLoad tool_profile_id handlers ExceptHandler type NameLoad ObjectDoesNotExist body Expr Call AttributeLoad NameLoad logging attr error Str Error:-Profile-%s-does-not-exist. NameLoad tool_profile_id Return orelse Expr Call AttributeLoad NameLoad logging attr error Str Error:-Tool-profile-ID-must-be-specified. Return Assign SubscriptStore NameLoad review_settings Index Str ship_it AttributeLoad NameLoad profile attr ship_it Assign SubscriptStore NameLoad review_settings Index Str comment_unmodified AttributeLoad NameLoad profile attr comment_unmodified Assign SubscriptStore NameLoad review_settings Index Str open_issues AttributeLoad NameLoad profile attr open_issues Assign SubscriptStore NameLoad payload Index Str review_settings NameLoad review_settings TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad self attr celery attr send_task Str reviewbot.tasks.ProcessReviewRequest ListLoad NameLoad payload AttributeLoad NameLoad profile attr tool_settings keyword queue BinOpMod Str %s.%s TupleLoad AttributeLoad AttributeLoad NameLoad profile attr tool attr entry_point AttributeLoad AttributeLoad NameLoad profile attr tool attr version handlers ExceptHandler body Raise decorator_list FunctionDef _login_user arguments args NameParam self NameParam user_id defaults body Expr Str Log-in-as-the-specified-user.--------This-does-not-depend-on-the-auth-backend-(hopefully).-This-is-based-on--------Client.login()-with-a-small-hack-that-does-not-require-the-call-to--------authenticate().--------Will-return-the-session-ID-of-the-login. Assign NameStore user Call AttributeLoad AttributeLoad NameLoad User attr objects attr get keyword pk NameLoad user_id Assign AttributeStore NameLoad user attr backend Str reviewboard.accounts.backends.StandardAuthBackend Assign NameStore engine Call NameLoad import_module AttributeLoad NameLoad settings attr SESSION_ENGINE Assign NameStore request Call NameLoad HttpRequest Assign AttributeStore NameLoad request attr session Call AttributeLoad NameLoad engine attr SessionStore Expr Call NameLoad login NameLoad request NameLoad user Expr Call AttributeLoad AttributeLoad NameLoad request attr session attr save Return AttributeLoad AttributeLoad NameLoad request attr session attr session_key decorator_list FunctionDef send_refresh_tools arguments args NameParam self defaults body Expr Str Request-workers-to-update-tool-list. Assign AttributeStore AttributeLoad AttributeLoad NameLoad self attr celery attr conf attr BROKER_URL SubscriptLoad AttributeLoad NameLoad self attr settings Index Str BROKER_URL Assign NameStore payload Dict Str session Str url Call AttributeLoad NameLoad self attr _login_user SubscriptLoad AttributeLoad NameLoad self attr settings Index Str user Call AttributeLoad NameLoad self attr _rb_url Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad self attr celery attr control attr broadcast Str update_tools_list keyword payload NameLoad payload decorator_list FunctionDef _rb_url arguments args NameParam self defaults body Expr Str Returns-a-valid-reviewbot-URL-including-HTTP-protocol. Assign NameStore protocol Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad SiteConfiguration attr objects attr get_current attr get Str site_domain_method Assign NameStore domain AttributeLoad Call AttributeLoad AttributeLoad NameLoad Site attr objects attr get_current attr domain Return BinOpMod Str %s://%s%s TupleLoad NameLoad protocol NameLoad domain AttributeLoad NameLoad settings attr SITE_ROOT decorator_list decorator_list 
Module Import alias logging Import alias sys Assign NameStore logger Call AttributeLoad NameLoad logging attr getLogger Str deploy:base Expr Call AttributeLoad NameLoad logger attr setLevel AttributeLoad NameLoad logging attr INFO FunctionDef import_class arguments args NameParam module_name defaults body Expr Str Import-a-module-with-a-reasonable-traceback-and-return-that-module-as-the----variable.----eg.-dumps-=-import_class('simplejson.dumps')----if-dumps-is-None:--------dumps-=-import_class('json.dumps')----Reference:-http://lucumr.pocoo.org/2011/9/21/python-import-blackbox/----Written-by:-Armin-Ronacher Assign TupleStore NameStore module NameStore klass Call AttributeLoad NameLoad module_name attr rsplit Str . Num 1 TryExcept body Expr Call NameLoad __import__ NameLoad module handlers ExceptHandler type NameLoad ImportError body Assign TupleStore NameStore exc_type NameStore exc_value NameStore tb_root Call AttributeLoad NameLoad sys attr exc_info Expr Call AttributeLoad NameLoad logger attr warning NameLoad exc_type Expr Call AttributeLoad NameLoad logger attr warning NameLoad exc_value Assign NameStore tb NameLoad tb_root While CompareIsNot NameLoad tb NameLoad None body If CompareEq Call AttributeLoad AttributeLoad AttributeLoad NameLoad tb attr tb_frame attr f_globals attr get Str __name__ NameLoad module body Raise NameLoad exc_type NameLoad exc_value NameLoad tb_root Assign NameStore tb AttributeLoad NameLoad tb attr tb_next Return NameLoad None Return Call NameLoad getattr SubscriptLoad AttributeLoad NameLoad sys attr modules Index NameLoad module NameLoad klass decorator_list ClassDef BaseNodeDeployment bases NameLoad object body Expr Str The-base-deployer-object-from-which-all-specialized-deployers-should----inherit.-This-class-defines-the-interface-that-should-be-implemented-by----other-specialized-deployers.----A-``Deployer``-performs-all-of-the-actions-to-create-a-server/node-and----configure-that-node-so-that-a-``Provisioner``-can-handle-SSHing-in-to-that----server-and-actually-configure-packages/directories/services-etc..-A----``Deployer``-does-things-like-spinning-up-ec2-instances,-getting-data-from----backups-to-populate-that-instance,-mounting-EBS-volumes-and-attaching----elastic-IPs. FunctionDef __init__ arguments args NameParam self NameParam deployment NameParam seed_deployment NameParam is_active NameParam aws_type NameParam node_name NameParam seed_node_name NameParam brain_wrinkles NameParam conf NameParam seed_verification defaults NameLoad False vararg args kwarg kwargs body Assign AttributeStore NameLoad self attr deployment NameLoad deployment Assign AttributeStore NameLoad self attr seed_deployment NameLoad seed_deployment Assign AttributeStore NameLoad self attr is_active NameLoad is_active Assign AttributeStore NameLoad self attr aws_type NameLoad aws_type Assign AttributeStore NameLoad self attr node_name NameLoad node_name Assign AttributeStore NameLoad self attr seed_node_name NameLoad seed_node_name Assign AttributeStore NameLoad self attr _conf NameLoad conf Assign AttributeStore NameLoad self attr seed_verification NameLoad seed_verification Assign NameStore brain_wrinkle SubscriptLoad NameLoad brain_wrinkles Index SubscriptLoad Call AttributeLoad NameLoad brain_wrinkles attr keys Index Num 0 Assign NameStore brain_wrinkle_kls Call NameLoad import_class SubscriptLoad NameLoad brain_wrinkle Index Str path If CompareIs NameLoad brain_wrinkle_kls NameLoad None body Expr Call AttributeLoad NameLoad logger attr critical Str No-brain-wrinkle-class-located-at-<%s> SubscriptLoad NameLoad brain_wrinkle Index Str path Expr Call NameLoad exit Num 1 Assign AttributeStore NameLoad self attr node Call AttributeLoad NameLoad self attr get_node Assign AttributeStore NameLoad self attr provisioner Call NameLoad brain_wrinkle_kls keyword node AttributeLoad NameLoad self attr node keyword conf NameLoad conf Call AttributeLoad NameLoad brain_wrinkle attr get Str init Dict Assign AttributeStore NameLoad self attr seed_node NameLoad None If AttributeLoad NameLoad self attr seed_deployment body Assign AttributeStore NameLoad self attr seed_node Call AttributeLoad AttributeLoad NameLoad self attr seed_deployment attr get_active_node AttributeLoad NameLoad self attr aws_type AttributeLoad NameLoad self attr seed_node_name Assign AttributeStore NameLoad self attr initial_deploy_complete NameLoad False decorator_list FunctionDef ensure_node_created arguments args NameParam self defaults body Expr Str Ensure-that-the-node-already-exists,-and-if-it-doesn't,-create-it. If UnaryOpNot AttributeLoad NameLoad self attr node body Expr Call AttributeLoad NameLoad self attr get_seed_data Assign AttributeStore NameLoad self attr node Call AttributeLoad NameLoad self attr create_new_node If AttributeLoad AttributeLoad NameLoad self attr node attr initial_deploy_complete body Assign AttributeStore NameLoad self attr initial_deploy_complete NameLoad True decorator_list FunctionDef run arguments args NameParam self defaults body Expr Call AttributeLoad NameLoad self attr ensure_node_created Expr Call AttributeLoad NameLoad self attr deploy AttributeLoad NameLoad self attr node keyword first_run UnaryOpNot AttributeLoad NameLoad self attr initial_deploy_complete If BoolOpAnd AttributeLoad NameLoad self attr seed_verification UnaryOpNot AttributeLoad NameLoad self attr initial_deploy_complete body Expr Call AttributeLoad NameLoad self attr verify_seed_data AttributeLoad NameLoad self attr node Expr Call AttributeLoad AttributeLoad NameLoad self attr node attr set_initial_deploy_complete decorator_list FunctionDef get_seed_data arguments args NameParam self defaults body Expr Str Gather-the-seed-data-with-which-to-start-the-node.--------EBS-snapshots,-SQL-dumps,-file-archives,-etc. Pass decorator_list FunctionDef verify_seed_data arguments args NameParam self NameParam node defaults body Expr Str Verify-that-the-seed-data-was-properly-loaded. Pass decorator_list FunctionDef wait_until_created arguments args NameParam self NameParam node defaults body Expr Str Sleep/Block-until-this-node-exists-and-can-be-interacted-with. Pass decorator_list FunctionDef creation_complete arguments args NameParam self NameParam node defaults body Expr Str Returns-True-if-the-given-``node``-has-been-created-and-is-ready-for--------interaction. Pass decorator_list FunctionDef create_new_node arguments args NameParam self defaults body Expr Str Actually-instantiate-a-new-node.-This-might-spin-up-an-ec2/rds-instance--------or-provision-a-VM. Pass decorator_list FunctionDef deploy arguments args NameParam self NameParam node NameParam first_run defaults NameLoad False body Expr Str Actually-deploy-against-this-node-using-the-configured-``Provisioner``.--------Package-installation,-code-pushing,-service-restarts-etc.-happen-in--------this-step-via-the-``Provisioner``. Pass decorator_list FunctionDef get_node arguments args NameParam self defaults body Expr Str Get-the-node-to-which-we're-deploying-based-on-the-configured--------deployment-and-generation. If AttributeLoad NameLoad self attr is_active body Return Call AttributeLoad AttributeLoad NameLoad self attr deployment attr get_active_node AttributeLoad NameLoad self attr aws_type AttributeLoad NameLoad self attr node_name orelse Return Call AttributeLoad AttributeLoad NameLoad self attr deployment attr get_pending_node AttributeLoad NameLoad self attr aws_type AttributeLoad NameLoad self attr node_name decorator_list decorator_list 
Module Import alias mimetypes ImportFrom django alias template ImportFrom django.conf alias settings ImportFrom django.contrib alias messages ImportFrom django.contrib.admin alias helpers ImportFrom django.http alias HttpResponse ImportFrom django.shortcuts alias render_to_response ImportFrom django.utils.translation alias ugettext identifier _ Import alias object_tools ImportFrom export alias forms alias tasks alias utils ClassDef Export bases AttributeLoad NameLoad object_tools attr ObjectTool body Assign NameStore name Str export Assign NameStore label Str Export Assign NameStore help_text Str Export-filtered-objects-for-download. Assign NameStore form_class AttributeLoad NameLoad forms attr Export FunctionDef serialize arguments args NameParam self NameParam format NameParam queryset NameParam fields defaults ListLoad body Return Call AttributeLoad NameLoad utils attr serialize NameLoad format NameLoad queryset NameLoad fields decorator_list FunctionDef gen_filename arguments args NameParam self NameParam format defaults body Assign NameStore app_label AttributeLoad AttributeLoad AttributeLoad NameLoad self attr model attr _meta attr app_label Assign NameStore object_name Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad self attr model attr _meta attr object_name attr lower If CompareEq NameLoad format Str python body Assign NameStore format Str py Return BinOpMod Str %s-%s-%s.%s TupleLoad AttributeLoad NameLoad self attr name NameLoad app_label NameLoad object_name NameLoad format decorator_list FunctionDef order arguments args NameParam self NameParam queryset NameParam by NameParam direction defaults body Return Call AttributeLoad NameLoad utils attr order_queryset NameLoad queryset NameLoad by NameLoad direction decorator_list FunctionDef has_celery arguments args NameParam self defaults body Return CompareIn Str djcelery Call NameLoad getattr NameLoad settings Str INSTALLED_APPS ListLoad decorator_list FunctionDef get_queryset arguments args NameParam self NameParam form defaults body Return Call AttributeLoad NameLoad utils attr get_queryset NameLoad form AttributeLoad NameLoad self attr model decorator_list FunctionDef get_data arguments args NameParam self NameParam form defaults body Assign NameStore queryset Call AttributeLoad NameLoad self attr get_queryset NameLoad form Assign NameStore format SubscriptLoad AttributeLoad NameLoad form attr cleaned_data Index Str export_format Assign NameStore fields SubscriptLoad AttributeLoad NameLoad form attr cleaned_data Index Str export_fields Assign NameStore data Call AttributeLoad NameLoad self attr serialize NameLoad format NameLoad queryset NameLoad fields Return TupleLoad NameLoad format NameLoad data decorator_list FunctionDef export_response arguments args NameParam self NameParam form defaults body Assign TupleStore NameStore format NameStore data Call AttributeLoad NameLoad self attr get_data NameLoad form Assign NameStore filename Call AttributeLoad NameLoad self attr gen_filename NameLoad format Assign NameStore response Call NameLoad HttpResponse NameLoad data keyword content_type SubscriptLoad Call AttributeLoad NameLoad mimetypes attr guess_type NameLoad filename Index Num 0 Assign SubscriptStore NameLoad response Index Str Content-Disposition BinOpMod Str attachment;-filename=%s NameLoad filename Return NameLoad response decorator_list FunctionDef mail_response arguments args NameParam self NameParam request NameParam extra_context defaults NameLoad None body Assign NameStore form SubscriptLoad NameLoad extra_context Index Str form Assign NameStore format SubscriptLoad AttributeLoad NameLoad form attr cleaned_data Index Str export_format Assign NameStore filename Call AttributeLoad NameLoad self attr gen_filename NameLoad format Assign NameStore serializer_kwargs Dict Str fields Str format SubscriptLoad AttributeLoad NameLoad form attr cleaned_data Index Str export_fields NameLoad format Assign NameStore query_kwargs Dict Str form Str model NameLoad form AttributeLoad NameLoad self attr model If Call AttributeLoad NameLoad self attr has_celery body Return Call AttributeLoad AttributeLoad NameLoad tasks attr mail_export attr delay AttributeLoad AttributeLoad NameLoad request attr user attr email NameLoad filename NameLoad serializer_kwargs NameLoad query_kwargs Return Call AttributeLoad NameLoad utils attr mail_export AttributeLoad AttributeLoad NameLoad request attr user attr email NameLoad filename NameLoad serializer_kwargs NameLoad query_kwargs decorator_list FunctionDef view arguments args NameParam self NameParam request NameParam extra_context NameParam process_form defaults NameLoad None NameLoad True body Assign NameStore form SubscriptLoad NameLoad extra_context Index Str form If BoolOpAnd Call AttributeLoad NameLoad form attr is_valid NameLoad process_form body If CompareIn Str _export_mail AttributeLoad NameLoad request attr POST body Assign NameStore message Call NameLoad _ BinOpMod Str The-export-has-been-generated-and-will-be-emailed-----------------------------to-%s. AttributeLoad AttributeLoad NameLoad request attr user attr email Expr Call AttributeLoad NameLoad messages attr add_message NameLoad request AttributeLoad NameLoad messages attr SUCCESS NameLoad message Expr Call AttributeLoad NameLoad self attr mail_response NameLoad request NameLoad extra_context orelse Return Call AttributeLoad NameLoad self attr export_response NameLoad form Assign NameStore adminform Call AttributeLoad NameLoad helpers attr AdminForm NameLoad form AttributeLoad NameLoad form attr fieldsets Dict Assign NameStore context Dict Str adminform NameLoad adminform Expr Call AttributeLoad NameLoad context attr update BoolOpOr NameLoad extra_context Dict Assign NameStore context_instance Call AttributeLoad NameLoad template attr RequestContext NameLoad request Return Call NameLoad render_to_response Str export/export_form.html NameLoad context keyword context_instance NameLoad context_instance decorator_list decorator_list Expr Call AttributeLoad AttributeLoad NameLoad object_tools attr tools attr register NameLoad Export 
Module Import alias mock ImportFrom contextlib alias contextmanager ImportFrom modularodm alias storage ImportFrom framework.mongo alias set_up_storage ImportFrom website.addons.base.testing alias OAuthAddonTestCaseMixin alias AddonTestCase ImportFrom website.addons.dropbox alias MODELS ImportFrom website.addons.dropbox.model alias DropboxProvider ImportFrom website.addons.dropbox.tests.factories alias DropboxAccountFactory FunctionDef init_storage arguments args defaults body Expr Call NameLoad set_up_storage NameLoad MODELS keyword storage_class AttributeLoad NameLoad storage attr MongoStorage decorator_list ClassDef DropboxAddonTestCase bases NameLoad OAuthAddonTestCaseMixin NameLoad AddonTestCase body Assign NameStore ADDON_SHORT_NAME Str dropbox Assign NameStore ExternalAccountFactory NameLoad DropboxAccountFactory Assign NameStore Provider NameLoad DropboxProvider FunctionDef set_node_settings arguments args NameParam self NameParam settings defaults body Expr Call AttributeLoad Call NameLoad super NameLoad DropboxAddonTestCase NameLoad self attr set_node_settings NameLoad settings Assign AttributeStore NameLoad settings attr folder Str foo Expr Call AttributeLoad NameLoad settings attr save decorator_list decorator_list Assign NameStore mock_responses Dict Str put_file Str metadata_list Str metadata_single Str revisions Dict Str bytes Str icon Str is_dir Str mime_type Str modified Str path Str rev Str revision Str root Str size Str thumb_exists Num 77 Str page_white_text NameLoad False Str text/plain Str Wed,-20-Jul-2011-22:04:50-+0000 Str /magnum-opus.txt Str 362e2029684fe Num 221922 Str dropbox Str 77-bytes NameLoad False Dict Str size Str hash Str bytes Str thumb_exists Str rev Str modified Str path Str is_dir Str icon Str root Str contents Str revision Str 0-bytes Str 37eb1ba1849d4b0fb0b28caf7ef3af52 Num 0 NameLoad False Str 714f029684fe Str Wed,-27-Apr-2011-22:18:51-+0000 Str /Public NameLoad True Str folder_public Str dropbox ListLoad Dict Str size Str rev Str thumb_exists Str bytes Str modified Str client_mtime Str path Str is_dir Str icon Str root Str mime_type Str revision Str 0-bytes Str 35c1f029684fe NameLoad False Num 0 Str Mon,-18-Jul-2011-20:13:43-+0000 Str Wed,-20-Apr-2011-16:20:19-+0000 Str /Public/latest.txt NameLoad False Str page_white_text Str dropbox Str text/plain Num 220191 Dict Str bytes Str icon Str is_dir Str modified Str path Str rev Str revision Str root Str size Str thumb_exists Num 0 Str folder NameLoad True Str Sat,-22-Mar-2014-05:40:29-+0000 Str /datasets/New-Folder Str 3fed51f002c12fc Num 67032351 Str dropbox Str 0-bytes NameLoad False Num 29007 Dict Str bytes Str client_mtime Str icon Str is_dir Str mime_type Str modified Str path Str rev Str revision Str root Str size Str thumb_exists Num 74 Str Mon,-13-Jan-2014-20:24:15-+0000 Str page_white NameLoad False Str text/csv Str Fri,-21-Mar-2014-05:46:36-+0000 Str /datasets/foo.txt Str a2149fb64 Num 10 Str app_folder Str 74-bytes NameLoad False ListLoad Dict Str bytes Str client_mtime Str icon Str is_deleted Str is_dir Str mime_type Str modified Str path Str rev Str revision Str root Str size Str thumb_exists Num 0 Str Wed,-31-Dec-1969-23:59:59-+0000 Str page_white_picture NameLoad True NameLoad False Str image/png Str Tue,-25-Mar-2014-03:39:13-+0000 Str /svs-v-barks.png Str 3fed741002c12fc Num 67032897 Str dropbox Str 0-bytes NameLoad True Dict Str bytes Str client_mtime Str icon Str is_dir Str mime_type Str modified Str path Str rev Str revision Str root Str size Str thumb_exists Num 151164 Str Sat,-13-Apr-2013-21:56:36-+0000 Str page_white_picture NameLoad False Str image/png Str Tue,-25-Mar-2014-01:45:51-+0000 Str /svs-v-barks.png Str 3fed61a002c12fc Num 67032602 Str dropbox Str 147.6-KB NameLoad True ClassDef MockDropbox bases NameLoad object body FunctionDef put_file arguments args NameParam self NameParam full_path NameParam file_obj NameParam overwrite NameParam parent_rev defaults NameLoad False NameLoad None body Return SubscriptLoad NameLoad mock_responses Index Str put_file decorator_list FunctionDef metadata arguments args NameParam self NameParam path NameParam list NameParam file_limit NameParam hash NameParam rev NameParam include_deleted defaults NameLoad True Num 25000 NameLoad None NameLoad None NameLoad False body If NameLoad list body Assign NameStore ret SubscriptLoad NameLoad mock_responses Index Str metadata_list orelse Assign NameStore ret SubscriptLoad NameLoad mock_responses Index Str metadata_single Assign SubscriptStore NameLoad ret Index Str path NameLoad path Return NameLoad ret decorator_list FunctionDef get_file_and_metadata arguments args defaults vararg args kwarg kwargs body Pass decorator_list FunctionDef file_delete arguments args NameParam self NameParam path defaults body Return SubscriptLoad NameLoad mock_responses Index Str metadata_single decorator_list FunctionDef revisions arguments args NameParam self NameParam path defaults body Assign NameStore ret SubscriptLoad NameLoad mock_responses Index Str revisions For NameStore each NameLoad ret body Assign SubscriptStore NameLoad each Index Str path NameLoad path Return NameLoad ret decorator_list FunctionDef account_info arguments args NameParam self defaults body Return Dict Str display_name Str Mr.-Drop-Box decorator_list decorator_list FunctionDef patch_client arguments args NameParam target NameParam mock_client defaults NameLoad None body Expr Str Patches-a-function-that-returns-a-DropboxClient,-returning-an-instance----of-MockDropbox-instead.----Usage:-::--------with-patch_client('website.addons.dropbox.view.config.get_client')-as-client:------------#-test-view-that-uses-the-dropbox-client. With Call AttributeLoad NameLoad mock attr patch NameLoad target NameStore client_getter body Assign NameStore client BoolOpOr NameLoad mock_client Call NameLoad MockDropbox Assign AttributeStore NameLoad client_getter attr return_value NameLoad client Expr Yield NameLoad client decorator_list NameLoad contextmanager 
Module Import alias os alias sys alias string alias random alias tempfile alias unittest ImportFrom test.test_support alias run_unittest ClassDef TestImport bases AttributeLoad NameLoad unittest attr TestCase body FunctionDef __init__ arguments args NameParam self defaults vararg args kwarg kw body Assign AttributeStore NameLoad self attr package_name Str PACKAGE_ While Call AttributeLoad AttributeLoad NameLoad sys attr modules attr has_key AttributeLoad NameLoad self attr package_name body AugAssignAdd AttributeStore NameLoad self attr package_name Call AttributeLoad NameLoad random attr choose AttributeLoad NameLoad string attr letters Assign AttributeStore NameLoad self attr module_name BinOpAdd AttributeLoad NameLoad self attr package_name Str .foo Expr Call AttributeLoad AttributeLoad NameLoad unittest attr TestCase attr __init__ NameLoad self NameLoad args NameLoad kw decorator_list FunctionDef remove_modules arguments args NameParam self defaults body For NameStore module_name TupleLoad AttributeLoad NameLoad self attr package_name AttributeLoad NameLoad self attr module_name body If Call AttributeLoad AttributeLoad NameLoad sys attr modules attr has_key NameLoad module_name body Delete SubscriptDel AttributeLoad NameLoad sys attr modules Index NameLoad module_name decorator_list FunctionDef setUp arguments args NameParam self defaults body Assign AttributeStore NameLoad self attr test_dir Call AttributeLoad NameLoad tempfile attr mkdtemp Expr Call AttributeLoad AttributeLoad NameLoad sys attr path attr append AttributeLoad NameLoad self attr test_dir Assign AttributeStore NameLoad self attr package_dir Call AttributeLoad AttributeLoad NameLoad os attr path attr join AttributeLoad NameLoad self attr test_dir AttributeLoad NameLoad self attr package_name Expr Call AttributeLoad NameLoad os attr mkdir AttributeLoad NameLoad self attr package_dir Expr Call NameLoad open Call AttributeLoad AttributeLoad NameLoad os attr path attr join AttributeLoad NameLoad self attr package_dir BinOpAdd BinOpAdd Str __init__ AttributeLoad NameLoad os attr extsep Str py Str w Assign AttributeStore NameLoad self attr module_path Call AttributeLoad AttributeLoad NameLoad os attr path attr join AttributeLoad NameLoad self attr package_dir BinOpAdd BinOpAdd Str foo AttributeLoad NameLoad os attr extsep Str py decorator_list FunctionDef tearDown arguments args NameParam self defaults body For NameStore file Call AttributeLoad NameLoad os attr listdir AttributeLoad NameLoad self attr package_dir body Expr Call AttributeLoad NameLoad os attr remove Call AttributeLoad AttributeLoad NameLoad os attr path attr join AttributeLoad NameLoad self attr package_dir NameLoad file Expr Call AttributeLoad NameLoad os attr rmdir AttributeLoad NameLoad self attr package_dir Expr Call AttributeLoad NameLoad os attr rmdir AttributeLoad NameLoad self attr test_dir Expr Call AttributeLoad NameLoad self attr assertNotEqual Call AttributeLoad AttributeLoad NameLoad sys attr path attr count AttributeLoad NameLoad self attr test_dir Num 0 Expr Call AttributeLoad AttributeLoad NameLoad sys attr path attr remove AttributeLoad NameLoad self attr test_dir Expr Call AttributeLoad NameLoad self attr remove_modules decorator_list FunctionDef rewrite_file arguments args NameParam self NameParam contents defaults body For NameStore extension Str co body Assign NameStore compiled_path BinOpAdd AttributeLoad NameLoad self attr module_path NameLoad extension If Call AttributeLoad AttributeLoad NameLoad os attr path attr exists NameLoad compiled_path body Expr Call AttributeLoad NameLoad os attr remove NameLoad compiled_path Assign NameStore f Call NameLoad open AttributeLoad NameLoad self attr module_path Str w Expr Call AttributeLoad NameLoad f attr write NameLoad contents Expr Call AttributeLoad NameLoad f attr close decorator_list FunctionDef test_package_import__semantics arguments args NameParam self defaults body Expr Call AttributeLoad NameLoad self attr rewrite_file Str for TryExcept body Expr Call NameLoad __import__ AttributeLoad NameLoad self attr module_name handlers ExceptHandler type NameLoad SyntaxError body Pass orelse Raise NameLoad RuntimeError Str Failed-to-induce-SyntaxError Expr Call AttributeLoad NameLoad self attr assert_ BoolOpAnd UnaryOpNot Call AttributeLoad AttributeLoad NameLoad sys attr modules attr has_key AttributeLoad NameLoad self attr module_name UnaryOpNot Call NameLoad hasattr SubscriptLoad AttributeLoad NameLoad sys attr modules Index AttributeLoad NameLoad self attr package_name Str foo Assign NameStore var Str a While CompareIn NameLoad var Call NameLoad dir NameLoad __builtins__ body AugAssignAdd NameStore var Call AttributeLoad NameLoad random attr choose AttributeLoad NameLoad string attr letters Expr Call AttributeLoad NameLoad self attr rewrite_file NameLoad var TryExcept body Expr Call NameLoad __import__ AttributeLoad NameLoad self attr module_name handlers ExceptHandler type NameLoad NameError body Pass orelse Raise NameLoad RuntimeError Str Failed-to-induce-NameError. Expr Call AttributeLoad NameLoad self attr rewrite_file BinOpMod Str %s-=-1 NameLoad var Assign NameStore module AttributeLoad Call NameLoad __import__ AttributeLoad NameLoad self attr module_name attr foo Expr Call AttributeLoad NameLoad self attr assertEqual Call NameLoad getattr NameLoad module NameLoad var Num 1 decorator_list decorator_list FunctionDef test_main arguments args defaults body Expr Call NameLoad run_unittest NameLoad TestImport decorator_list If CompareEq NameLoad __name__ Str __main__ body Expr Call NameLoad test_main 
Module Import alias os Import alias time Import alias logging ImportFrom sts.replay_event alias WaitTime ImportFrom sts.syncproto.base alias SyncTime ImportFrom sts.util.convenience alias timestamp_string Import alias sts.dataplane_traces.trace_generator identifier tg Assign NameStore replay_config_template Str from-config.experiment_config_lib-import-ControllerConfigfrom-sts.topology-import-*from-sts.control_flow.replayer-import-Replayerfrom-sts.simulation_state-import-SimulationConfigfrom-sts.input_traces.input_logger-import-InputLoggersimulation_config-=-%scontrol_flow-=-Replayer(simulation_config,-"%s",------------------------input_logger=InputLogger(),------------------------wait_on_deterministic_values=%s,------------------------allow_unexpected_messages=False,------------------------delay_flow_mods=%s,------------------------default_dp_permit=False,------------------------pass_through_whitelisted_messages=False,------------------------invariant_check_name=%s,------------------------bug_signature=%s) Assign NameStore interactive_replay_config_template Str from-config.experiment_config_lib-import-ControllerConfigfrom-sts.topology-import-*from-sts.control_flow.interactive_replayer-import-InteractiveReplayerfrom-sts.simulation_state-import-SimulationConfigfrom-sts.input_traces.input_logger-import-InputLoggersimulation_config-=-%scontrol_flow-=-InteractiveReplayer(simulation_config,-"%s")#-wait_on_deterministic_values=%s#-delay_flow_mods=%s#-Invariant-check:-%s#-Bug-signature:-%s Assign NameStore openflow_replay_config_template Str from-config.experiment_config_lib-import-ControllerConfigfrom-sts.topology-import-*from-sts.control_flow.openflow_replayer-import-OpenFlowReplayerfrom-sts.simulation_state-import-SimulationConfigfrom-sts.input_traces.input_logger-import-InputLoggersimulation_config-=-%scontrol_flow-=-OpenFlowReplayer(simulation_config,-"%s")#-wait_on_deterministic_values=%s#-delay_flow_mods=%s#-Invariant-check:-%s#-Bug-signature:-%s Assign NameStore mcs_config_template Str from-config.experiment_config_lib-import-ControllerConfigfrom-sts.topology-import-*from-sts.control_flow.mcs_finder-import-EfficientMCSFinderfrom-sts.invariant_checker-import-InvariantCheckerfrom-sts.simulation_state-import-SimulationConfigsimulation_config-=-%scontrol_flow-=-EfficientMCSFinder(simulation_config,-"%s",----------------------------------wait_on_deterministic_values=%s,----------------------------------default_dp_permit=False,----------------------------------pass_through_whitelisted_messages=False,----------------------------------delay_flow_mods=%s,----------------------------------invariant_check_name=%s,----------------------------------bug_signature=%s) Assign NameStore log Call AttributeLoad NameLoad logging attr getLogger Str input_logger ClassDef InputLogger bases NameLoad object body Expr Str Log-input-events-injected-by-a-control_flow.Fuzzer FunctionDef __init__ arguments args NameParam self defaults body Assign AttributeStore NameLoad self attr last_time Call AttributeLoad NameLoad SyncTime attr now Assign AttributeStore NameLoad self attr _disallow_timeouts NameLoad False Assign AttributeStore NameLoad self attr _events_after_close ListLoad Assign AttributeStore NameLoad self attr output NameLoad None Assign AttributeStore NameLoad self attr output_path Str null decorator_list FunctionDef open arguments args NameParam self NameParam results_dir NameParam output_filename defaults NameLoad None Str events.trace body If CompareIsNot NameLoad results_dir NameLoad None body Assign AttributeStore NameLoad self attr output_path BinOpAdd BinOpAdd NameLoad results_dir Str / NameLoad output_filename Assign AttributeStore NameLoad self attr replay_cfg_path BinOpAdd NameLoad results_dir Str /replay_config.py Assign AttributeStore NameLoad self attr mcs_cfg_path BinOpAdd NameLoad results_dir Str /mcs_config.py Assign AttributeStore NameLoad self attr interactive_replay_cfg_path BinOpAdd NameLoad results_dir Str /interactive_replay_config.py Assign AttributeStore NameLoad self attr openflow_replay_cfg_path BinOpAdd NameLoad results_dir Str /openflow_replay_config.py orelse Raise Call NameLoad ValueError Str Default-results_dir-currently-not-supported Assign AttributeStore NameLoad self attr output Call NameLoad open AttributeLoad NameLoad self attr output_path Str w decorator_list FunctionDef disallow_timeouts arguments args NameParam self defaults body Assign AttributeStore NameLoad self attr _disallow_timeouts NameLoad True decorator_list FunctionDef allow_timeouts arguments args NameParam self defaults body Assign AttributeStore NameLoad self attr _disallow_timeouts NameLoad False decorator_list FunctionDef _serialize_event arguments args NameParam self NameParam event NameParam output defaults body If BoolOpAnd AttributeLoad NameLoad self attr _disallow_timeouts Call NameLoad hasattr NameLoad event Str disallow_timeouts body Assign AttributeStore NameLoad event attr timeout_disallowed NameLoad True Assign AttributeStore NameLoad self attr last_time AttributeLoad NameLoad event attr time Assign NameStore json_hash Call AttributeLoad NameLoad event attr to_json Expr Call AttributeLoad NameLoad log attr debug BinOpMod Str logging-event-%r NameLoad event Expr Call AttributeLoad NameLoad output attr write BinOpAdd NameLoad json_hash Str null decorator_list FunctionDef log_input_event arguments args NameParam self NameParam event defaults body Expr Str Log-the-event-as-a-json-hash. If UnaryOpNot AttributeLoad NameLoad self attr output body Raise Call NameLoad Exception Str Not-opened----call-InputLogger.open If UnaryOpNot AttributeLoad AttributeLoad NameLoad self attr output attr closed body Expr Call AttributeLoad NameLoad self attr _serialize_event NameLoad event AttributeLoad NameLoad self attr output orelse Expr Call AttributeLoad AttributeLoad NameLoad self attr _events_after_close attr append NameLoad event decorator_list FunctionDef dump_buffered_events arguments args NameParam self NameParam events defaults body Expr Str If-there-were-un-acknowledge-message-receives-or-state-changes-at-the----end-of-the-run,-dump-them-to-a-separate-input-trace-".unacked" With Call NameLoad open BinOpAdd AttributeLoad NameLoad self attr output_path Str .unacked Str w NameStore output body For NameStore event BinOpAdd NameLoad events AttributeLoad NameLoad self attr _events_after_close body Expr Call AttributeLoad NameLoad self attr _serialize_event NameLoad event NameLoad output decorator_list FunctionDef close arguments args NameParam self NameParam control_flow NameParam simulation_cfg NameParam skip_mcs_cfg defaults NameLoad False body Expr Call AttributeLoad NameLoad self attr log_input_event Call NameLoad WaitTime Num 1.0 keyword time AttributeLoad NameLoad self attr last_time Expr Call AttributeLoad AttributeLoad NameLoad self attr output attr close Assign NameStore path_templates ListLoad TupleLoad AttributeLoad NameLoad self attr replay_cfg_path NameLoad replay_config_template TupleLoad AttributeLoad NameLoad self attr interactive_replay_cfg_path NameLoad interactive_replay_config_template TupleLoad AttributeLoad NameLoad self attr openflow_replay_cfg_path NameLoad openflow_replay_config_template If UnaryOpNot NameLoad skip_mcs_cfg body Expr Call AttributeLoad NameLoad path_templates attr append TupleLoad AttributeLoad NameLoad self attr mcs_cfg_path NameLoad mcs_config_template Assign NameStore wait_on_deterministic_values NameLoad False If Call NameLoad hasattr AttributeLoad NameLoad control_flow attr sync_callback Str record_deterministic_values body Assign NameStore wait_on_deterministic_values AttributeLoad AttributeLoad NameLoad control_flow attr sync_callback attr record_deterministic_values Assign NameStore delay_flow_mods NameLoad False If Call NameLoad hasattr NameLoad control_flow Str delay_flow_mods body Assign NameStore delay_flow_mods AttributeLoad NameLoad control_flow attr delay_flow_mods Assign NameStore bug_signature Str null If Call NameLoad hasattr NameLoad control_flow Str bug_signature body Assign NameStore bug_signature AttributeLoad NameLoad control_flow attr bug_signature For TupleStore NameStore path NameStore template NameLoad path_templates body With Call NameLoad open NameLoad path Str w NameStore cfg_out body Assign NameStore config_string BinOpMod NameLoad template TupleLoad Call NameLoad str NameLoad simulation_cfg AttributeLoad NameLoad self attr output_path Call NameLoad str NameLoad wait_on_deterministic_values Call NameLoad str NameLoad delay_flow_mods BinOpMod Str '%s' Call NameLoad str AttributeLoad NameLoad control_flow attr invariant_check_name BinOpMod Str "%s" Call NameLoad str NameLoad bug_signature Expr Call AttributeLoad NameLoad cfg_out attr write NameLoad config_string decorator_list decorator_list 
Module Import alias puremvc.patterns.observer Import alias puremvc.interfaces Import alias puremvc.patterns.mediator ClassDef ViewTestNote bases AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr observer attr Notification AttributeLoad AttributeLoad NameLoad puremvc attr interfaces attr INotification body Assign NameStore NAME Str ViewTestNote FunctionDef __init__ arguments args NameParam self NameParam anme NameParam body defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr observer attr Notification attr __init__ NameLoad self AttributeLoad NameLoad ViewTestNote attr NAME NameLoad body decorator_list FunctionDef create arguments args NameParam body defaults body Return Call NameLoad ViewTestNote AttributeLoad NameLoad ViewTestNote attr NAME NameLoad body decorator_list NameLoad staticmethod decorator_list ClassDef ViewTestMediator bases AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator AttributeLoad AttributeLoad NameLoad puremvc attr interfaces attr IMediator body Assign NameStore NAME Str ViewTestMediator FunctionDef __init__ arguments args NameParam self NameParam view defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator attr __init__ NameLoad self AttributeLoad NameLoad ViewTestMediator attr NAME NameLoad view decorator_list FunctionDef listNotificationInterests arguments args NameParam self defaults body Return ListLoad Str ABC Str DEF Str GHI decorator_list decorator_list ClassDef ViewTestMediator2 bases AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator AttributeLoad AttributeLoad NameLoad puremvc attr interfaces attr IMediator body Assign NameStore NAME Str ViewTestMediator2 FunctionDef __init__ arguments args NameParam self NameParam view defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator attr __init__ NameLoad self AttributeLoad NameLoad ViewTestMediator2 attr NAME NameLoad view decorator_list FunctionDef listNotificationInterests arguments args NameParam self defaults body Return ListLoad AttributeLoad AttributeLoad NameLoad self attr viewComponent attr NOTE1 AttributeLoad AttributeLoad NameLoad self attr viewComponent attr NOTE2 AttributeLoad AttributeLoad NameLoad self attr viewComponent attr NOTE5 decorator_list FunctionDef handleNotification arguments args NameParam self NameParam notification defaults body Assign AttributeStore AttributeLoad NameLoad self attr viewComponent attr lastNotification Call AttributeLoad NameLoad notification attr getName If CompareEq Call AttributeLoad NameLoad notification attr getName AttributeLoad AttributeLoad NameLoad self attr viewComponent attr NOTE5 body Expr Call AttributeLoad AttributeLoad NameLoad self attr facade attr removeMediator AttributeLoad NameLoad self attr NAME decorator_list decorator_list ClassDef ViewTestMediator3 bases AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator AttributeLoad AttributeLoad NameLoad puremvc attr interfaces attr IMediator body Assign NameStore NAME Str ViewTestMediator3 FunctionDef __init__ arguments args NameParam self NameParam view defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator attr __init__ NameLoad self AttributeLoad NameLoad ViewTestMediator3 attr NAME NameLoad view decorator_list FunctionDef listNotificationInterests arguments args NameParam self defaults body Return ListLoad AttributeLoad AttributeLoad NameLoad self attr viewComponent attr NOTE3 AttributeLoad AttributeLoad NameLoad self attr viewComponent attr NOTE5 decorator_list FunctionDef handleNotification arguments args NameParam self NameParam notification defaults body Assign AttributeStore AttributeLoad NameLoad self attr viewComponent attr lastNotification Call AttributeLoad NameLoad notification attr getName If CompareEq Call AttributeLoad NameLoad notification attr getName AttributeLoad AttributeLoad NameLoad self attr viewComponent attr NOTE5 body Expr Call AttributeLoad AttributeLoad NameLoad self attr facade attr removeMediator AttributeLoad NameLoad self attr NAME decorator_list decorator_list ClassDef ViewTestMediator4 bases AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator AttributeLoad AttributeLoad NameLoad puremvc attr interfaces attr IMediator body Assign NameStore NAME Str ViewTestMediator4 FunctionDef __init__ arguments args NameParam self NameParam view defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator attr __init__ NameLoad self AttributeLoad NameLoad ViewTestMediator4 attr NAME NameLoad view decorator_list FunctionDef onRegister arguments args NameParam self defaults body Assign AttributeStore AttributeLoad NameLoad self attr viewComponent attr onRegisterCalled NameLoad True decorator_list FunctionDef onRemove arguments args NameParam self defaults body Assign AttributeStore AttributeLoad NameLoad self attr viewComponent attr onRemoveCalled NameLoad True decorator_list decorator_list ClassDef ViewTestMediator5 bases AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator AttributeLoad AttributeLoad NameLoad puremvc attr interfaces attr IMediator body Assign NameStore NAME Str ViewTestMediator5 FunctionDef __init__ arguments args NameParam self NameParam view defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad puremvc attr patterns attr mediator attr Mediator attr __init__ NameLoad self AttributeLoad NameLoad ViewTestMediator5 attr NAME NameLoad view decorator_list FunctionDef listNotificationInterests arguments args NameParam self defaults body Return ListLoad AttributeLoad AttributeLoad NameLoad self attr viewComponent attr NOTE5 decorator_list FunctionDef handleNotification arguments args NameParam self NameParam notification defaults body AugAssignAdd AttributeStore AttributeLoad NameLoad self attr viewComponent attr counter Num 1 decorator_list decorator_list 
Module Import alias sys Import alias time Import alias logging ImportFrom optparse alias make_option ImportFrom django.db alias transaction ImportFrom django.conf alias settings ImportFrom utils.pid alias Pid ImportFrom utils.sql alias execute_sql alias query_to_dicts ImportFrom utils.management.commands.base.time_args_command alias TimeArgsCommand ImportFrom mturk.main.management.commands.crawler_common alias grab_error Assign NameStore log Call AttributeLoad NameLoad logging attr getLogger Str mturk.aggregates ClassDef Command bases NameLoad TimeArgsCommand body Assign NameStore help Str Refreshes-crawl-aggregates. Assign NameStore option_list BinOpAdd AttributeLoad NameLoad TimeArgsCommand attr option_list TupleLoad Call NameLoad make_option Str --clear-existing keyword dest Str clear-existing keyword default NameLoad False keyword action Str store_true keyword help Str If-true,-related-main_crawlagregates-record-will-be-deleted-prior-to-update. FunctionDef process_options arguments args NameParam self NameParam options defaults body Expr Call AttributeLoad Call NameLoad super NameLoad Command NameLoad self attr process_options NameLoad options Assign AttributeStore NameLoad self attr clear_existing SubscriptLoad AttributeLoad NameLoad self attr options Index Str clear-existing decorator_list FunctionDef handle arguments args NameParam self defaults kwarg options body Assign NameStore pid Call NameLoad Pid Str mturk_aggregates NameLoad True Expr Call AttributeLoad NameLoad self attr process_options NameLoad options Assign NameStore start_time Call AttributeLoad NameLoad time attr time Expr Call AttributeLoad NameLoad log attr info Str Updating-crawl-agregates Expr Call NameLoad update_crawl_agregates keyword start AttributeLoad NameLoad self attr start keyword end AttributeLoad NameLoad self attr end keyword clear_existing AttributeLoad NameLoad self attr clear_existing Expr Call AttributeLoad NameLoad log attr info BinOpMod Str db_update_agregates-took:-%s BinOpSub Call AttributeLoad NameLoad time attr time NameLoad start_time Expr Call AttributeLoad NameLoad pid attr remove_pid decorator_list decorator_list FunctionDef update_crawl_agregates arguments args NameParam commit_threshold NameParam start NameParam end NameParam clear_existing defaults Num 1000 NameLoad None NameLoad None NameLoad False body Expr Str Creates-main_crawlagregates-records-for-hits_mv. FunctionDef print_status arguments args NameParam number NameParam row_id defaults body Expr Call AttributeLoad NameLoad log attr info BinOpMod Str Commited-after-%s-crawls,-last-id-%s. TupleLoad NameLoad number NameLoad row_id decorator_list Expr BoolOpAnd NameLoad clear_existing NameLoad start NameLoad end Call NameLoad clear_existing_rows NameLoad start NameLoad end Assign NameStore i Num 0 For TupleStore NameStore i NameStore row Call NameLoad enumerate Call NameLoad get_crawls keyword start NameLoad start keyword end NameLoad end body TryExcept body Expr Call NameLoad execute_sql Str INSERT-INTO----------------main_crawlagregates-(hits,-start_time,-reward,-crawl_id,-id,--------------------projects,-spam_projects)------------SELECT----------------sum(hits_available)-as-"hits",----------------start_time,----------------sum(reward-*-hits_available)-as-"reward",----------------crawl_id,----------------nextval('main_crawlagregates_id_seq'),----------------count(*)-as-"count",----------------count(CASE-WHEN-is_spam-=-TRUE-then-TRUE-ELSE-NULL-END)------------FROM----------------(SELECT-DISTINCT-ON-(group_id)-*-FROM-hits_mv----------------WHERE-crawl_id-=-%s)-AS-p------------GROUP-BY----------------crawl_id,-start_time SubscriptLoad NameLoad row Index Str id If CompareEq BinOpMod NameLoad i NameLoad commit_threshold Num 0 body Expr Call NameLoad print_status BinOpAdd NameLoad i Num 1 SubscriptLoad NameLoad row Index Str id Expr Call AttributeLoad NameLoad transaction attr commit_unless_managed handlers ExceptHandler body Assign NameStore error_info Call NameLoad grab_error Call AttributeLoad NameLoad sys attr exc_info Expr Call AttributeLoad NameLoad log attr error BinOpMod Str an-error-occured-at-crawl_id:-%s,-%s-%s TupleLoad SubscriptLoad NameLoad row Index Str id SubscriptLoad NameLoad error_info Index Str type SubscriptLoad NameLoad error_info Index Str value Expr Call NameLoad execute_sql Str rollback; If CompareNotEq BinOpMod NameLoad i NameLoad commit_threshold Num 0 body Expr Call NameLoad print_status BinOpAdd NameLoad i Num 1 SubscriptLoad NameLoad row Index Str id Expr Call AttributeLoad NameLoad transaction attr commit_unless_managed Expr Call NameLoad execute_sql Str DELETE-FROM-main_crawlagregates-WHERE-projects-<-200; keyword commit NameLoad True Expr Call AttributeLoad NameLoad transaction attr commit_unless_managed decorator_list FunctionDef get_crawls arguments args NameParam start NameParam end defaults NameLoad None NameLoad None body Expr Str Returns-dicts-containing-crawl-ids. Assign NameStore st Call AttributeLoad NameLoad time attr time Expr Call AttributeLoad NameLoad log attr debug Str Fetching-crawls-to-process. Assign NameStore extra_query ListLoad Expr BoolOpAnd NameLoad start NameLoad end Call AttributeLoad NameLoad extra_query attr append Call AttributeLoad Str p.start_time-BETWEEN-'\ 0\ 1\ attr format Call AttributeLoad NameLoad start attr isoformat Call AttributeLoad NameLoad end attr isoformat Assign NameStore query Str SELECT-id-FROM-main_crawl-p-WHERE--------p.groups_available-*-\ crawl_threshold\ extra_limit\ Assign NameStore extra_qstr IfExp NameLoad extra_query BinOpAdd Str AND Call AttributeLoad Str AND attr join NameLoad extra_query Str null Assign NameStore query Call AttributeLoad NameLoad query attr format keyword extra_limit NameLoad extra_qstr keyword crawl_threshold AttributeLoad NameLoad settings attr INCOMPLETE_CRAWL_THRESHOLD Assign NameStore results Call NameLoad query_to_dicts NameLoad query Expr Call AttributeLoad NameLoad log attr debug Call AttributeLoad Str Crawls-fetched-in-\ 0\ attr format BinOpSub Call AttributeLoad NameLoad time attr time NameLoad st Return NameLoad results decorator_list FunctionDef clear_existing_rows arguments args NameParam start NameParam end defaults body Assign NameStore t Call AttributeLoad NameLoad time attr time Expr Call AttributeLoad NameLoad log attr info Call AttributeLoad Str Deleting-crawl-agregates-for-period-\ 0\ 1\ attr format NameLoad start NameLoad end Expr Call NameLoad execute_sql Call AttributeLoad Str DELETE-FROM-main_crawlagregates-WHERE-start_time-BETWEEN-'\ 0\ 1\ attr format Call AttributeLoad NameLoad start attr isoformat Call AttributeLoad NameLoad end attr isoformat keyword commit NameLoad True Expr Call AttributeLoad NameLoad log attr info Call AttributeLoad Str Deleting-crawl-agregates-for-period-\ 0\ 1\ 2\ attr format NameLoad start NameLoad end NameLoad t decorator_list 
