public function _cloudCredentialsType($from, $to, $action)
{
switch ($action) {
case static::ACT_CONVERT_TO_OBJECT:
/* @cloudCredentialsType $from Entity\CloudCredentials */
$to->cloudCredentialsType = static::CLOUD_CREDENTIALS_TYPE_RACKSPACE;
break;
case static::ACT_CONVERT_TO_ENTITY:
/* @var $to Entity\CloudCredentials */
if (!isset($from->isUk)) {
$to->cloud = SERVER_PLATFORMS::RACKSPACENG_US;
$from->keystoneUrl = static::RACKSPACE_KEYSTONE_URL_US;
$this->_keystoneUrl($from, $to, static::ACT_CONVERT_TO_ENTITY);
}
break;
case static::ACT_GET_FILTER_CRITERIA:
return [['cloud' => ['$in' => PlatformFactory::getRackspacePlatforms()]]];
}
}