From 847e4c04aea8c56ac4e4b8d12fcb405e78159026 Mon Sep 17 00:00:00 2001 From: stupidon Date: Sun, 28 Feb 2016 20:21:05 +0100 Subject: [PATCH] updated getserver, getimage and getflavor --- server/core/Compute.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/server/core/Compute.php b/server/core/Compute.php index 5a45362..1312083 100644 --- a/server/core/Compute.php +++ b/server/core/Compute.php @@ -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; }