示例#1
0
     $result = $drive->add_disk($conn_asm, DEFAULT_DG, $disk_path);
     $error->check();
     break;
 case 'remove_storage':
     $drive = new Drive();
     $result = $drive->delete_disk($conn_asm, DEFAULT_DG, $disk_path);
     $error->check();
     break;
 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();