Ignore:
Timestamp:
Apr 28, 2010 4:09:53 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
12658df
Parents:
05fceef
Message:

New syntax for testbeds that includes a /instance rider. This allows users to
request multiple segments from a single testbed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_access.py

    r05fceef rab847bc  
    44import stat # for chmod constants
    55import re
     6import random
    67import string
    78import copy
     
    14581459                    copy_file(f, "%s/%s" % (softdir, base))
    14591460
     1461            ename = None
     1462            pubkey_base = None
     1463            secretkey_base = None
    14601464            for a in attrs:
    14611465                if a['attribute'] in configs:
     
    14741478                if a['attribute'] == 'experiment_name':
    14751479                    ename = a['value']
     1480
     1481            if not ename:
     1482                ename = ""
     1483                for i in range(0,5):
     1484                    ename += random.choice(string.ascii_letters)
     1485                self.log.warn("No experiment name: picked one randomly: %s" \
     1486                        % ename)
     1487
     1488            if not pubkey_base:
     1489                raise service_error(service_error.req,
     1490                        "No public key attribute")
     1491
     1492            if not secretkey_base:
     1493                raise service_error(service_error.req,
     1494                        "No secret key attribute")
    14761495
    14771496            # If the userconf service was imported, collect the configuration
Note: See TracChangeset for help on using the changeset viewer.