VolumeManager
extends VolumeManagerAbstraction
in package
Table of Contents
- $errorLogName : string
- $warningLogName : string
- $apiVersion : string
- API Version
- $authenticationManager : AuthenticationManager
- The authentication manager, used to interact with Open Stack APIs
- $jobsLogName : string
- The name of the log in which we are going to log actions performed by jobs
- $volume_type_id : string
- __construct() : mixed
- attach() : bool
- delete() : bool
- detach() : bool
- extend() : bool
- Extend a volume to a new size
- fromOpenStack() : Volume
- Fill model from OpenStack
- getAuthenticationManager() : AuthenticationManager
- hasChanged() : bool
- import() : Volume
- logEntry() : Activity
- logEntryWithoutModel() : Activity
- logError() : Activity
- logWarning() : Activity
- refresh() : bool
- retrieveOrImport() : Volume
- retrieveVolumeTypes() : array<string|int, mixed>|Generator
- setAuthenticationManager() : OpenStackObjectManager
- toOpenStack() : Volume
- Fill OpenStack from model
- toOpenStackArray() : array<string|int, mixed>
- Prepare an array to be used vs OpenStack
- log() : array<string|int, Activity>
- create() : void
- getBlockStorageService() : Service
- Internal function used to retrieve the Block Storage service from the Open Stack API
- getOpenStackVolume() : Volume
- update() : void
Properties
$errorLogName
public
static string
$errorLogName
= "error"
$warningLogName
public
static string
$warningLogName
= "warning"
$apiVersion
API Version
protected
static string
$apiVersion
= 'v1'
$authenticationManager
The authentication manager, used to interact with Open Stack APIs
protected
AuthenticationManager
$authenticationManager
$jobsLogName
The name of the log in which we are going to log actions performed by jobs
protected
string
$jobsLogName
= "jobs"
$volume_type_id
private
string
$volume_type_id
the default volume id
Methods
__construct()
public
__construct(AuthenticationManager $authenticationManager) : mixed
Parameters
- $authenticationManager : AuthenticationManager
Return values
mixed —attach()
public
attach(Volume $volume, Server $server) : bool
Parameters
Tags
Return values
bool —delete()
public
delete(Volume $volume) : bool
Parameters
- $volume : Volume
Tags
Return values
bool —detach()
public
detach(Volume $volume, Server $server) : bool
Parameters
Tags
Return values
bool —extend()
Extend a volume to a new size
public
extend(Volume $volume, int $size) : bool
The size must be greater than the current size
Parameters
- $volume : Volume
-
the volume to extend
- $size : int
-
the new size in GiB
Tags
Return values
bool —fromOpenStack()
Fill model from OpenStack
public
fromOpenStack(Volume $volume, Volume $openStackVolume) : Volume
Parameters
- $volume : Volume
- $openStackVolume : Volume
Tags
Return values
Volume —getAuthenticationManager()
public
getAuthenticationManager() : AuthenticationManager
Return values
AuthenticationManager —hasChanged()
public
hasChanged(Volume $volume) : bool
Parameters
- $volume : Volume
Tags
Return values
bool —import()
public
import(string $external_id) : Volume
Parameters
- $external_id : string
Tags
Return values
Volume —logEntry()
public
static logEntry(Model $model, array<string|int, mixed> $properties, string $description, string $event, string $logName) : Activity
Parameters
- $model : Model
- $properties : array<string|int, mixed>
- $description : string
- $event : string
- $logName : string
Return values
Activity —logEntryWithoutModel()
public
static logEntryWithoutModel(array<string|int, mixed> $properties, string $description, string $event, string $logName) : Activity
Parameters
- $properties : array<string|int, mixed>
- $description : string
- $event : string
- $logName : string
Return values
Activity —logError()
public
static logError(Model $model, array<string|int, mixed> $properties, string $description, string $event) : Activity
Parameters
- $model : Model
- $properties : array<string|int, mixed>
- $description : string
- $event : string
Return values
Activity —logWarning()
public
static logWarning(Model $model, array<string|int, mixed> $properties, string $description, string $event) : Activity
Parameters
- $model : Model
- $properties : array<string|int, mixed>
- $description : string
- $event : string
Return values
Activity —refresh()
public
refresh(Volume $volume[, Volume|OperatorResource|null $openStackVolume = null ]) : bool
Parameters
- $volume : Volume
- $openStackVolume : Volume|OperatorResource|null = null
Return values
bool —retrieveOrImport()
public
retrieveOrImport(string $external_id[, bool $refresh = false ]) : Volume
Parameters
- $external_id : string
- $refresh : bool = false
Tags
Return values
Volume —retrieveVolumeTypes()
public
retrieveVolumeTypes() : array<string|int, mixed>|Generator
Return values
array<string|int, mixed>|Generator —setAuthenticationManager()
public
setAuthenticationManager([AuthenticationManager|null $authenticationManager = null ]) : OpenStackObjectManager
Parameters
- $authenticationManager : AuthenticationManager|null = null
Return values
OpenStackObjectManager —toOpenStack()
Fill OpenStack from model
public
toOpenStack(Volume $volume, Volume $openStackVolume) : Volume
Parameters
- $volume : Volume
- $openStackVolume : Volume
Return values
Volume —toOpenStackArray()
Prepare an array to be used vs OpenStack
public
toOpenStackArray(Volume $volume) : array<string|int, mixed>
Parameters
- $volume : Volume
Return values
array<string|int, mixed> —log()
protected
log(Model|array<string|int, mixed> $models, array<string|int, mixed> $properties, string $description[, null $logName = null ]) : array<string|int, Activity>
Parameters
- $models : Model|array<string|int, mixed>
- $properties : array<string|int, mixed>
- $description : string
- $logName : null = null
Return values
array<string|int, Activity> —create()
private
create(Volume $volume) : void
Parameters
- $volume : Volume
Tags
Return values
void —getBlockStorageService()
Internal function used to retrieve the Block Storage service from the Open Stack API
private
getBlockStorageService() : Service
Return values
Service —getOpenStackVolume()
private
getOpenStackVolume( $id[, bool $retrieve = false ]) : Volume
Parameters
Tags
Return values
Volume —update()
private
update(Volume $volume) : void
Parameters
- $volume : Volume