def _pubkey_verified(ignore): install_infrastructure_server(address, admin_privkey_path, website_pubkey, leastauth_repo, la_commit_hash, secretconf_repo, sc_commit_hash, stdout, stderr)
ec2_secret = FilePath(ec2_secret_path).getContent().strip() def printer(x): """This handy function let's us see what's going on between calls in the callback chain.""" print "callBack return value 'x' is %s" % (x,) return x def eb(x): """This handy function let's us see what's going on between errors in the callback chain.""" print >> sys.stderr, "Error returned ?" print >> sys.stderr, x if existing_host: d = defer.succeed(install_infrastructure_server( existing_host, admin_privkey_path, website_pubkey, leastauthority_repo_path, leastauthority_commit_ref, secret_config_repo_path, secret_config_commit_ref, stdout, stderr)) elif new_host: d = deploy_infrastructure_EC2(ec2_accesskeyid, ec2_secret, endpoint_uri, ami_image_id, instance_size, bucket_name, admin_keypair_name, new_host, admin_privkey_path, website_pubkey, leastauthority_repo_path, leastauthority_commit_ref, secret_config_repo_path, secret_config_commit_ref, stdout, stderr, clock=None) d.addCallbacks(printer, eb) d.addCallbacks(lambda ign: os._exit(0), lambda ign: os._exit(1)) from twisted.internet import reactor
def _pubkey_verified(ignore): install_infrastructure_server(address, admin_privkey_path, website_pubkey, leastauth_repo, la_commit_hash, secretconf_repo, sc_commit_hash, stdout, stderr)
ec2secretkey = FilePath(ec2secretpath).getContent().strip() def printer(x): """This handy function let's us see what's going on between calls in the callback chain.""" print "callBack return value 'x' is %s" % (x,) return x def eb(x): """This handy function let's us see what's going on between errors in the callback chain.""" print >>sys.stderr, "Error returned" print >>sys.stderr, x if existing_host: d = defer.succeed(install_infrastructure_server( existing_host, admin_privkey_path, website_pubkey, leastauthority_repo_path, leastauth_commit_ref, secret_conf_repo_path, secrets_commit_ref, stdout, stderr ) ) elif new_host: d = deploy_infrastructure_EC2(ec2accesskeyid, ec2secretkey, endpoint_uri, ami_image_id, instance_size, bucket_name, admin_keypair_name, new_host, admin_privkey_path, website_pubkey, leastauthority_repo_path, leastauth_commit_ref, secret_conf_repo_path, secrets_commit_ref, stdout, stderr, clock=None) d.addCallbacks(printer, eb) #d.addCallbacks(lambda ign: os._exit(0), lambda ign: os._exit(1))