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.
|
* Create server.
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function createServer(array $options)
|
public function createServer()
|
||||||
{
|
{
|
||||||
|
|
||||||
$server = $this->libClass->createServer();
|
$server = $this->libClass->createServer();
|
||||||
|
@ -60,9 +60,11 @@ class compute
|
||||||
* Get server details.
|
* Get server details.
|
||||||
* @return array
|
* @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);
|
$this->app->setOutput("MyServer", $server);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -70,9 +72,11 @@ class compute
|
||||||
* Get flavor details.
|
* Get flavor details.
|
||||||
* @return array
|
* @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);
|
$this->app->setOutput("MyFlavor", $flavor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +86,9 @@ class compute
|
||||||
*/
|
*/
|
||||||
public function getImage(array $options = [])
|
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);
|
$this->app->setOutput("MyImage", $image);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue