Revision a39d1529 src/vmm_mad/remotes/lib/vcenter_driver/importer.rb
src/vmm_mad/remotes/lib/vcenter_driver/importer.rb | ||
---|---|---|
644 | 644 |
" - Cluster : \e[96m#{n[:cluster]}\e[39m\n"\ |
645 | 645 |
" - Cluster location : #{n[:cluster_location]}\n"\ |
646 | 646 |
" - OpenNebula Cluster ID : #{n[:one_cluster_id]}\n" |
647 |
print_str << " Import this Network (y/[n])? " |
|
647 |
|
|
648 |
if n[:one_cluster_id] == -1 |
|
649 |
print_str << "You need to import the associated vcenter cluster as one host first!" |
|
650 |
else |
|
651 |
print_str << " Import this Network (y/[n])? " |
|
652 |
end |
|
648 | 653 |
|
649 | 654 |
STDOUT.print print_str |
650 | 655 |
|
651 |
next if STDIN.gets.strip.downcase != 'y' |
|
656 |
next if STDIN.gets.strip.downcase != 'y' || n[:one_cluster_id] == -1
|
|
652 | 657 |
end |
653 | 658 |
|
654 | 659 |
# we try to retrieve once we know the desired net |
... | ... | |
845 | 850 |
|
846 | 851 |
tmps.each{ |d| |
847 | 852 |
if !use_defaults |
848 |
STDOUT.print "\n * Datastore found:\n"\
|
|
853 |
datastore_str = "\n * Datastore found:\n"\
|
|
849 | 854 |
" - Name : \e[92m#{d[:simple_name]}\e[39m\n"\ |
850 | 855 |
" - Total MB : #{d[:total_mb]}\n"\ |
851 | 856 |
" - Free MB : #{d[:free_mb]}\n"\ |
852 |
" - OpenNebula Cluster IDs: #{d[:cluster].join(',')}\n"\ |
|
853 |
" Import this datastore [y/n]? " |
|
857 |
" - OpenNebula Cluster IDs: #{d[:cluster].join(',')}\n" |
|
858 |
if d[:cluster].empty? |
|
859 |
datastore_str << "You need to import the associated vcenter cluster as one host first!" |
|
860 |
else |
|
861 |
datastore_str << " Import this datastore [y/n]? " |
|
862 |
end |
|
863 |
STDOUT.print datastore_str |
|
864 |
|
|
865 |
next if STDIN.gets.strip.downcase != 'y' || d[:cluster].empty? |
|
854 | 866 |
|
855 |
next if STDIN.gets.strip.downcase != 'y' |
|
856 | 867 |
|
857 | 868 |
STDOUT.print "\n NOTE: For each vCenter datastore a SYSTEM and IMAGE datastore\n"\ |
858 | 869 |
" will be created in OpenNebula except for a StorageDRS which is \n"\ |
Also available in: Unified diff