示例#1
0
 static function addCommand($parent, $class, $p)
 {
     checkIfVariablesSet($p, array('name', 'v-password', 'v-num_ipaddress_f', 'v-contactemail', 'v-syncserver', 'v-ostemplate'));
     checkIfVariablesSetOr($p, $param, 'resourceplan_f', array('v-plan_name'));
     checkIfVariablesSetOr($p, $param, 'ttype', array('v-type'));
     /*
     	if (!cse($p['name'], ".vm")) {
     		throw new lxexception("name_should_end_in_.vm", '', '');
     	}
     */
     $param['nname'] = $p['name'];
     $param['nname'] = strtolower($param['nname']);
     $dname = $param['nname'];
     $param['rootpassword'] = $p['v-password'];
     $param['use_resourceplan_f'] = 'on';
     return $param;
 }
示例#2
0
 function commandUpdate($subaction, $param)
 {
     switch ($subaction) {
         case "change_plan":
             checkIfVariablesSetOr($param, $param, 'newresourceplan', array('resourceplan_name'));
             break;
     }
     return $param;
 }
示例#3
0
 static function addCommand($parent, $class, $p)
 {
     //need to handel v-num_ipv6address = NULL as it currently breaks the creation API
     checkIfVariablesSet($p, array('name', 'v-password', 'v-num_ipaddress_f', 'v-num_ipv6address_f', 'v-contactemail', 'v-syncserver', 'v-ostemplate'));
     checkIfVariablesSetOr($p, $param, 'resourceplan_f', array('v-plan_name'));
     checkIfVariablesSetOr($p, $param, 'ttype', array('v-type'));
     $param['nname'] = $p['name'];
     $param['nname'] = strtolower($param['nname']);
     $dname = $param['nname'];
     $param['rootpassword'] = $p['v-password'];
     $param['use_resourceplan_f'] = 'on';
     return $param;
 }