PHP Class Scalr\Model\Entity\FarmRole

Author: N.V.
Inheritance: extends Scalr\Model\AbstractEntity, implements Scalr\DataType\AccessPermissionsInterface
Mostra file Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$alias string Farm alias
$cloudLocation string Cloud location
$farmId integer Farm Id
$id integer Identifier
$lastSync DateTime Time of last synchronization
$launchIndex integer launch index
$launchTimeout integer Launch timeout
$platform string Role platform
$rebootTimeout integer Reboot timeout
$roleId integer Role Id
$statusTimeout integer Status refresh timeout

Protected Properties

Property Type Description
$_farm Farm Farm entity
$_farmRoleMetrics FarmRoleScalingMetric[] The list of farm role scaling metrics
$_image Image Image entity
$_role Role Role entity
$_settings Scalr\Model\Collections\SettingsCollection Farm role settings collection

Public Methods

Method Description
__get ( string $name ) : mixed Magic getter.
delete ( )
deleteScheduled ( ) Deletes scheduled tasks
getCloudTags ( boolean $addNameTag = false ) : array This method was done for server import, but it has been already refactored in SCALRCORE-2867.
getFarm ( ) : Farm | null Get Farm entity
getImage ( ) : Image | null Gets the Image Entity
getRole ( ) : Role | null Get Role entity
getServerImport ( User $user ) : AbstractServerImport Return ServerImport class
hasAccessPermissions ( $user, $environment = null, $modify = null )
listFarmRoleMetric ( integer $farmRoleId ) : array Get a list of names farm-role scaling metrics.
save ( )
setupAlias ( ) Setups farm role alias
setupAnalytics ( ) Setups farm role analytics tags
setupBehaviors ( ) Setups farm role settings related to role behaviors
setupPolling ( ) Setups polling settings
setupRole ( )
setupScaling ( ) Setups farm role scaling settings
terminateServers ( ) Terminates servers used this farm role

Method Details

__get() public method

Gets the values of the properties that require initialization.
public __get ( string $name ) : mixed
$name string Name of property that is accessed
return mixed Returns property value

delete() public method

See also: AbstractEntity::delete()
public delete ( )

deleteScheduled() public method

Deletes scheduled tasks
public deleteScheduled ( )

getCloudTags() public method

Return list of tags that should be applied on cloud resources. GV interpolation IS NOT applied on it yet.
public getCloudTags ( boolean $addNameTag = false ) : array
$addNameTag boolean optional If true add tag Name (on EC2 cloud)
return array Return list of tags [key => value]

getFarm() public method

Get Farm entity
public getFarm ( ) : Farm | null
return Farm | null

getImage() public method

Gets the Image Entity
public getImage ( ) : Image | null
return Image | null Returns the Image that corresponds to the Server

getRole() public method

Get Role entity
public getRole ( ) : Role | null
return Role | null

getServerImport() public method

Return ServerImport class
public getServerImport ( User $user ) : AbstractServerImport
$user Scalr\Model\Entity\Account\User
return Scalr\Server\Import\AbstractServerImport

hasAccessPermissions() public method

See also: AccessPermissionsInterface::hasAccessPermissions()
public hasAccessPermissions ( $user, $environment = null, $modify = null )

listFarmRoleMetric() public static method

Get a list of names farm-role scaling metrics.
public static listFarmRoleMetric ( integer $farmRoleId ) : array
$farmRoleId integer farm-role identifier
return array

save() public method

See also: AbstractEntity::save()
public save ( )

setupAlias() public method

Setups farm role alias
public setupAlias ( )

setupAnalytics() public method

Setups farm role analytics tags
public setupAnalytics ( )

setupBehaviors() public method

Setups farm role settings related to role behaviors
public setupBehaviors ( )

setupPolling() public method

Setups polling settings
public setupPolling ( )

setupRole() public method

public setupRole ( )

setupScaling() public method

Setups farm role scaling settings
public setupScaling ( )

terminateServers() public method

Terminates servers used this farm role
public terminateServers ( )

Property Details

$_farm protected_oe property

Farm entity
protected Farm,Scalr\Model\Entity $_farm
return Farm

$_farmRoleMetrics protected_oe property

The list of farm role scaling metrics
protected FarmRoleScalingMetric[],Scalr\Model\Entity $_farmRoleMetrics
return FarmRoleScalingMetric[]

$_image protected_oe property

Image entity
protected Image,Scalr\Model\Entity $_image
return Image

$_role protected_oe property

Role entity
protected Role,Scalr\Model\Entity $_role
return Role

$_settings protected_oe property

Farm role settings collection
protected SettingsCollection,Scalr\Model\Collections $_settings
return Scalr\Model\Collections\SettingsCollection

$alias public_oe property

Farm alias
public string $alias
return string

$cloudLocation public_oe property

Cloud location
public string $cloudLocation
return string

$farmId public_oe property

Farm Id
public int $farmId
return integer

$id public_oe property

Identifier
public int $id
return integer

$lastSync public_oe property

Time of last synchronization
public DateTime $lastSync
return DateTime

$launchIndex public_oe property

launch index
public int $launchIndex
return integer

$launchTimeout public_oe property

Launch timeout
public int $launchTimeout
return integer

$platform public_oe property

Role platform
public string $platform
return string

$rebootTimeout public_oe property

Reboot timeout
public int $rebootTimeout
return integer

$roleId public_oe property

Role Id
public int $roleId
return integer

$statusTimeout public_oe property

Status refresh timeout
public int $statusTimeout
return integer