Beispiel #1
0
def generate(user='', apikey='', region="US"):
  """Generate a list of servers from the Rackspace Cloud API"""
  if os.path.exists(env.servers_path):
    overwrite = raw_input("Overwrite existing server list? (y/n) ")
    if overwrite.lower() != 'y':
      sys.exit(1)
  while user is '' or apikey is '':
    user = raw_input("Rackspace Cloud Username: "******"Rackspace Cloud API Key: ")

  create_server_list(user, apikey, region)
Beispiel #2
0
def generate():
  """Generate a list of servers from the Rackspace Cloud API"""
  if os.path.exists(env.servers_path):
    overwrite = raw_input("Overwrite existing server list? (y/n) ")
    if overwrite.lower() != 'y':
      sys.exit(1)
  user = env.rs.get('user', raw_input("Rackspace Cloud Username: "******"Rackspace Cloud API Key: "))
  account_id = env.rs.get('account_id', raw_input("Rackspace Cloud Account/Tenant ID"))
  region = env.rs.get('region', 'us')

  create_server_list(user, apikey, account_id, region)