PHP 클래스 DBServer

파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$clientId
$cloudLocation
$cloudLocationZone
$dateAdded
$dateInitialized
$dateRebootStart
$dateShutdownScheduled
$envId
$farmId
$farmIndex
$farmRoleId
$imageId
$index
$instanceTypeName
$isScalarized
$lastSync
$localIp
$operations
$osType
$platform
$platformPropsClasses
$remoteIp
$serverId
$status

공개 메소드들

메소드 설명
Create ( ServerCreateInfo $creInfo, boolean $isImport = false, $setPendingStatus = false ) : DBServer
GetAllProperties ( )
GetClient ( ) : Client
GetCloudLocation ( ) : string Return cloud location (region)
GetCloudServerID ( boolean $skipCache = false ) : string Return real (Cloud) server ID
GetCloudUserData ( )
GetEnvironmentObject ( ) : Scalr_Environment
GetFarmObject ( ) : DBFarm Returns DBFarme object
GetFarmRoleObject ( ) : DBFarmRole Returns DBFarmRole object
GetFreeDeviceName ( $isHvm = false )
GetKey ( boolean $plain = false ) : string Returns Server authentification key (For messaging and Query-Env)
GetOsType ( ) : string
GetProperty ( string $propertyName, boolean $ignoreCache = false ) : mixed Get Server Property
GetRealStatus ( $skipCache = false ) : Scalr\Modules\Platforms\StatusAdapterInterface Gets real status
GetScalarizrVersion ( ) : array Return information about scalarizr version installed on instance
GetScriptingVars ( ) : array
GetSsh2Client ( ) : Scalr_Net_Ssh2_Client
IsExists ( $serverId )
IsRebooting ( )
IsSupported ( $v )
LoadByFarmRoleIDAndIndex ( integer $farm_roleid, integer $index ) : DBServer
LoadByID ( string $serverId ) : DBServer Loads server by specified identifier
LoadByLocalIp ( $localIp, $farmId )
LoadByPropertyValue ( string $propName, string $propValue ) : DBServer Return DBServer by property value
Remove ( ) : void Removes server from database
Save ( )
SendMessage ( Scalr_Messaging_Msg $message, $isEventNotice = false, $delayed = false ) : Scalr_Messaging_Msg Send message to instance
SetProperties ( array $props ) Set multiple server properties
SetProperty ( string $propertyName, mixed $propertyValue ) : void Set server property
__construct ( $serverId )
__destruct ( )
__get ( $name )
__sleep ( )
applyGlobalVarsToValue ( $value )
checkRequestRate ( string $resourseName = '' ) : integer Checks scalr inbound request rate (req/min)
executeScript ( array $script, Scalr_Messaging_Msg_ExecScript $msg ) : void Executes script
getAwsTags ( string $addNameTag = false ) : array Return list of tags that should be applied on EC2 resources
getAzureTags ( ) : array Return list of tags that should be applied for Azure instances
getFieldPropertyMap ( ) : array Gets array of DBServer public fields and db columns
getLaunchReason ( $reasonId )
getNameByConvention ( )
getOpenstackTags ( ) : array Return list of tags that should be applied for Openstack instances
getPort ( $portType )
getScalarizrRepository ( )
getServerHistory ( ) : Scalr\Model\Entity\Server\History Gets server history object
getSzrHost ( )
getTerminateReason ( integer $reasonId ) : string Gets terminate reason
getTerminatingServers ( ) : array Gets a list of servers which in the termination process
getType ( ) : string Return server flavor (instance type)
isCloudstack ( )
isOpenstack ( )
listByFilter ( array $filter = null ) : array Gets a list of servers by filter
load ( $serverinfo )
setOsType ( string $osType ) : DBServer Sets OS type
setScalarizrVersion ( $version )
setType ( string $type ) : DBServer Sets instance type type
suspend ( string | array $reason, boolean $forcefully = null, Scalr_Account_User | integer $user = null ) Marks server as to be suspended.
terminate ( integer | array $reason, boolean $forcefully = null, Scalr_Account_User | integer $user = null ) Marks server as to be terminated.
update ( array | Iterator $props ) Updates specified properties to database
updateStatus ( string $serverStatus ) : DBServer Updates Server status
updateTimelog ( $pointName, $secondsSinceBoot = null, $secondsSinceStart = null )

비공개 메소드들

메소드 설명
GetVersionInfo ( $v )
Unbind ( )

메소드 상세

Create() 공개 정적인 메소드

public static Create ( ServerCreateInfo $creInfo, boolean $isImport = false, $setPendingStatus = false ) : DBServer
$creInfo ServerCreateInfo
$isImport boolean
리턴 DBServer

GetAllProperties() 공개 메소드

public GetAllProperties ( )

GetClient() 공개 메소드

public GetClient ( ) : Client
리턴 Client

GetCloudLocation() 공개 메소드

Return cloud location (region)
public GetCloudLocation ( ) : string
리턴 string

