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

Refactored.

parent 92c844af
No related branches found
No related tags found
No related merge requests found
Showing
with 41 additions and 24 deletions
......@@ -19,9 +19,10 @@ e.g. (For an administrator)
'access dashboard' permission only
* After ver.0.83, the database schema has changed. If you already install
Clanavi 0.82 or less (before 01/29/2011), please uninstall and install modules.
* After ver.1.1, the database schema has changed. If you already install
Clanavi 1.01 or less (before 06/10/2011), please uninstall and install modules.
* Please see also cloud/modules/iaas/modules/aws_cloud/README.txt for AWS compatible cloud.
SYSTEM REQUIREMENTS
......
......@@ -1400,10 +1400,11 @@ function cloud_save(&$cloud) {
}
/**
* Basic cloud load function
* Basic cloud load function
* Stubbed out for future use
*/
function cloud_load($cloud_name) {
//TODO: is this needed?
}
/**
......
......@@ -162,8 +162,7 @@ function _cloud_fetch_data() {
function cloud_update_all_cloud_data() {
// TODO: Make CONSTANT (by Jamir)
set_time_limit(1000) ;
set_time_limit(CLOUD_TIME_LIMI) ;
$cloud_list = cloud_get_all_clouds();
$cloud_display_list = cloud_get_all_clouds_display_name() ;
......
......@@ -13,7 +13,7 @@
* @file
* Provides common functionalites for cloud management.
*/
// TODO: Make CONSTANT (by Jamir)
set_time_limit(5000);
//project name as a prefix to all project specific tables
......@@ -49,3 +49,5 @@ define('CLOUD_INSTANCE_STATUS_OPERATIONAL' , 'operational' ) ;
*/
define('CLOUD_VALID_DIGIT', '/^[0-9]+$/');
define('CLOUD_TIME_LIMI', 1000);
......@@ -2,4 +2,3 @@ name = Activity Audit
description = User Activity Auditing.
dependencies[] = cloud
package = Cloud
......@@ -278,7 +278,6 @@ function cloud_alerts_view($form_submit, $alert_id='') {
if ($alert_id) {
$query = _cloud_alerts_get() ;
// TODO: should be alert_id
$query_args = array(
'id' ,
$alert_id,
......
......@@ -2,4 +2,3 @@ name = Alerts
description = Get a quick synopsis of Alert Specifications .
package = Cloud
dependencies[] = cloud
......@@ -40,7 +40,6 @@ function cloud_alerts_schema() {
$schema[CLOUD_ALERTS_TABLE] = array(
'description' => t('Alerts Configuration'),
'fields' => array(
// TODO: should be alert_id (by Manoj)
'id' => array('type' => 'serial' , 'length' => 11),
'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', 'description' => ''),
'description' => array('type' => 'text' , 'not null' => FALSE, 'default' => '', 'description' => ''),
......@@ -54,7 +53,6 @@ function cloud_alerts_schema() {
'created' => array('type' => 'datetime' , 'not null' => FALSE, 'description' => ''),
'updated' => array('type' => 'datetime' , 'not null' => FALSE, 'description' => ''),
),
// TODO: should be alert_id (by Manoj)
'primary key' => array('id'),
);
......
......@@ -2,4 +2,3 @@ name = Billing
description = Get a pricing details of instances.
package = Cloud
dependencies[] = cloud_pricing
......@@ -71,3 +71,17 @@ function cloud_billing_schema() {
return $schema;
}
/**
* Function to Alter the table w.r.t to new table schema definitation using hook_update() function.
* Add the required field w.r.t to table schema definitation defined in hook_install() function.
* @return: Return the result information after executing the SQL query to Alter the table.
*/
function cloud_billing_update_6100() {
$cloud_billing_instances_table = CLOUD_BILLING_INSTANCES_DETAILS_TABLE ;
$ret = array();
db_add_field($ret, $cloud_billing_instances_table, 'initial_budget', array('type' => 'varchar', 'length' => '64', 'default' => 0));
return $ret;
}
\ No newline at end of file
......@@ -47,4 +47,19 @@ function _cloud_billing_generate_report($start, $end, $cloud_context='') {
'WHERE 1 and b.cloud_type="' . $cloud_context . '" group by a.instance_type ' ;
}
//end
\ No newline at end of file
//end
/**
* Update the Cloud Billing details
* @param $cloud_context
* @return
*/
function _cloud_billing_update_instance_query($cloud_context) {
$billing_instances_table = CLOUD_BILLING_INSTANCES_DETAILS_TABLE ;
$billing_instance_update = "update {" . $billing_instances_table . "} set %s='%s' where instance_id= '%s' and cloud_type = '%s'" ;
return $billing_instance_update;
}
\ No newline at end of file
......@@ -3,4 +3,3 @@ description = A cluster consists of a group of servers that work together
package = Cloud
dependencies[] = cloud
dependencies[] = cloud_server_templates
......@@ -2,4 +2,3 @@ name = Inputs
description = Get inputs variables.
package = Cloud
dependencies[] = cloud
......@@ -2,4 +2,3 @@ name = Pricing
description = Get a pricing details of instances.
package = Cloud
dependencies[] = cloud
......@@ -28,7 +28,6 @@ function _cloud_pricing_delete($id) {
//// add watchdog log
$query = _cloud_pricing_get_instances() ;
$query_args = array(
// TODO: What kind of id? (by Manoj)
'id' ,
$id ,
);
......
......@@ -2,4 +2,3 @@ name = Resource Allocator
description = Support Resource Allocation by Instance Allocation Algorithm. The default algorithm is 'Round Robin'.
package = Cloud
dependencies[] = cloud
......@@ -2,4 +2,3 @@ name = Round Robin Algorithm
description = Round Robin Algorithm for Instance Allocation (Provisioning)
package = Cloud
dependencies[] = cloud_resource_allocator
......@@ -2,4 +2,3 @@ name = Allocation Algorithm
description = Allocation Algorithm for Instance Allocation (Provisioning)
package = Cloud
dependencies[] = cloud_resource_allocator
......@@ -4,4 +4,3 @@ package = Cloud
dependencies[] = cloud
dependencies[] = cloud_server_templates
dependencies[] = cloud_inputs
......@@ -39,7 +39,6 @@ function cloud_scripting_schema() {
$schema[CLOUD_SCRIPTING_TABLE] = array(
'description' => t('Cloud Scripts'),
'fields' => array(
// TODO: should be script_id (by Manoj)
'id' => array('type' => 'serial' , 'length' => 11),
'name' => array('type' => 'varchar', 'length' => 255),
'description' => array('type' => 'text' ),
......
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