Skip to content
Snippets Groups Projects
Commit dfcf0b21 authored by Yas Naoi's avatar Yas Naoi
Browse files

Added Cloud(n) support at aws_cloud module.

parent 41f463d9
No related branches found
No related tags found
No related merge requests found
......@@ -1115,10 +1115,12 @@ function theme_cloud_display_dashboard($variables) {
function _cloud_callback_get_all_instances_list() {
// retrieve the table from the cloud_display_dashboard form
$form = drupal_get_form('cloud_display_dashboard');
exit();
$output = drupal_render($form);
// Send only the body do not send the headers
$index_start = strrpos($output, '<tbody>');
$index_end = strrpos($output, '</tbody>');
if ( isset($form['Nickname']) === FALSE || $form($table_data['Nickname']) == 0 ) { // No element present
$output = 'NULL';
}
......
<?php
/**
* @file
* Enables users to access the Privately managed clouds.
......
......@@ -205,7 +205,7 @@ function aws_cloud_schema() {
),
'image_id' => array(
'type' => 'varchar',
'length' => 16,
'length' => 64
),
'kernel_id' => array(
'type' => 'varchar',
......@@ -288,7 +288,7 @@ function aws_cloud_schema() {
'fields' => array(
'image_id' => array(
'type' => 'varchar',
'length' => 16,
'length' => 64
),
'cloud_type' => array(
'type' => 'varchar',
......@@ -347,7 +347,7 @@ function aws_cloud_schema() {
'fields' => array(
'volume_id' => array(
'type' => 'varchar',
'length' => 16,
'length' => 64
),
'cloud_type' => array(
'type' => 'varchar',
......@@ -359,7 +359,7 @@ function aws_cloud_schema() {
),
'snapshot_id' => array(
'type' => 'varchar',
'length' => 16,
'length' => 64
),
'instance_id' => array(
'type' => 'varchar',
......@@ -460,7 +460,7 @@ function aws_cloud_schema() {
),
'image_id' => array(
'type' => 'varchar',
'length' => 16,
'length' => 64
),
'owner' => array(
'type' => 'varchar',
......@@ -548,7 +548,7 @@ function aws_cloud_schema() {
'fields' => array(
'snapshot_id' => array(
'type' => 'varchar',
'length' => 16,
'length' => 64
),
'cloud_type' => array(
'type' => 'varchar',
......@@ -560,7 +560,7 @@ function aws_cloud_schema() {
),
'volume_id' => array(
'type' => 'varchar',
'length' => 16,
'length' => 64
),
'owner_id' => array(
'type' => 'varchar',
......
......@@ -68,7 +68,7 @@ function aws_cloud_sdk_describe_images($cloud_context, $images = array(), $owner
}
/**
* Creates an Amazon EBS-backed AMI from a running or stopped instance.
* Creates an Amazon EBS-backed AMI from a running or stopped instance.
* @param $cloud_context
* Cloud to perform operation on
* @param $instance_id
......@@ -746,8 +746,14 @@ function aws_cloud_sdk_deregister_image($cloud_context, $image_id, $opt = array(
* error message.
*/
function aws_cloud_sdk_check_response($response, $operation) {
if ($response->isOK()) {
return $response->body;
try { // for Cloud(n)
@$body = new SimpleXMLElement($response->body);
return $body;
} catch(Exception $e) { // This is normal for AWS
return $response->body;
}
}
else {
// Loop the errors and set a message.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment