Scalr\DataType\CloudPlatformSuspensionInfo::resume PHP Метод

resume() публичный Метод

Resumes cloud platform
public resume ( )
    public function resume()
    {
        foreach ([$this->suspended, $this->firstErrorOccurred, $this->lastErrorMessage] as $property) {
            if ($property instanceof EnvironmentProperty) {
                $property->delete();
            }
        }
        $this->suspended = null;
        $this->firstErrorOccurred = null;
        $this->lastErrorMessage = null;
    }

Usage Example

Пример #1
0
 public function xSaveCloudParamsAction()
 {
     $platform = $this->getParam('platform');
     if (PlatformFactory::isCloudstack($platform)) {
         $method = SERVER_PLATFORMS::CLOUDSTACK;
     } elseif (PlatformFactory::isOpenstack($platform)) {
         $method = SERVER_PLATFORMS::OPENSTACK;
     } else {
         $method = $platform;
     }
     $method = 'save' . ucfirst($method);
     if (method_exists($this, $method)) {
         $this->{$method}();
         $suspensionInfo = new CloudPlatformSuspensionInfo($this->env->id, $platform);
         $suspensionInfo->resume();
         $this->response->data(array('params' => $this->getCloudParams($platform)));
     } else {
         $this->response->failure('Under construction ...');
     }
 }