Property | Type | Description | |
---|---|---|---|
$accountId | integer | Identifier of the Client's Account | |
$added | DateTime | Added time | |
$cloudLocation | string | Server cloud location | |
$cloudLocationZone | string | Zone a cloud is located | |
$envId | integer | Environment identifier | |
$farmId | integer | Farm identifier | |
$farmIndex | integer | Index within the Farm | |
$farmRoleId | integer | Identifier for the role in a farm | |
$id | integer | The identifier of the Server | |
$imageId | string | Image identifier | |
$index | integer | Index within the Farm Role | |
$initialized | DateTime | Initialized time | |
$instanceTypeName | string | Server instance type name | |
$lastSync | DateTime | Time the synchronization occured last | |
$localIp | string | Server local Ip | |
$os | string | Server OS type | |
$platform | string | Server platform | |
$rebootStart | DateTime | Time when server has been either rebooted or started | |
$remoteIp | string | Server remote Ip | |
$scalarized | boolean | Whether server is scalarized | |
$serverId | string | Server unique identifier | |
$shutdownScheduled | DateTime | Sheduled time for shutdown | |
$status | string | Status of a server | |
$type | string | Server instance type |
Property | Type | Description | |
---|---|---|---|
$_environment | |||
$_farm | |||
$_farmRole | |||
$_image | |||
$_properties | Server properties collection | ||
$_scalarizr | Scalr_Net_Scalarizr_Client | ||
$_scalarizrUpdateClient | Scalr_Net_Scalarizr_UpdateClient | ||
$_serverHistory | Scalr\Model\Entity\Server\History |
Method | Description | |
---|---|---|
__get ( string $name ) : mixed | Magic getter | |
__getDBServer ( ) : DBServer | Gets old model from entity | |
__getEntityFromDBServer ( DBServer $DBServer ) : |
Gets entity from old model | |
delete ( ) | ||
findPk ( $serverId ) : mixed | Temporary solution until we make serverId as primary key | |
findWithProperties ( array $criteria = null, array $group = null, array $order = null, integer $limit = null, integer $offset = null, boolean $countRecords = null ) : |
Searches servers by criteria and selecting and initiating their Properties | |
getEnvironment ( ) : |
Get Environment entity | |
getFarm ( ) : |
Get Farm entity | |
getFarmRole ( ) : |
Get FarmRole entity | |
getHistory ( ) : Scalr\Model\Entity\Server\History | Gets server history entity | |
getImage ( ) : |
Get Image entity | |
getImportantPropertyList ( ) : array | Gets a list of important properties which must not be deleted | |
getPort ( string $portType ) : integer | Gets port | |
getSettingCriteria ( string $name, string $value = null, array $criteria = null ) : array | Gets filter criteria by the setting | |
getTerminateReason ( integer $reasonId ) : string | Gets terminate reason | |
hasAccessPermissions ( $user, $environment = null, $modify = null ) | ||
isVersionSupported ( string $v ) : boolean | Check if given version is less than scalarizr version | |
reboot ( boolean $hard = false ) | Reboot action | |
resume ( ) | Resume action | |
save ( ) | ||
setFreeFarmIndex ( ) | Set free farm index for new server | |
setFreeFarmRoleIndex ( ) | Set free farm role index for new server | |
setOs ( string $osType ) : |
Sets OS type | |
setTimeLog ( string $field, integer $secondsSinceBoot = null, integer $secondsSinceStart = null ) : boolean | Add record for servers_launch_timelog | |
suspend ( |
Marks server as to be suspended. | |
terminate ( integer | array $reason, boolean $forcefully = null, |
Marks server as to be terminated. | |
updateStatus ( string $serverStatus ) : |
Updates Server status | |
versionInfo ( string $v ) : int[] | Parses version info into machine representation |
public __getDBServer ( ) : DBServer | ||
return | DBServer |
public __getEntityFromDBServer ( DBServer $DBServer ) : |
||
$DBServer | DBServer | Db server object |
return |
public static findWithProperties ( array $criteria = null, array $group = null, array $order = null, integer $limit = null, integer $offset = null, boolean $countRecords = null ) : |
||
$criteria | array | optional The search criteria. |
$group | array | optional The group by looks like [property1, ...], by default groups by `serverId` |
$order | array | optional The results order looks like [property1 => true|false, ... ] |
$limit | integer | optional The records limit |
$offset | integer | optional The offset |
$countRecords | boolean | optional True to calculate total number of the records without limit |
return | Returns collection of the entities. |
public getEnvironment ( ) : |
||
return | Return Environment entity or null |
public getFarmRole ( ) : |
||
return | Returns the FarmRole entity which is associated with the Server or null otherwise |
public getHistory ( ) : Scalr\Model\Entity\Server\History | ||
return | Scalr\Model\Entity\Server\History | Returns server history entity |
public static getImportantPropertyList ( ) : array | ||
return | array | Returns array of properties |
public static getTerminateReason ( integer $reasonId ) : string | ||
$reasonId | integer | Reason id |
return | string |
public hasAccessPermissions ( $user, $environment = null, $modify = null ) |
public isVersionSupported ( string $v ) : boolean | ||
$v | string | Version |
return | boolean |
public setFreeFarmRoleIndex ( ) |
public setTimeLog ( string $field, integer $secondsSinceBoot = null, integer $secondsSinceStart = null ) : boolean | ||
$field | string | Field name which we should update |
$secondsSinceBoot | integer | optional Seconds since boot. Field is used for field ts_hi If field is ts_launched, ts_hi, ts_bhu, ts_hu, value could be used as timestamp |
$secondsSinceStart | integer | optional Seconds since start. Field is used for field ts_hi |
return | boolean |
public terminate ( integer | array $reason, boolean $forcefully = null, |
||
$reason | integer | array | The reason possibly with the format parameters. |
$forcefully | boolean | optional Method: forcefully (true) | gracefully (false) |
$user | optional The user entity | |
return | boolean |
public updateStatus ( string $serverStatus ) : |
||
$serverStatus | string | The status |
return |
public static versionInfo ( string $v ) : int[] | ||
$v | string | String representation of a version |
return | int[] |
protected Environment,Scalr\Model\Entity\Account $_environment | ||
return |
protected SettingsCollection,Scalr\Model\Collections $_properties | ||
return |
protected Scalr_Net_Scalarizr_Client $_scalarizr | ||
return | Scalr_Net_Scalarizr_Client |
protected Scalr_Net_Scalarizr_UpdateClient $_scalarizrUpdateClient | ||
return | Scalr_Net_Scalarizr_UpdateClient |
protected History,Scalr\Model\Entity\Server $_serverHistory | ||
return | Scalr\Model\Entity\Server\History |
public int $accountId | ||
return | integer |
public string $cloudLocationZone | ||
return | string |
public int $farmRoleId | ||
return | integer |
public string $instanceTypeName | ||
return | string |
public DateTime $lastSync | ||
return | DateTime |
public DateTime $rebootStart | ||
return | DateTime |
public DateTime $shutdownScheduled | ||
return | DateTime |