Example #1
0
 def setUp(self):
     self.tearDown()
     self._connection = get_central_connection()
     self._connection.begin_transaction()
     purge_customer(self._connection, _test_username)
     create_customer(self._connection, _test_username)
     add_key_to_customer(self._connection, _test_username)
     self._connection.commit()
Example #2
0
def _handle_create_customer(connection, options):
    create_customer(connection, options.username, options.versioning)
    add_key_to_customer(connection, options.username)
    key_id, key = list_customer_keys(connection, options.username)[0]
    sys.stdout.write("Username {0}\n".format(options.username))
    sys.stdout.write("AuthKeyId {0}\n".format(key_id))
    sys.stdout.write("AuthKey {0}\n".format(key))
    sys.stdout.write("\n")
Example #3
0
def _handle_create_customer(connection, options):
    create_customer(connection, options.username, options.versioning)
    add_key_to_customer(connection, options.username)
    key_id, key = list_customer_keys(connection, options.username)[0]
    sys.stdout.write("Username {0}\n".format(options.username))
    sys.stdout.write("AuthKeyId {0}\n".format(key_id))
    sys.stdout.write("AuthKey {0}\n".format(key))
    sys.stdout.write("\n")
Example #4
0
 def setUp(self):
     self.tearDown()
     self._connection = get_central_connection()
     self._connection.begin_transaction()
     purge_customer(self._connection, _test_username)
     create_customer(self._connection, _test_username)
     add_key_to_customer(self._connection, _test_username)
     self._connection.commit()
def _handle_create_customer(connection, options):
    create_customer(connection, options.username, options.versioning)
    add_key_to_customer(connection, options.username)
    key_id, key = list_customer_keys(connection, options.username)[0]
    print "Username",  options.username
    print "AuthKeyId",  str(key_id)
    print "AuthKey", key
    print
Example #6
0
def _handle_add_key(connection, options):
    sys.stderr.write("adding key to customer{0}\n".format(options.username))
    add_key_to_customer(connection, options.username)
    sys.stderr.write("key added\n")
Example #7
0
def _handle_add_key(connection, options):
    sys.stderr.write("adding key to customer{0}\n".format(options.username))
    add_key_to_customer(connection, options.username)
    sys.stderr.write("key added\n")
def _handle_add_key(connection, options):
    print >> sys.stderr, "adding key to customer", options.username
    add_key_to_customer(connection, options.username)
    print >> sys.stderr, "key added"