GetCloudServerID() 공개 메소드

Return real (Cloud) server ID
public GetCloudServerID ( boolean $skipCache = false ) : string
$skipCache boolean
리턴 string

GetCloudUserData() 공개 메소드

public GetCloudUserData ( )

GetEnvironmentObject() 공개 메소드

public GetEnvironmentObject ( ) : Scalr_Environment
리턴 Scalr_Environment

GetFarmObject() 공개 메소드

Returns DBFarme object
public GetFarmObject ( ) : DBFarm
리턴 DBFarm

GetFarmRoleObject() 공개 메소드

Returns DBFarmRole object
public GetFarmRoleObject ( ) : DBFarmRole
리턴 DBFarmRole

GetFreeDeviceName() 공개 메소드

public GetFreeDeviceName ( $isHvm = false )

GetKey() 공개 메소드

Returns Server authentification key (For messaging and Query-Env)
public GetKey ( boolean $plain = false ) : string
$plain boolean
리턴 string

GetOsType() 공개 메소드

public GetOsType ( ) : string
리턴 string windows | linux

GetProperty() 공개 메소드

Get Server Property
public GetProperty ( string $propertyName, boolean $ignoreCache = false ) : mixed
$propertyName string
$ignoreCache boolean
리턴 mixed

GetRealStatus() 공개 메소드

Gets real status
public GetRealStatus ( $skipCache = false ) : Scalr\Modules\Platforms\StatusAdapterInterface
리턴 Scalr\Modules\Platforms\StatusAdapterInterface

GetScalarizrVersion() 공개 메소드

Return information about scalarizr version installed on instance
public GetScalarizrVersion ( ) : array
리턴 array

GetScriptingVars() 공개 메소드

public GetScriptingVars ( ) : array
리턴 array

GetSsh2Client() 공개 메소드

public GetSsh2Client ( ) : Scalr_Net_Ssh2_Client
리턴 Scalr_Net_Ssh2_Client Enter description here ...

IsExists() 공개 정적인 메소드

public static IsExists ( $serverId )

IsRebooting() 공개 메소드

public IsRebooting ( )

IsSupported() 공개 메소드

public IsSupported ( $v )

LoadByFarmRoleIDAndIndex() 공개 정적인 메소드

public static LoadByFarmRoleIDAndIndex ( integer $farm_roleid, integer $index ) : DBServer
$farm_roleid integer
$index integer
리턴 DBServer

LoadByID() 공개 정적인 메소드

Loads server by specified identifier
public static LoadByID ( string $serverId ) : DBServer
$serverId string
리턴 DBServer

LoadByLocalIp() 공개 정적인 메소드

public static LoadByLocalIp ( $localIp, $farmId )

LoadByPropertyValue() 공개 정적인 메소드

Return DBServer by property value
public static LoadByPropertyValue ( string $propName, string $propValue ) : DBServer
$propName string
$propValue string
리턴 DBServer

Remove() 공개 메소드

Removes server from database
public Remove ( ) : void
리턴 void

Save() 공개 메소드

public Save ( )

SendMessage() 공개 메소드

Send message to instance
public SendMessage ( Scalr_Messaging_Msg $message, $isEventNotice = false, $delayed = false ) : Scalr_Messaging_Msg
$message Scalr_Messaging_Msg
리턴 Scalr_Messaging_Msg

SetProperties() 공개 메소드

Set multiple server properties
public SetProperties ( array $props )
$props array Associative array of the properties array(property => value)

SetProperty() 공개 메소드

Set server property
public SetProperty ( string $propertyName, mixed $propertyValue ) : void
$propertyName string
$propertyValue mixed
리턴 void

__construct() 공개 메소드

public __construct ( $serverId )

__destruct() 공개 메소드

public __destruct ( )

__get() 공개 메소드

public __get ( $name )

__sleep() 공개 메소드

public __sleep ( )

applyGlobalVarsToValue() 공개 메소드

public applyGlobalVarsToValue ( $value )

checkRequestRate() 공개 메소드

Checks scalr inbound request rate (req/min)
public checkRequestRate ( string $resourseName = '' ) : integer
$resourseName string optional Resourse name
리턴 integer Returns the number of the requests per minute

executeScript() 공개 메소드

Executes script
public executeScript ( array $script, Scalr_Messaging_Msg_ExecScript $msg ) : void
$script array Script settings
$msg Scalr_Messaging_Msg_ExecScript Scalarizr message
리턴 void

getAwsTags() 공개 메소드

Return list of tags that should be applied on EC2 resources
public getAwsTags ( string $addNameTag = false ) : array
$addNameTag string
리턴 array

getAzureTags() 공개 메소드

Return list of tags that should be applied for Azure instances
public getAzureTags ( ) : array
리턴 array

getFieldPropertyMap() 공개 정적인 메소드

Gets array of DBServer public fields and db columns
public static getFieldPropertyMap ( ) : array
리턴 array

