diff options
| author | stupidon <bhupendra.siyag@gmail.com> | 2016-02-28 20:21:05 +0100 |
|---|---|---|
| committer | stupidon <bhupendra.siyag@gmail.com> | 2016-02-28 20:21:05 +0100 |
| commit | 847e4c04aea8c56ac4e4b8d12fcb405e78159026 (patch) | |
| tree | 32af53c944b421da61f7581eb3eab2c8992f6fad /server/core/Compute.php | |
| parent | 153c1f4602e7a8247c7dc3e59e64d5eb65260ef2 (diff) | |
updated getserver, getimage and getflavor
Diffstat (limited to 'server/core/Compute.php')
| -rw-r--r-- | server/core/Compute.php | 18 |
1 files 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; } |
