PHP Class Scalr\Tests\Functional\Api\Service\User\V1beta0\Controller\ServersTest

Author: Vlad Dobrovolskiy [email protected]
Show file Open project: scalr/scalr

Public Properties

Property Type Description
$uuid string

Protected Properties

Property Type Description
$loggerConfiguration

Public Methods

Method Description
__construct ( $name = null, $data = [], $dataName = null )
createTestFarm ( string $name, array $rolesNames ) : Farm Creates new farm for testing purposes
getServer ( string $serverId ) : Scalr\Tests\Functional\Api\ApiTestResponse Fetches server's data
listServers ( array $parent = [], array $filters = [] ) : array Describes servers
rebootServer ( string $serverId, boolean $hard = false ) : Scalr\Tests\Functional\Api\ApiTestResponse Reboots the server
resumeServer ( string $serverId ) : Scalr\Tests\Functional\Api\ApiTestResponse Resumes the server
suspendServer ( string $serverId ) : Scalr\Tests\Functional\Api\ApiTestResponse Suspends the server
tearDownAfterClass ( )
terminateServer ( string $serverId, boolean $force = false ) : Scalr\Tests\Functional\Api\ApiTestResponse Terminates the server
testComplex ( )

Protected Methods

Method Description
tearDown ( )

Private Methods

Method Description
waitForChanges ( string $serverId, string $status, integer $timeOut = 300 ) : mixed Waits until status changes

Method Details

__construct() public method

public __construct ( $name = null, $data = [], $dataName = null )

createTestFarm() public method

Creates new farm for testing purposes
public createTestFarm ( string $name, array $rolesNames ) : Farm
$name string Farm name
$rolesNames array Roles names
return Scalr\Model\Entity\Farm

getServer() public method

Fetches server's data
public getServer ( string $serverId ) : Scalr\Tests\Functional\Api\ApiTestResponse
$serverId string Server's UUID
return Scalr\Tests\Functional\Api\ApiTestResponse

listServers() public method

Describes servers
public listServers ( array $parent = [], array $filters = [] ) : array
$parent array optional Farm or farm role that servers belong to
$filters array optional Filter values
return array

rebootServer() public method

Reboots the server
public rebootServer ( string $serverId, boolean $hard = false ) : Scalr\Tests\Functional\Api\ApiTestResponse
$serverId string Server's UUID
$hard boolean optional
return Scalr\Tests\Functional\Api\ApiTestResponse

resumeServer() public method

Resumes the server
public resumeServer ( string $serverId ) : Scalr\Tests\Functional\Api\ApiTestResponse
$serverId string Server's UUID
return Scalr\Tests\Functional\Api\ApiTestResponse

suspendServer() public method

Suspends the server
public suspendServer ( string $serverId ) : Scalr\Tests\Functional\Api\ApiTestResponse
$serverId string Server's UUID
return Scalr\Tests\Functional\Api\ApiTestResponse

tearDown() protected method

See also: Scalr\Tests\TestCase::tearDown()
protected tearDown ( )

tearDownAfterClass() public static method

See also: Scalr\Tests\TestCase::tearDownAfterClass()
public static tearDownAfterClass ( )

terminateServer() public method

Terminates the server
public terminateServer ( string $serverId, boolean $force = false ) : Scalr\Tests\Functional\Api\ApiTestResponse
$serverId string Server's UUID
$force boolean optional
return Scalr\Tests\Functional\Api\ApiTestResponse

testComplex() public method

public testComplex ( )

Property Details

$loggerConfiguration protected static property

See also: Scalr\Tests\Functional\Api\ApiTestCase::$loggerConfiguration
protected static $loggerConfiguration

$uuid public property

public string $uuid
return string