PHP Class DataSift\Storyplayer\DefinitionLib\TestEnvironment_HostDefinition

ファイルを表示 Open project: datasift/storyplayer Class Usage Examples

Protected Properties

Property Type Description
$hostAdapter Storyplayer\TestEnvironments\HostAdapter the adapter to use when interacting with this host
$hostId string the ID assigned to this host (it's complicated)
$osAdapter Storyplayer\TestEnvironments\OsAdapter plugin that we use to talk to the operating system running inside this host
$parentGroup TestEnvironment_GroupDefinition the group that this host belongs to
$provisioningParams DataSift\Stone\ObjectLib\BaseObject a list of provisioning parameters to send over to any provisioning engine
$roles array a list of the roles that this host supports
$storySettings DataSift\Stone\ObjectLib\BaseObject the settings that apps may be interested in

Public Methods

Method Description
__construct ( TestEnvironment_GroupDefinition $parentGroup, $hostId )
addProvisioningParams ( mixed $extraParams ) : TestEnvironment_HostDefinition add some extra provisioning parameters to any that have already been defined
addRole ( string $roleName ) : void add an extra role to our list of supported roles
getGroupAdapter ( ) : Storyplayer\TestEnvironments\GroupAdapter get access to the adapter for the group that we belong to
getGroupId ( ) : integer what is the ID of the group that we belong to?
getHostAdapter ( ) : Storyplayer\TestEnvironments\HostAdapter how do we interact with this host?
getHostAsConfig ( ) : DataSift\Stone\ObjectLib\BaseObject generate an SPv2.0-style config block describing this host
getHostId ( ) : string what is the ID of this host?
getOperatingSystem ( ) : Storyplayer\TestEnvironments\OsAdapter what operating system is running on this host?
getParentGroup ( ) : TestEnvironment_GroupDefinition which test environment group do we belong to?
getProvisioningParams ( ) : DataSift\Stone\ObjectLib\BaseObject what provisioning params do we have?
getRoles ( ) : array what roles does this host support?
getStorySettings ( ) : DataSift\Stone\ObjectLib\BaseObject return all of the story settings that this host supports
getTestEnvironmentName ( ) : string what is the name of the test environment that we belong to?
hasRole ( string $roleName ) : boolean does this host support this role?
setHostAdapter ( Storyplayer\TestEnvironments\HostAdapter $hostAdapter ) tell us how to interact with this host
setHostId ( string $hostId ) tell this host what its host ID is
setOperatingSystem ( Storyplayer\TestEnvironments\OsAdapter $osAdapter ) tell this host what operating system is running on this host
setParentGroup ( TestEnvironment_GroupDefinition $parentGroup ) : TestEnvironment_HostDefinition tell us which test environment group we belong to
setProvisioningParams ( mixed $rawSettings ) : TestEnvironment_HostDefinition set our provisioning parameters
setRoles ( array $roles ) tell this host what roles it supports
setStorySettings ( array | object | null $rawSettings ) tell this host what story settings it supports

Protected Methods

Method Description
initProvisioningParams ( ) : void initialise the provisioning params list

Method Details

__construct() public method

public __construct ( TestEnvironment_GroupDefinition $parentGroup, $hostId )
$parentGroup TestEnvironment_GroupDefinition

addProvisioningParams() public method

this is mostly used when we merge parameters across from the SystemUnderTest config
public addProvisioningParams ( mixed $extraParams ) : TestEnvironment_HostDefinition
$extraParams mixed the extra parameters to merge in
return TestEnvironment_HostDefinition

addRole() public method

add an extra role to our list of supported roles
public addRole ( string $roleName ) : void
$roleName string the name of the role to add
return void

getGroupAdapter() public method

get access to the adapter for the group that we belong to
public getGroupAdapter ( ) : Storyplayer\TestEnvironments\GroupAdapter
return Storyplayer\TestEnvironments\GroupAdapter

getGroupId() public method

what is the ID of the group that we belong to?
public getGroupId ( ) : integer
return integer

getHostAdapter() public method

how do we interact with this host?
public getHostAdapter ( ) : Storyplayer\TestEnvironments\HostAdapter
return Storyplayer\TestEnvironments\HostAdapter

getHostAsConfig() public method

generate an SPv2.0-style config block describing this host
public getHostAsConfig ( ) : DataSift\Stone\ObjectLib\BaseObject
return DataSift\Stone\ObjectLib\BaseObject

getHostId() public method

host IDs are the names that Storyplayer (and stories you write) will use to refer to a host. They may or may not be the same as the host's hostname.
public getHostId ( ) : string
return string

getOperatingSystem() public method

what operating system is running on this host?
public getOperatingSystem ( ) : Storyplayer\TestEnvironments\OsAdapter
return Storyplayer\TestEnvironments\OsAdapter

getParentGroup() public method

which test environment group do we belong to?

getProvisioningParams() public method

what provisioning params do we have?
public getProvisioningParams ( ) : DataSift\Stone\ObjectLib\BaseObject
return DataSift\Stone\ObjectLib\BaseObject

getRoles() public method

what roles does this host support?
public getRoles ( ) : array
return array

getStorySettings() public method

return all of the story settings that this host supports
public getStorySettings ( ) : DataSift\Stone\ObjectLib\BaseObject
return DataSift\Stone\ObjectLib\BaseObject

getTestEnvironmentName() public method

what is the name of the test environment that we belong to?
public getTestEnvironmentName ( ) : string
return string

hasRole() public method

does this host support this role?
public hasRole ( string $roleName ) : boolean
$roleName string the role to check for
return boolean TRUE if the role is supported FALSE otherwise

initProvisioningParams() protected method

initialise the provisioning params list
protected initProvisioningParams ( ) : void
return void

setHostAdapter() public method

tell us how to interact with this host
public setHostAdapter ( Storyplayer\TestEnvironments\HostAdapter $hostAdapter )
$hostAdapter Storyplayer\TestEnvironments\HostAdapter the adapter we should use

setHostId() public method

NOTES: * host IDs are normally validated in the group definition
public setHostId ( string $hostId )
$hostId string the host ID to use for this host

setOperatingSystem() public method

tell this host what operating system is running on this host
public setOperatingSystem ( Storyplayer\TestEnvironments\OsAdapter $osAdapter )
$osAdapter Storyplayer\TestEnvironments\OsAdapter the adapter to use for the relevant operating system

setParentGroup() public method

tell us which test environment group we belong to

setProvisioningParams() public method

NOTES: * this will overwrite any existing provisioning parameters that have already been set * if you pass in an object, we'll copy the details. we don't keep a handle to your original object
public setProvisioningParams ( mixed $rawSettings ) : TestEnvironment_HostDefinition
$rawSettings mixed the parameters to set
return TestEnvironment_HostDefinition

setRoles() public method

tell this host what roles it supports
public setRoles ( array $roles )
$roles array

setStorySettings() public method

tell this host what story settings it supports
public setStorySettings ( array | object | null $rawSettings )
$rawSettings array | object | null the settings to set

Property Details

$hostAdapter protected_oe property

the adapter to use when interacting with this host
protected HostAdapter,Storyplayer\TestEnvironments $hostAdapter
return Storyplayer\TestEnvironments\HostAdapter

$hostId protected_oe property

the ID assigned to this host (it's complicated)
protected string $hostId
return string

$osAdapter protected_oe property

plugin that we use to talk to the operating system running inside this host
protected OsAdapter,Storyplayer\TestEnvironments $osAdapter
return Storyplayer\TestEnvironments\OsAdapter

$parentGroup protected_oe property

the group that this host belongs to
protected TestEnvironment_GroupDefinition,DataSift\Storyplayer\DefinitionLib $parentGroup
return TestEnvironment_GroupDefinition

$provisioningParams protected_oe property

a list of provisioning parameters to send over to any provisioning engine
protected BaseObject,DataSift\Stone\ObjectLib $provisioningParams
return DataSift\Stone\ObjectLib\BaseObject

$roles protected_oe property

a list of the roles that this host supports
protected array $roles
return array

$storySettings protected_oe property

the settings that apps may be interested in
protected BaseObject,DataSift\Stone\ObjectLib $storySettings
return DataSift\Stone\ObjectLib\BaseObject