Module Expr Str Import alias alias alias alias alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str For NameStore Call NameLoad Num Num body TryExcept body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Return Str If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Return BinOpAdd Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad Return Call NameLoad BoolOpAnd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body If BoolOpAnd CompareIn Str NameLoad CompareNotEq SubscriptLoad NameLoad Index Str Str body Expr Call AttributeLoad NameLoad attr Str TryExcept body Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword Call AttributeLoad NameLoad attr Str NameLoad keyword Call AttributeLoad NameLoad attr Str Str keyword Call AttributeLoad NameLoad attr Str Num keyword Call NameLoad keyword Call AttributeLoad NameLoad attr Str Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore NameLoad For NameStore Call NameLoad Num Num body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Break handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr Num If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore NameLoad For NameStore Call NameLoad Num Num body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Break handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore NameLoad For NameStore Call NameLoad Num Num body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Break handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Return NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Return NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Return NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Num If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return NameLoad Return NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore NameLoad If BoolOpAnd UnaryOpNot NameLoad Call AttributeLoad NameLoad attr Str CompareIsNot SubscriptLoad NameLoad Index Str NameLoad CompareIsNot SubscriptLoad NameLoad Index Str NameLoad body Assign NameStore Call NameLoad NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad SubscriptLoad NameLoad Index Str UnaryOpNot Call NameLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Str Assign NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore NameLoad Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Num If BoolOpOr UnaryOpNot NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str body Assign NameStore Call NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad SubscriptLoad NameLoad Index Str UnaryOpNot Call NameLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Expr Call NameLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str NameLoad Return NameLoad Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body With Call NameLoad NameLoad Str NameStore body Assign NameStore Dict Str Str Str Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad BinOpMod Str Call AttributeLoad NameLoad attr Num Num Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad orelse Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Str Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Return CompareGt Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body For NameStore ListLoad Str Str body If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str BinOpMod Str TupleLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr SubscriptLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Str Str For NameStore Call NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Num body Break orelse Expr Call AttributeLoad NameLoad attr Num orelse Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call NameLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad NameLoad Str attr If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad If CompareEq NameLoad NameLoad body Return Call NameLoad If BoolOpOr CompareIn Str NameLoad CompareIn Str NameLoad body Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str NameLoad Call AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad NameLoad If CompareIn Str NameLoad body Expr Call NameLoad SubscriptLoad NameLoad Index Str If CompareEq Call NameLoad NameLoad Num body Return Call NameLoad If CompareIsNot Call AttributeLoad NameLoad attr Str NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Return If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str BinOpMod Str Call AttributeLoad NameLoad attr Num Num orelse If CompareEq SubscriptLoad NameLoad Index Str Str body Expr Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str BinOpMod Str Call AttributeLoad NameLoad attr Num Num If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str NameLoad orelse If BoolOpOr CompareEq SubscriptLoad NameLoad Index Str Str CompareIs SubscriptLoad NameLoad Index Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str NameLoad orelse If BoolOpOr CompareEq SubscriptLoad NameLoad Index Str Str CompareIs SubscriptLoad NameLoad Index Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str orelse If CompareEq SubscriptLoad NameLoad Index Str Str body Expr Call AttributeLoad NameLoad attr Str orelse Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad orelse If CompareEq SubscriptLoad NameLoad Index Str Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body If BoolOpAnd CompareIsNot SubscriptLoad NameLoad Index Str NameLoad CompareIsNot SubscriptLoad NameLoad Index Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad If Call NameLoad NameLoad body Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad Str body Expr Call NameLoad orelse If Call NameLoad NameLoad body Expr Call NameLoad NameLoad orelse Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Global identifier Assign NameStore Call NameLoad Assign NameStore Call NameLoad Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
This is a contextualization script required by CloudMan; it is automatically run
at instance startup (via an upstart job).

Requires:
    PyYAML http://pyyaml.org/wiki/PyYAMLDocumentation (easy_install pyyaml)
    boto http://code.google.com/p/boto/ (easy_install boto)

