compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (37)

View Page History
{zone-data:skeletons}
{code}
interface Zend_Cloud_Infrastructure_Adapter
{
// HTTP adapter to use for connections
const HTTP_ADAPTER = 'http_adapter';
const NODE_STATUS_RUNNING = 'running';
const NODE_STATUS_STOPPED = 'stopped';
const NODE_STATUS_SHUTTING_DOWN= 'shutting-down';
namespace Zend\Cloud\Infrastructure;

interface Adapter
{
const HTTP_ADAPTER = 'http_adapter';
/**
* Return a list of the available nodes instances
*
* @return array
*/
public function listNode(); listInstances();

/**
* Return the status of a node an instance
*
* @param strin $id
* @return string
*/
public function statusInstance($id);

/**
* Return the public DNS name of the instance
*
* @param string $id
* @return string|boolean
*/
public function statusNode(); publicDnsInstance($id);

/**
* Reboot a node an instance
*
* @param string $id
* @return boolean
*/
public function rebootNode($id); rebootInstance($id);

/**
* Create a new node instance
*
* @param string $name
* @param array $options
* @return boolean
*/
public function createNode($name,$options);
public function createInstance($name,$options);

/**
* Stop the execution of a node
*
* @param string $id
* @return boolean
*/
public function stopNode($id);

/**
* Start the execution of a node
*
* @param string $id
* @return boolean
*/
public function startNode($id);

/**
* Destroy a node
*
* @param string $id
* @return boolean
*/
public function destroyNode($id);

/**
* Return a list of all the available node images
*
* @return array
*/
public function imagesNode();

/**
* Return the system informations about a node
* Stop the execution of an instance
*
* @param string $id
* @return boolean
*/
public function stopInstance($id);

/**
* Start the execution of an instance
*
* @param string $id
* @return boolean
*/
public function startInstance($id);

/**
* Destroy an instance
*
* @param string $id
* @return boolean
*/
public function destroyInstance($id);

/**
* Return all the available instances images
*
* @return array
*/
public function imagesInstance();

/**
* Return all the available zones
*/
public function monitorNode($id); zonesInstance();

/**
* Run arbitrary shell script on a node
* Return the system informations about the $metric of an instance
*
* @param string $id
* @param string $metric
* @param array $cmd $options
* @return array|false
*/
public function monitorInstance($id,$metric,$options=null);

/**
* Run arbitrary shell script on an instance
*
* @param string $id
* @param array $param
* @param string|array $cmd
* @return string|array
*/
public function deployInstance($id,$param,$cmd);

/**
* Get the adapter instance
*
* @return object
*/
public function deployNode($id,$cmd); getAdapter();

/**
* Get the adapter result
*
* @return array
*/
public function getAdapterResult();

/**
* Get the last HTTP response
*
* @return Zend\Http\Response
*/
public function getLastHttpResponse();

/**
* Ge the last HTTP request
*
* @return string
*/
public function getLastHttpRequest();
}

}
{code}
{zone-data}