def set_project(self): """Modifying project To modify a project, use the command gchproject: $ gchproject [-A | -I] [-d description] [—addUser(s) [+ | -]user_name [, [+ | -]user_name...]] [—addMachines(s) [+ | -]machine_name [, [+ | -]machine_name...]] [—delUser(s) user_name [,user_name...]] [—delMachines(s) machine_name [,machine_name...]] [—actUser(s) user_name [,user_name...]] [—actMachines(s) machine_name [,machine_name...]] [—deactUser(s) user_name [,user_name...]] [—deactMachines(s) machine_name [,machine_name...]] [—debug] [-? | —help] [—man] [—quiet] [-v | —verbose] {[-p] project_name} $ gchproject -I chemistry Successfully modified 1 Project $ gchproject --addUsers jsmith,barney chemistry Successfully created 2 ProjectUsers $ gchproject --addMachines colony chemistry Successfully created 1 ProjectMachines """ gchproject()
def activate_user_from_project (self, project, userid): gchproject("--actUsers", userid)
def deactivate_project(self, name): gchproject("-I", name)
def add_user_to_projects(self, project, userid): gchproject("-addUsers", username, project)
def add_user_to_projects(self, project, userid): username = None # transfer user id to username gchproject("-addUsers", username, project)
def activate_user_from_project(self, project, userid): gchproject("--actUsers", userid)