public function getPrivateCloud()
 {
     $company_service_id = intval($this->request->param('COMPANY_SERVICE_ID'));
     $private_cloud = $this->private_cloud_repository->getById($company_service_id);
     if (!$private_cloud) {
         return $this->notFound();
     }
     return $this->ok(CloudAssembler::convertCloudToArray($private_cloud));
 }
 public static function convertDataCenterLocationToArray(IDataCenterLocation $location)
 {
     $res = array();
     $res['city'] = $location->getCity();
     $res['state'] = $location->getState();
     $res['country'] = $location->getCountry();
     $res['region'] = strtolower(preg_replace('/[^A-Za-z0-9-]+/', '-', $location->getDataCenterRegion()->getName()));
     $res['availability_zones'] = array();
     foreach ($location->getAvailabilityZones() as $az) {
         array_push($res['availability_zones'], CloudAssembler::convertAZtoArray($az));
     }
     return $res;
 }
 public function getCurrentPrivateCloudJson()
 {
     $private_cloud = $this->getCurrentPrivateCloud();
     if ($private_cloud) {
         return json_encode(CloudAssembler::convertCloudToArray($private_cloud));
     }
 }