def parse_slice(resv_rspec):
    
    # Parse the rspec
    root = et.fromstring(resv_rspec)
    version = root.get(VERSION, "unknown")
    if version != CURRENT_RESV_VERSION:
        raise Exception(
            "Can only parse reservation rspecs"
            " version 2. Given rspec version "
            "is %s" % version)
    
    firstname, lastname, affiliation, email, password = \
        _resv_parse_user(root)
    slice_name, slice_desc, slice_expiry, controller_url = _resv_parse_slice(root)
    project_name, project_desc = _resv_parse_project(root)
    slivers = _resv_parse_slivers(root)
    
    return (project_name, project_desc, slice_name, slice_desc,
            slice_expiry, 
            controller_url, firstname, lastname, affiliation,
            email, password, slivers)
Set Up.
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/plugins/openflow/plugin/gapi/rspec.py/parse_slice--crossover with--dataset/ETHPy150Open yoavaviram/python-amazon-simple-product-api/tests.py/TestAmazonApi.setUp