示例#1
0
 case 'detach_storage':
     $drive = new Drive();
     if (AWS == TRUE) {
         $aws = new Aws($aws_instance_id, $aws_region);
         $aws_volume_id = $aws->fetch_volume_id_by_disk_path($disk_path);
         $aws->detach_volume($aws_volume_id);
         $timer = 0;
         while ($aws->fetch_volume_status($aws_volume_id) != 'available') {
             $timer += 1;
             if ($timer > 60) {
                 $error->set_msg("Had been waiting for volume status becoming available but timeout.");
             }
             $error->check();
             sleep(1);
         }
         $aws->delete_volume($aws_volume_id);
     }
     $error->check();
     break;
 case 'fc_update_db_flash_cache_size':
     $flash = new Flash();
     $result = $flash->update_db_flash_cache_size($conn_db, $fc_db_flash_cache_size);
     $error->check();
     break;
 case 'ss_switchover':
     oci_close($ss_conn_db_main);
     oci_close($ss_conn_db_backup);
     oci_close($ss_conn_asm_main);
     oci_close($ss_conn_asm_backup);
     $result = $site->switchover(SS_ORACLE_HOME, DB_USER, DB_PASSWORD, $ss_active_db_hostname, $ss_inactive_db_hostname, $ss_active_db_service, $ss_inactive_db_service, $ss_active_db_unique_name, $ss_inactive_db_unique_name, SS_LOG_ARCHIVE_DEST_ID);
     $error->check();