getLaunchReason() 공개 정적인 메소드

public static getLaunchReason ( $reasonId )

getNameByConvention() 공개 메소드

public getNameByConvention ( )

getOpenstackTags() 공개 메소드

Return list of tags that should be applied for Openstack instances
public getOpenstackTags ( ) : array
리턴 array

getPort() 공개 메소드

public getPort ( $portType )

getScalarizrRepository() 공개 메소드

getServerHistory() 공개 메소드

Gets server history object
또한 보기: Scalr\Model\Entity\Server::getHistory()
사용 중단:
public getServerHistory ( ) : Scalr\Model\Entity\Server\History
리턴 Scalr\Model\Entity\Server\History Returns server history object

getSzrHost() 공개 메소드

public getSzrHost ( )

getTerminateReason() 공개 정적인 메소드

Gets terminate reason
또한 보기: Scalr\Model\Entity\Server::getTerminateReason()
사용 중단:
public static getTerminateReason ( integer $reasonId ) : string
$reasonId integer Reason id
리턴 string

getTerminatingServers() 공개 정적인 메소드

Gets a list of servers which in the termination process
public static getTerminatingServers ( ) : array
리턴 array Returns the list of the servers

getType() 공개 메소드

Return server flavor (instance type)
public getType ( ) : string
리턴 string

isCloudstack() 공개 메소드

public isCloudstack ( )

isOpenstack() 공개 메소드

public isOpenstack ( )

listByFilter() 공개 정적인 메소드

Gets a list of servers by filter
public static listByFilter ( array $filter = null ) : array
$filter array optional Filter value ['envId' => 'value']
리턴 array Returns array of DBServer objects

load() 공개 정적인 메소드

public static load ( $serverinfo )

setOsType() 공개 메소드

Sets OS type
public setOsType ( string $osType ) : DBServer
$osType string Operating System type (linux/windows)
리턴 DBServer

setScalarizrVersion() 공개 메소드

public setScalarizrVersion ( $version )

setType() 공개 메소드

Sets instance type type
public setType ( string $type ) : DBServer
$type string
리턴 DBServer

suspend() 공개 메소드

Marks server as to be suspended.
public suspend ( string | array $reason, boolean $forcefully = null, Scalr_Account_User | integer $user = null )
$reason string | array The reason possibly with the format parameters.
$forcefully boolean optional Method: forcefully (true) | gracefully (false)
$user Scalr_Account_User | integer optional The user object or its unique identifier

terminate() 공개 메소드

Marks server as to be terminated.
public terminate ( integer | array $reason, boolean $forcefully = null, Scalr_Account_User | integer $user = null )
$reason integer | array The reason possibly with the format parameters.
$forcefully boolean optional Method: forcefully (true) | gracefully (false)
$user Scalr_Account_User | integer optional The user object or its unique identifier

update() 공개 메소드

Updates specified properties to database
public update ( array | Iterator $props )
$props array | Iterator The list of the properties to update

updateStatus() 공개 메소드

Updates Server status
public updateStatus ( string $serverStatus ) : DBServer
$serverStatus string The status
리턴 DBServer

updateTimelog() 공개 메소드

public updateTimelog ( $pointName, $secondsSinceBoot = null, $secondsSinceStart = null )

프로퍼티 상세

$clientId 공개적으로 프로퍼티

public $clientId

$cloudLocation 공개적으로 프로퍼티

public $cloudLocation

$cloudLocationZone 공개적으로 프로퍼티

public $cloudLocationZone

$dateAdded 공개적으로 프로퍼티

public $dateAdded

$dateInitialized 공개적으로 프로퍼티

public $dateInitialized

$dateRebootStart 공개적으로 프로퍼티

public $dateRebootStart

$dateShutdownScheduled 공개적으로 프로퍼티

public $dateShutdownScheduled

$envId 공개적으로 프로퍼티

public $envId

$farmId 공개적으로 프로퍼티

public $farmId

$farmIndex 공개적으로 프로퍼티

public $farmIndex

$farmRoleId 공개적으로 프로퍼티

public $farmRoleId

$imageId 공개적으로 프로퍼티

public $imageId

$index 공개적으로 프로퍼티

public $index

$instanceTypeName 공개적으로 프로퍼티

public $instanceTypeName

$isScalarized 공개적으로 프로퍼티

public $isScalarized

$lastSync 공개적으로 프로퍼티

public $lastSync

$localIp 공개적으로 프로퍼티

public $localIp

$operations 공개적으로 프로퍼티

public $operations

$osType 공개적으로 프로퍼티

public $osType

$platform 공개적으로 프로퍼티

public $platform

$platformPropsClasses 공개적으로 정적으로 프로퍼티

public static $platformPropsClasses

$remoteIp 공개적으로 프로퍼티

public $remoteIp

$serverId 공개적으로 프로퍼티

public $serverId

$status 공개적으로 프로퍼티

public $status