예제 #1
0
 /**
  * Creates a vm group
  *
  * @param CreateInstanceGroupData $requestData Request data object
  * @return InstanceGroupData
  */
 public function createInstanceGroup(CreateInstanceGroupData $requestData)
 {
     $result = null;
     $response = $this->getClient()->call('createInstanceGroup', $requestData->toArray());
     if ($response->hasError() === false) {
         $resultObject = $response->getResult();
         if (!empty($resultObject)) {
             $result = $this->_loadInstanceGroupData($resultObject);
         }
     }
     return $result;
 }
예제 #2
0
 /**
  * Creates a vm group
  *
  * @param CreateInstanceGroupData|array $request Request data object
  * @return InstanceGroupData
  */
 public function create($request)
 {
     if ($request !== null && !$request instanceof CreateInstanceGroupData) {
         $request = CreateInstanceGroupData::initArray($request);
     }
     return $this->getApiHandler()->createInstanceGroup($request);
 }