\CloudMunchServerHelper

This is a helper class to perform actions on server like providing methods to add ,read and update servers.

Summary

Methods
Properties
Constants
__construct()
getServer()
addServer()
updateServer()
deleteServer()
checkServerExists()
checkConnect()
checkConnectionToServer()
getConnectionToServer()
getSSHConnectionHelper()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$appContext
$cmDataManager
N/A

Properties

$appContext

$appContext : 

Type

$cmDataManager

$cmDataManager : 

Type

Methods

__construct()

__construct(  $appContext) 

Parameters

$appContext

getServer()

getServer(string  $servername) : \CloudMunch\Server

This method retreives the details of server from cloudmunch.

Parameters

string $servername

Name of the server as registered in cloudmunch.

Returns

\CloudMunch\Server

addServer()

addServer(\CloudMunch\Server  $server, string  $docker = false) 

This method can be used to add or register a server to cloudmunch data .

Parameters

\CloudMunch\Server $server
string $docker

updateServer()

updateServer(\CloudMunch\Server  $server) 

This method is used to update server data.

Parameters

\CloudMunch\Server $server

deleteServer()

deleteServer(  $serverName) 

This method is to delete server from cloudmunch.

Parameters

$serverName

Name of server.

checkServerExists()

checkServerExists(  $servername) : boolean

This method checks if server exists or is registered in cloudmunch data.

Parameters

$servername

Name of server.

Returns

boolean

checkConnect()

checkConnect(  $dns,   $sshport = 22) : string

Checks if server is up and running

Parameters

$dns
$sshport

Returns

string —

Success : displays an appropriate message Failure : exits with a failure status with an appropriate message

checkConnectionToServer()

checkConnectionToServer(  $servername) 

Parameters

$servername

getConnectionToServer()

getConnectionToServer(  $servername) 

Parameters

$servername

getSSHConnectionHelper()

getSSHConnectionHelper() : \CloudMunch\sshConnection

This method returns SSHConnection helper

Returns

\CloudMunch\sshConnection