Assumptions:
    DEFAULT_BUCKET_NAME and DEFAULT_BOOT_SCRIPT_NAME are publicly accessible and
    do not require any form of authentication
 N/A os sys yaml urllib2 logging hashlib time subprocess random urlparse urlparse boto.s3.key Key boto.s3.connection S3Connection boto.exception S3ResponseError boto.s3.connection OrdinaryCallingFormat N/A N/A N/A N/A N/A logging getLogger boto setLevel N/A logging INFO N/A log None N/A USER_DATA_URL http://169.254.169.254/latest/user-data N/A LOCAL_PATH /tmp/cm N/A USER_DATA_FILE_NAME userData.yaml N/A USER_DATA_FILE N/A N/A N/A os path join LOCAL_PATH USER_DATA_FILE_NAME N/A USER_DATA_ORIG N/A N/A N/A os path join LOCAL_PATH N/A original_%s USER_DATA_FILE_NAME N/A SERVICE_ROOT http://s3.amazonaws.com/ N/A DEFAULT_BUCKET_NAME cloudman N/A DEFAULT_BOOT_SCRIPT_NAME cm_boot.py N/A CLOUDMAN_HOME /mnt/cm _setup_logging N/A N/A N/A N/A N/A formatter N/A N/A logging Formatter [%(levelname)s] %(module)s:%(lineno)d %(asctime)s: %(message)s N/A console N/A N/A logging StreamHandler N/A N/A N/A console setFormatter formatter N/A log N/A logging root N/A N/A N/A log addHandler console N/A N/A N/A log setLevel N/A logging DEBUG N/A log N/A _get_user_data N/A N/A N/A N/A N/A ud N/A i N/A range 0 5 N/A N/A N/A N/A N/A N/A log info N/A Getting user data from '%s', attempt %s N/A USER_DATA_URL i N/A fp N/A N/A urllib2 urlopen USER_DATA_URL N/A ud N/A N/A fp read N/A N/A N/A fp close N/A N/A N/A log debug N/A Saving user data in its original format to file '%s' USER_DATA_ORIG N/A N/A open USER_DATA_ORIG w ud_orig N/A N/A N/A N/A ud_orig write ud N/A ud N/A N/A N/A N/A log debug Got user data N/A ud N/A N/A N/A IOError N/A N/A N/A N/A log info User data not found. Setting it to empty. N/A N/A N/A ud N/A N/A N/A N/A log debug Received empty/no user data N/A ud N/A _get_bucket_name N/A N/A cluster_name access_key N/A N/A N/A Compose bucket name based on the user-provided cluster name and user access key N/A m N/A N/A hashlib md5 N/A N/A N/A m update N/A cluster_name access_key N/A N/A cm- N/A N/A m hexdigest N/A _isurl N/A N/A path N/A N/A N/A Test if path is a net location. Tests the scheme and netloc. N/A N/A scheme netloc upath uparams uquery ufrag N/A urlparse path N/A N/A bool N/A scheme netloc N/A _get_s3_conn N/A N/A ud N/A N/A N/A N/A N/A N/A N/A cloud_type ud N/A N/A ud N/A cloud_type ec2 N/A N/A N/A N/A log debug Establishing boto S3 connection to a custom Object Store N/A N/A N/A s3_conn N/A S3Connection aws_access_key_id N/A ud N/A access_key aws_secret_access_key N/A ud N/A secret_key is_secure N/A N/A ud get is_secure True host N/A N/A ud get s3_host port N/A N/A ud get s3_port 8888 calling_format N/A OrdinaryCallingFormat path N/A N/A ud get s3_conn_path / N/A N/A N/A S3ResponseError N/A e N/A N/A N/A N/A log error N/A N/A Trouble connecting to a custom Object Store. User data: {0}; Exception: {1} format ud e N/A N/A N/A N/A log debug Establishing boto S3 connection to Amazon N/A s3_conn N/A S3Connection N/A ud N/A access_key N/A ud N/A secret_key N/A N/A N/A Exception N/A e N/A N/A N/A N/A log error N/A Exception getting S3 connection: %s e N/A None N/A s3_conn N/A _bucket_exists N/A N/A s3_conn bucket_name N/A N/A N/A bucket None N/A i N/A range 1 6 N/A N/A N/A N/A bucket N/A N/A s3_conn lookup bucket_name N/A N/A N/A N/A S3ResponseError N/A N/A N/A N/A log error N/A Bucket '%s' not found, attempt %s/5 N/A bucket_name N/A i 1 N/A N/A N/A time sleep 2 N/A N/A bucket None N/A N/A N/A N/A log debug N/A Cluster bucket '%s' found. bucket_name N/A True N/A N/A N/A N/A log debug N/A Cluster bucket '%s' not found. bucket_name N/A False N/A _remote_file_exists N/A N/A s3_conn bucket_name remote_filename N/A N/A N/A b None N/A i N/A range 0 5 N/A N/A N/A N/A b N/A N/A s3_conn get_bucket bucket_name N/A N/A N/A N/A S3ResponseError N/A N/A N/A N/A log error N/A Problem connecting to bucket '%s', attempt %s/5 N/A bucket_name i N/A N/A N/A time sleep 2 N/A N/A b None N/A N/A k N/A Key b remote_filename N/A N/A N/A k exists N/A N/A True N/A False N/A _save_file_to_bucket N/A N/A s3_conn bucket_name remote_filename local_file force N/A False N/A N/A local_file N/A N/A N/A os path join LOCAL_PATH local_file N/A b None N/A i N/A range 0 5 N/A N/A N/A N/A b N/A N/A s3_conn get_bucket bucket_name N/A N/A N/A N/A S3ResponseError N/A e N/A N/A N/A N/A log error N/A Problem connecting to bucket '%s', attempt %s/5 N/A bucket_name i N/A N/A N/A time sleep 2 N/A N/A b None N/A N/A k N/A Key b remote_filename N/A N/A N/A N/A k exists N/A force N/A N/A N/A N/A log debug N/A Remote file '%s' already exists. Not overwriting it. remote_filename N/A True N/A N/A N/A log debug N/A Attempting to save local file '%s' to bucket '%s' as '%s' N/A local_file bucket_name remote_filename N/A N/A N/A N/A N/A k set_contents_from_filename local_file N/A N/A N/A log info N/A Successfully saved file '%s' to bucket '%s'. N/A remote_filename bucket_name N/A True N/A N/A N/A S3ResponseError N/A e N/A N/A N/A N/A log error N/A Failed to save file local file '%s' to bucket '%s' as file '%s': %s N/A local_file bucket_name remote_filename e N/A False N/A N/A False N/A _get_file_from_bucket N/A N/A s3_conn bucket_name remote_filename local_filename N/A N/A N/A local_filename N/A N/A N/A os path join LOCAL_PATH local_filename N/A N/A N/A b N/A N/A s3_conn get_bucket bucket_name N/A k N/A Key b remote_filename N/A N/A N/A log debug N/A Attempting to retrieve file '%s' from bucket '%s' N/A remote_filename bucket_name N/A N/A N/A k exists N/A N/A N/A N/A k get_contents_to_filename local_filename N/A N/A N/A log info N/A Successfully retrieved file '%s' from bucket '%s' to '%s'. N/A remote_filename bucket_name local_filename N/A True N/A N/A N/A N/A log error N/A File '%s' in bucket '%s' not found. N/A remote_filename bucket_name N/A False N/A N/A N/A S3ResponseError N/A e N/A N/A N/A N/A log error N/A Failed to get file '%s' from bucket '%s': %s N/A remote_filename bucket_name e N/A False N/A _get_file_from_url N/A N/A url N/A N/A N/A local_filename N/A N/A N/A os path join LOCAL_PATH N/A N/A N/A N/A os path split url N/A 1 N/A N/A N/A log info N/A Getting boot script from '%s' and saving it locally to '%s' N/A url local_filename N/A N/A N/A f N/A N/A urllib2 urlopen url N/A N/A open local_filename w local_file N/A N/A N/A N/A local_file write N/A N/A f read N/A N/A N/A os chmod local_filename 484 N/A f N/A N/A N/A N/A log debug N/A Got boot script from '%s' url N/A True N/A False N/A N/A N/A IOError N/A N/A N/A N/A log error N/A Boot script at '%s' not found. url N/A False N/A _get_boot_script N/A N/A ud N/A N/A N/A use_default_bucket N/A N/A ud get use_default_bucket False N/A N/A N/A ud has_key bucket_default N/A N/A default_bucket_name N/A ud N/A bucket_default N/A N/A default_bucket_name DEFAULT_BUCKET_NAME N/A N/A N/A use_default_bucket N/A N/A ud has_key bucket_cluster N/A N/A ud N/A access_key None N/A N/A ud N/A secret_key None N/A N/A s3_conn N/A _get_s3_conn ud N/A N/A N/A N/A _bucket_exists s3_conn N/A ud N/A bucket_cluster N/A N/A _remote_file_exists s3_conn N/A ud N/A bucket_cluster N/A ud N/A boot_script_name N/A N/A N/A N/A log debug N/A Using default bucket '%s' default_bucket_name N/A use_default_bucket True N/A N/A N/A N/A log debug N/A Using cluster bucket '%s' N/A ud N/A bucket_cluster N/A use_default_bucket False N/A N/A N/A N/A log debug N/A bucket_clutser not specified or no credentials provided; defaulting to bucket '%s' default_bucket_name N/A use_default_bucket True N/A got_boot_script False N/A N/A use_default_bucket False N/A N/A N/A N/A log debug N/A Trying to get boot script '%s' from cluster bucket '%s' N/A N/A ud N/A boot_script_name N/A N/A ud get bucket_cluster None N/A got_boot_script N/A _get_file_from_bucket s3_conn N/A ud N/A bucket_cluster N/A ud N/A boot_script_name DEFAULT_BOOT_SCRIPT_NAME N/A got_boot_script N/A N/A N/A N/A os chmod N/A N/A N/A os path join LOCAL_PATH DEFAULT_BOOT_SCRIPT_NAME 484 N/A N/A N/A got_boot_script use_default_bucket N/A N/A boot_script_url N/A N/A N/A os path join N/A _get_default_bucket_url ud N/A N/A ud get boot_script_name DEFAULT_BOOT_SCRIPT_NAME N/A N/A N/A log debug N/A Could not get boot script '%s' from cluster bucket '%s'; retrieving the public one from bucket url '%s' N/A N/A ud N/A boot_script_name N/A N/A ud get bucket_cluster None boot_script_url N/A got_boot_script N/A _get_file_from_url boot_script_url N/A got_boot_script N/A N/A N/A N/A log debug N/A Saved boot script to '%s' N/A N/A N/A os path join LOCAL_PATH DEFAULT_BOOT_SCRIPT_NAME N/A use_object_store N/A N/A ud get use_object_store True N/A N/A use_object_store N/A N/A ud has_key bucket_cluster N/A ud N/A bucket_cluster N/A N/A s3_conn N/A _get_s3_conn ud N/A N/A N/A _bucket_exists s3_conn N/A ud N/A bucket_cluster N/A N/A _remote_file_exists s3_conn N/A ud N/A bucket_cluster N/A ud N/A boot_script_name N/A N/A N/A _save_file_to_bucket s3_conn N/A ud N/A bucket_cluster N/A ud N/A boot_script_name DEFAULT_BOOT_SCRIPT_NAME N/A True N/A N/A N/A log debug **Could not get the boot script** N/A False N/A _run_boot_script N/A N/A boot_script_name N/A N/A N/A script N/A N/A N/A os path join LOCAL_PATH boot_script_name N/A N/A N/A log info N/A Running boot script '%s' script N/A process N/A N/A subprocess Popen script shell True stdout N/A subprocess PIPE stderr N/A subprocess PIPE N/A N/A stdout stderr N/A N/A process communicate N/A N/A N/A process returncode 0 N/A N/A N/A N/A log debug N/A Successfully ran boot script '%s' script N/A True N/A N/A N/A N/A log error N/A Error running boot script '%s'. Process returned code '%s' and following stderr: %s N/A script N/A process returncode stderr N/A False N/A _create_basic_user_data_file N/A N/A N/A N/A N/A N/A open USER_DATA_FILE w ud_file N/A N/A ud_formatted N/A access_key boot_script_name boot_script_path bucket_default bucket_cluster cloudman_home cluster_name role secret_key None DEFAULT_BOOT_SCRIPT_NAME LOCAL_PATH DEFAULT_BUCKET_NAME None CLOUDMAN_HOME N/A aGalaxyCloudManCluster_%s N/A N/A random randrange 1 9999999 master None N/A N/A N/A yaml dump ud_formatted ud_file default_flow_style False N/A ud_formatted N/A _get_default_bucket_url N/A N/A ud N/A None N/A N/A N/A ud N/A N/A ud has_key bucket_default N/A N/A default_bucket_name N/A ud N/A bucket_default N/A N/A default_bucket_name DEFAULT_BUCKET_NAME N/A ud N/A N/A bucket_url N/A N/A ud get default_bucket_url None N/A N/A bucket_url None N/A N/A bucket_url N/A N/A bucket_url N/A N/A N/A os path join SERVICE_ROOT default_bucket_name N/A N/A N/A log debug N/A Default bucket url: %s bucket_url N/A bucket_url N/A _user_exists N/A N/A username N/A N/A N/A  Check if the given username exists as a system user
     N/A N/A open /etc/passwd r f N/A N/A ep N/A N/A f read N/A N/A N/A N/A ep find username 0 N/A _allow_password_logins N/A N/A passwd N/A N/A N/A user N/A ubuntu galaxy N/A N/A N/A _user_exists user N/A N/A N/A N/A log info N/A N/A Setting up password-based login for user '{0}' format user N/A p1 N/A N/A subprocess Popen N/A echo N/A %s:%s N/A user passwd stdout N/A subprocess PIPE N/A p2 N/A N/A subprocess Popen N/A chpasswd stdin N/A p1 stdout stdout N/A subprocess PIPE N/A N/A N/A N/A p1 stdout close N/A N/A N/A N/A p2 communicate N/A 0 N/A cl N/A sed -i s/^PasswordAuthentication .*/PasswordAuthentication yes/ /etc/ssh/sshd_config N/A N/A N/A subprocess check_call cl N/A cl N/A /usr/sbin/service ssh reload N/A N/A N/A subprocess check_call cl N/A _handle_freenx N/A N/A passwd N/A N/A N/A cl /usr/bin/dpkg --get-selections | /bin/grep freenx N/A retcode N/A N/A subprocess call cl shell True N/A N/A retcode 0 N/A N/A N/A N/A log info Setting up FreeNX N/A cl N/A dpkg-reconfigure -pcritical freenx-server N/A i N/A range 5 N/A N/A retcode N/A N/A subprocess call cl N/A N/A retcode 0 N/A N/A N/A N/A N/A N/A time sleep 5 N/A N/A N/A N/A log info freenx-server is not installed; not configuring it N/A _handle_empty N/A N/A N/A N/A N/A N/A N/A log info Received empty user data; assuming default contextualization N/A N/A _create_basic_user_data_file N/A file_url N/A N/A N/A os path join N/A _get_default_bucket_url DEFAULT_BOOT_SCRIPT_NAME N/A N/A N/A log debug N/A Resorting to the default bucket to get the boot script: %s file_url N/A N/A _get_file_from_url file_url N/A N/A _run_boot_script DEFAULT_BOOT_SCRIPT_NAME N/A _handle_url N/A N/A url N/A N/A N/A N/A N/A log info N/A Handling user data provided URL: '%s' url N/A N/A _get_file_from_url url N/A boot_script_name N/A N/A N/A N/A os path split url N/A 1 N/A N/A _run_boot_script boot_script_name N/A _merge N/A N/A specific default N/A N/A N/A 
    Recursively merges two yaml produced data structures,
    a more specific input (`specific`) and defaults
    (`default`).
     N/A N/A N/A isinstance specific dict N/A isinstance default dict N/A N/A N/A k v N/A N/A default iteritems N/A N/A N/A k specific N/A N/A N/A specific N/A k v N/A N/A N/A specific N/A k N/A _merge N/A specific N/A k v N/A specific N/A _load_user_data N/A N/A user_data N/A N/A N/A  Loads user data into dict (using pyyaml). If machine image
    contains default data this is loaded and populated in resulting
    data structure as well. These separate options are merged using
    the `_merge` function above and priority is always given to
    user supplied options.
     N/A ud N/A N/A yaml load user_data N/A N/A ud user_data N/A N/A ud N/A default_user_data_path 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 abspath __file__ IMAGE_USER_DATA N/A N/A N/A N/A os path exists default_user_data_path N/A N/A image_ud N/A N/A yaml load N/A N/A N/A open default_user_data_path r read N/A image_ud N/A N/A ud N/A _merge ud image_ud N/A ud N/A _handle_yaml N/A N/A user_data N/A N/A N/A  Process user data in YAML format N/A N/A N/A log info Handling user data in YAML format. N/A ud N/A _load_user_data user_data N/A N/A ud user_data N/A N/A N/A _handle_empty N/A N/A N/A freenxpass ud N/A password ud N/A N/A passwd N/A N/A N/A ud get freenxpass None N/A N/A ud get password None N/A N/A _allow_password_logins passwd N/A N/A freenxpass ud N/A N/A N/A _handle_freenx N/A ud N/A freenxpass N/A N/A N/A len ud 1 N/A N/A N/A _handle_empty N/A N/A N/A N/A ud get no_start None None N/A N/A N/A N/A log info Received 'no_start' user data option. Not doing anything else. N/A N/A N/A N/A N/A ud has_key cluster_name N/A N/A N/A N/A log warning The provided user data should contain cluster_name field. N/A N/A ud N/A cluster_name N/A aCloudManCluster_%s N/A N/A random randrange 1 9999999 N/A N/A N/A N/A ud N/A cluster_name N/A N/A N/A N/A log warning The cluster_name field of user data should not be empty. N/A N/A ud N/A cluster_name N/A aCloudManCluster_%s N/A N/A random randrange 1 9999999 N/A N/A N/A N/A ud has_key access_key N/A N/A N/A N/A log info The provided user data does not contain access_key field; setting it to None.. N/A N/A ud N/A access_key None N/A N/A N/A N/A N/A ud N/A access_key N/A N/A ud N/A access_key None N/A N/A N/A N/A log warning The access_key field of user data should not be empty; setting it to None. N/A N/A ud N/A access_key None N/A N/A N/A N/A ud has_key secret_key N/A N/A N/A N/A log info The provided user data does not contain secret_key field; setting it to None. N/A N/A ud N/A secret_key None N/A N/A N/A N/A N/A ud N/A secret_key N/A N/A ud N/A secret_key None N/A N/A N/A N/A log warning The secret_key field of user data should not be empty; setting it to None. N/A N/A ud N/A secret_key None N/A N/A N/A N/A ud has_key password N/A N/A N/A N/A log warning The provided user data should contain password field. N/A N/A N/A N/A ud N/A password N/A N/A N/A N/A log warning The password field of user data should not be empty. N/A N/A N/A ud N/A password N/A str N/A ud N/A password N/A N/A N/A N/A ud has_key bucket_default N/A N/A N/A N/A log debug N/A The provided user data does not contain bucket_default field; setting it to '%s'. DEFAULT_BUCKET_NAME N/A N/A ud N/A bucket_default DEFAULT_BUCKET_NAME N/A N/A N/A N/A ud N/A bucket_default N/A N/A N/A N/A log warning N/A The bucket_default field of user data was empty; setting it to '%s'. DEFAULT_BUCKET_NAME N/A N/A ud N/A bucket_default DEFAULT_BUCKET_NAME N/A N/A N/A N/A ud has_key bucket_cluster N/A N/A N/A N/A N/A ud N/A access_key None N/A N/A ud N/A secret_key None N/A N/A N/A ud N/A bucket_cluster N/A _get_bucket_name N/A ud N/A cluster_name N/A ud N/A access_key N/A N/A N/A N/A ud has_key role N/A N/A N/A ud N/A role master N/A N/A N/A N/A ud has_key cloudman_home N/A N/A N/A ud N/A cloudman_home CLOUDMAN_HOME N/A N/A N/A N/A ud has_key boot_script_name N/A N/A N/A ud N/A boot_script_name DEFAULT_BOOT_SCRIPT_NAME N/A N/A ud N/A boot_script_path LOCAL_PATH N/A N/A N/A log debug N/A Composed user data: %s ud N/A N/A open USER_DATA_FILE w ud_yaml N/A N/A N/A N/A yaml dump ud ud_yaml default_flow_style False N/A N/A _get_boot_script ud N/A N/A N/A _run_boot_script DEFAULT_BOOT_SCRIPT_NAME N/A _parse_user_data N/A N/A ud N/A N/A N/A N/A ud N/A N/A N/A _handle_empty N/A N/A N/A _isurl ud N/A N/A N/A _handle_url ud N/A N/A N/A _handle_yaml ud N/A main N/A N/A N/A N/A N/A N/A N/A N/A N/A os path exists LOCAL_PATH N/A N/A N/A N/A os mkdir LOCAL_PATH N/A log N/A log N/A _setup_logging N/A ud N/A _get_user_data N/A N/A _parse_user_data ud N/A N/A N/A log info N/A ---> %s done <--- N/A N/A sys argv N/A 0 N/A N/A N/A __name__ __main__ N/A N/A N/A main