updated getserver, getimage and getflavor
This commit is contained in:
parent
153c1f4602
commit
847e4c04ae
1 changed files with 12 additions and 6 deletions
|
@ -51,7 +51,7 @@ class compute
|
|||
* Create server.
|
||||
* @return array
|
||||
*/
|
||||
public function createServer(array $options)
|
||||
public function createServer()
|
||||
{
|
||||
|
||||
$server = $this->libClass->createServer();
|
||||
|
@ -60,9 +60,11 @@ class compute
|
|||
* Get server details.
|
||||
* @return array
|
||||
*/
|
||||
public function getServer(array $options = [])
|
||||
public function getServer()
|
||||
{
|
||||
$server = $this->libClass->getServer($options);
|
||||
$serverId = $this->app->getPostParam("serverId");
|
||||
$opt = array('id' => $serverId);
|
||||
$server = $this->libClass->getServer($opt);
|
||||
$this->app->setOutput("MyServer", $server);
|
||||
return;
|
||||
}
|
||||
|
@ -70,9 +72,11 @@ class compute
|
|||
* Get flavor details.
|
||||
* @return array
|
||||
*/
|
||||
public function getFlavor(array $options = [])
|
||||
public function getFlavor()
|
||||
{
|
||||
$flavor = $this->libClass->getFlavor($options);
|
||||
$flavorId = $this->app->getPostParam("flavorId");
|
||||
$opt = array('id' => $flavorId);
|
||||
$flavor = $this->libClass->getFlavor($opt);
|
||||
$this->app->setOutput("MyFlavor", $flavor);
|
||||
return;
|
||||
}
|
||||
|
@ -82,7 +86,9 @@ class compute
|
|||
*/
|
||||
public function getImage(array $options = [])
|
||||
{
|
||||
$image = $this->libClass->getImage($options);
|
||||
$imageId = $this->app->getPostParam("imageId");
|
||||
$opt = array('id' => $imageId);
|
||||
$image = $this->libClass->getImage($opt);
|
||||
$this->app->setOutput("MyImage", $image);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue