PHP Класс Scalr\Model\Entity\SshKey

С версии: 5.5 (30.04.2015)
Автор: Igor Vodiasov ([email protected])
Наследование: extends Scalr\Model\AbstractEntity, implements Scalr\DataType\AccessPermissionsInterface
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$cloudKeyName string Name of Ssh Key in cloud
$cloudLocation string Cloud Location
$envId integer The identifier of the client's environment
$farmId integer The identifier of the farm
$id integer The identifier of Ssh Key
$platform string Platform
$privateKey string Private Key
$publicKey string Public Key
$type string Type of Ssh key

Открытые методы

Метод Описание
generateKeypair ( ) : array Generate private and public key
generatePublicKey ( ) : string Generate public key
getEnvironmentPlatforms ( $envId ) : array Get list of platforms where ssh keys are available on environment
getPuttyPrivateKey ( ) : string Convert private key to putty format
hasAccessPermissions ( $user, $environment = null, $modify = null )
isUsed ( ) : boolean Check if key is used by any farm role
loadGlobalByFarmId ( integer $envId, string $platform, string $cloudLocation, integer $farmId = null ) : SshKey | null Find global key by FarmID
loadGlobalByName ( integer $envId, string $platform, string $cloudLocation, string $name ) : SshKey | null Find global key by Name

Приватные методы

Метод Описание
getSshKeygenValue ( array $args, string $tmpFileContents, boolean $readTmpFile = false ) : string External call to ssh-keygen utility

Описание методов

generateKeypair() публичный метод

Generate private and public key
public generateKeypair ( ) : array
Результат array

generatePublicKey() публичный метод

Generate public key
public generatePublicKey ( ) : string
Результат string

getEnvironmentPlatforms() публичный метод

Get list of platforms where ssh keys are available on environment
public getEnvironmentPlatforms ( $envId ) : array
$envId
Результат array

getPuttyPrivateKey() публичный метод

Convert private key to putty format
public getPuttyPrivateKey ( ) : string
Результат string

hasAccessPermissions() публичный метод

См. также: Scalr\DataType\AccessPermissionsInterface::hasAccessPermissions()
public hasAccessPermissions ( $user, $environment = null, $modify = null )

isUsed() публичный метод

Check if key is used by any farm role
public isUsed ( ) : boolean
Результат boolean

loadGlobalByFarmId() публичный метод

Find global key by FarmID
public loadGlobalByFarmId ( integer $envId, string $platform, string $cloudLocation, integer $farmId = null ) : SshKey | null
$envId integer
$platform string
$cloudLocation string
$farmId integer optional
Результат SshKey | null

loadGlobalByName() публичный метод

Find global key by Name
public loadGlobalByName ( integer $envId, string $platform, string $cloudLocation, string $name ) : SshKey | null
$envId integer
$platform string
$cloudLocation string
$name string
Результат SshKey | null

Описание свойств

$cloudKeyName публичное свойство

Name of Ssh Key in cloud
public string $cloudKeyName
Результат string

$cloudLocation публичное свойство

Cloud Location
public string $cloudLocation
Результат string

$envId публичное свойство

The identifier of the client's environment
public int $envId
Результат integer

$farmId публичное свойство

The identifier of the farm
public int $farmId
Результат integer

$id публичное свойство

The identifier of Ssh Key
public int $id
Результат integer

$platform публичное свойство

Platform
public string $platform
Результат string

$privateKey публичное свойство

Private Key
public string $privateKey
Результат string

$publicKey публичное свойство

Public Key
public string $publicKey
Результат string

$type публичное свойство

Type of Ssh key
public string $type
Результат string