PHP Class BundleTask

Afficher le fichier Open project: scalr/scalr Class Usage Examples

Méthodes publiques

Свойство Type Description
$bundleType
$clientId
$cloudLocation
$createdByEmail
$createdById
$dateAdded deprecated, todo: remove
$dateFinished
$dateStarted
$description
$envId
$failureReason
$farmId
$id
$object
$objectScope
$osFamily
$osId
$osName
$osVersion
$platform
$prototypeRoleId
$removePrototypeRole
$replaceType
$roleId
$roleName
$serverId
$snapshotId
$status

Méthodes publiques

Méthode Description
Create ( ServerSnapshotCreateInfo $ServerSnapshotCreateInfo, $isRoleBuilder = false ) : BundleTask
GenerateRoleName ( $DBFarmRole, $DBServer )
LoadById ( integer $id ) : BundleTask
Log ( $message )
Save ( )
SnapshotCreationComplete ( $snapshotId, $metaData = [] )
SnapshotCreationFailed ( $failed_reason )
__construct ( $id )
createImageEntity ( ) : Image
designateType ( string $platform, string $family, string $generation = null, string $version = '' ) Designates the type of the bundle task
failObsoleteTasks ( integer $limit = null ) : integer Cancels obsolete tasks
getActiveTaskIdByName ( string $name, integer $accountId, integer $envId ) : integer | boolean Check if given name is already used in any running bundletask of this account or environment
getActiveTaskIdByRoleId ( integer $roleId, integer $envId, string $object ) : integer | boolean Check if there any running bundletask that will affect given role
getFarmObject ( ) : DBFarm Gets DBFarm object
getImageEntity ( ) : Image
getOsDetails ( )
getSnapshotDetails ( ) : ServerSnapshotDetails
setDate ( string $dt ) Sets a timestamps according to a specified event
setMetaData ( $data )

Private Methods

Méthode Description
Unbind ( )

Method Details

Create() public static méthode

public static Create ( ServerSnapshotCreateInfo $ServerSnapshotCreateInfo, $isRoleBuilder = false ) : BundleTask
$ServerSnapshotCreateInfo ServerSnapshotCreateInfo
Résultat BundleTask

GenerateRoleName() public static méthode

public static GenerateRoleName ( $DBFarmRole, $DBServer )

LoadById() public static méthode

public static LoadById ( integer $id ) : BundleTask
$id integer
Résultat BundleTask

Log() public méthode

public Log ( $message )

Save() public méthode

public Save ( )

SnapshotCreationComplete() public méthode

public SnapshotCreationComplete ( $snapshotId, $metaData = [] )

SnapshotCreationFailed() public méthode

public SnapshotCreationFailed ( $failed_reason )

__construct() public méthode

public __construct ( $id )

createImageEntity() public méthode

public createImageEntity ( ) : Image
Résultat Scalr\Model\Entity\Image

designateType() public méthode

It sets the type of bundle task to ec2.ebs-hvm to bundle in AWS way according to the OS version
public designateType ( string $platform, string $family, string $generation = null, string $version = '' )
$platform string The name of the cloud platform
$family string OS family
$generation string optional OS generation. If generation is not provided it will use version instead.
$version string optional OS version. If generation is not provided it will use version instead.

failObsoleteTasks() public static méthode

Cancels obsolete tasks
public static failObsoleteTasks ( integer $limit = null ) : integer
$limit integer
Résultat integer Returns number of cancelled tasks

getActiveTaskIdByName() public static méthode

Check if given name is already used in any running bundletask of this account or environment
public static getActiveTaskIdByName ( string $name, integer $accountId, integer $envId ) : integer | boolean
$name string Name of Role
$accountId integer Identifier of Account
$envId integer Identifier of Environment
Résultat integer | boolean Returns identifier of the Active BundleTask that matches the specified criteria or false otherwise

getActiveTaskIdByRoleId() public static méthode

Check if there any running bundletask that will affect given role
public static getActiveTaskIdByRoleId ( integer $roleId, integer $envId, string $object ) : integer | boolean
$roleId integer Identifier of Role
$envId integer Identifier of Account
$object string Object of BundleTask (role, image)
Résultat integer | boolean Returns identifier of the Active BundleTask that matches the specified criteria or false otherwise

getFarmObject() public méthode

Gets DBFarm object
public getFarmObject ( ) : DBFarm
Résultat DBFarm

getImageEntity() public méthode

public getImageEntity ( ) : Image
Résultat Scalr\Model\Entity\Image

getOsDetails() public méthode

public getOsDetails ( )

getSnapshotDetails() public méthode

public getSnapshotDetails ( ) : ServerSnapshotDetails
Résultat ServerSnapshotDetails

setDate() public méthode

Sets a timestamps according to a specified event
public setDate ( string $dt )
$dt string The name of event (finished | added | started)

setMetaData() public méthode

public setMetaData ( $data )

Property Details

$bundleType public_oe property

public $bundleType

$clientId public_oe property

public $clientId

$cloudLocation public_oe property

public $cloudLocation

$createdByEmail public_oe property

public $createdByEmail

$createdById public_oe property

public $createdById

$dateAdded public_oe property

deprecated, todo: remove
public $dateAdded

$dateFinished public_oe property

public $dateFinished

$dateStarted public_oe property

public $dateStarted

$description public_oe property

public $description

$envId public_oe property

public $envId

$failureReason public_oe property

public $failureReason

$farmId public_oe property

public $farmId

$id public_oe property

public $id

$object public_oe property

public $object

$objectScope public_oe property

public $objectScope

$osFamily public_oe property

public $osFamily

$osId public_oe property

public $osId

$osName public_oe property

public $osName

$osVersion public_oe property

public $osVersion

$platform public_oe property

public $platform

$prototypeRoleId public_oe property

public $prototypeRoleId

$removePrototypeRole public_oe property

public $removePrototypeRole

$replaceType public_oe property

public $replaceType

$roleId public_oe property

public $roleId

$roleName public_oe property

public $roleName

$serverId public_oe property

public $serverId

$snapshotId public_oe property

public $snapshotId

$status public_oe property

public $status