summaryrefslogtreecommitdiff
path: root/server/core
diff options
context:
space:
mode:
authorstupidon <bhupendra.siyag@gmail.com>2016-02-28 19:50:33 +0100
committerstupidon <bhupendra.siyag@gmail.com>2016-02-28 19:50:33 +0100
commit153c1f4602e7a8247c7dc3e59e64d5eb65260ef2 (patch)
tree2311c19e8f5ae634b000c2e43d42bff90a9fb896 /server/core
parent9280eecbcf42253363a30f97d265069d0159de77 (diff)
updated Compute to use formatted return
Diffstat (limited to 'server/core')
-rw-r--r--server/core/Compute.php23
1 files changed, 15 insertions, 8 deletions
diff --git a/server/core/Compute.php b/server/core/Compute.php
index e95380e..5a45362 100644
--- a/server/core/Compute.php
+++ b/server/core/Compute.php
@@ -24,7 +24,8 @@ class compute
public function listServers()
{
$servers = $this->libClass->listServers();
- return $servers;
+ $this->app->setOutput("Servers", $servers);
+ return;
}
/**
* List flavors.
@@ -33,7 +34,8 @@ class compute
public function listFlavors()
{
$flavors = $this->libClass->listFlavors();
- return $flavors;
+ $this->app->setOutput("Flavors", $flavors);
+ return;
}
/**
* List images.
@@ -42,7 +44,8 @@ class compute
public function listImages()
{
$images = $this->libClass->listImages();
- return $images;
+ $this->app->setOutput("Images", $images);
+ return;
}
/**
* Create server.
@@ -60,7 +63,8 @@ class compute
public function getServer(array $options = [])
{
$server = $this->libClass->getServer($options);
- return $server;
+ $this->app->setOutput("MyServer", $server);
+ return;
}
/**
* Get flavor details.
@@ -69,7 +73,8 @@ class compute
public function getFlavor(array $options = [])
{
$flavor = $this->libClass->getFlavor($options);
- return $flavor;
+ $this->app->setOutput("MyFlavor", $flavor);
+ return;
}
/**
* Get image details.
@@ -78,9 +83,11 @@ class compute
public function getImage(array $options = [])
{
$image = $this->libClass->getImage($options);
- return $image;
+ $this->app->setOutput("MyImage", $image);
+ return;
}
- //working on tests
+ /* working on tests
+
public function update()
{
$image = $this->app->getServer(array $options = []);
@@ -142,6 +149,6 @@ class compute
{
//TODO
}
-
+*/
}