#!/usr/local/bin/python class access_project: """ A project description used to grant access to this testbed. The description includes a name and a list of node types to which the project will be granted access. """ def __init__(self, name, nt): self.name = name self.node_types = list(nt) def __repr__(self): if len(self.node_types) > 0: return "access_proj('%s', ['%s'])" % \ (self.name, str("','").join(self.node_types)) else: return "access_proj('%s', [])" % self.name