request_410.patch

olivier sallou, 11/19/2010 03:25 PM

Download (6.58 KB)

View differences:

src/cli/onecluster
101 101
* create (Creates a new user)
102 102
    onecluster create clustername
103 103
    
104
* delete (Removes a cluster)
105
    onecluster delete <id>
104
* delete (Removes a cluster), use force to remove confirmation
105
    onecluster delete [force] <id>
106 106
    
107 107
* list (Lists all the clusters in the pool)
108 108
    onecluster list
......
152 152
when "delete"
153 153
    check_parameters("delete", 1)
154 154
    args=expand_args(ARGV)
155

  
155
    force=false
156 156
    args.each do |param|
157
	if param == "force"
158
	    force = true
159
            next
160
	end
161
        if !force
162
            puts "Are you sure you want to delete this cluster ? ("+param+") [Y/n]"
163
            answer = STDIN.gets.chomp
164
            Process.exit unless answer == "Y"
165
        end
157 166
        cluster_id=get_cluster_id(param)
158 167
        cluster=OpenNebula::Cluster.new(
159 168
            OpenNebula::Cluster.build_xml(cluster_id), get_one_client)
src/cli/onehost
182 182
* show (Gets info from a host)
183 183
    onehost show <host_id>
184 184

  
185
* delete (Removes a machine from the pool)
186
    onehost delete <host_id>
185
* delete (Removes a machine from the pool), use force to remove confirmation
186
    onehost delete [force] <host_id>
187 187

  
188 188
* list (Lists machines in the pool)
189 189
    onehost list
......
314 314
when "delete"
315 315
    check_parameters("delete", 1)
316 316
    args=expand_args(ARGV)
317

  
317
    force = false
318 318
    args.each do |param|
319
	if param == "force"
320
	    force = true
321
            next
322
	end
323
        if !force
324
            puts "Are you sure you want to delete this host ? ("+param+") [Y/n]"
325
            answer = STDIN.gets.chomp
326
            Process.exit unless answer == "Y"
327
        end
328

  
319 329
        host_id=get_host_id(param)
320 330

  
321 331
        host = OpenNebula::Host.new_with_id(host_id,get_one_client)
src/cli/oneimage
255 255
* show (Gets information about an specific Image)
256 256
    oneimage show <image_id>
257 257
   
258
* delete (Deletes an already deployed Image)
259
    oneimage delete <image_id>
258
* delete (Deletes an already deployed Image), use force to remove confirmation
259
    oneimage delete [force] <image_id>
260 260
   
261 261
EOT
262 262

  
......
499 499
when "delete"
500 500
    check_parameters("delete", 1)
501 501
    args=expand_args(ARGV)
502

  
502
    force = false
503 503
    args.each do |param|
504
	if param == "force"
505
	    force = true
506
            next
507
	end
508
        if !force
509
            puts "Are you sure you want to delete this image ? ("+param+") [Y/n]"
510
            answer = STDIN.gets.chomp
511
            Process.exit unless answer == "Y"
512
        end
504 513
        image_id = get_image_id(param)
505 514
        image = OpenNebula::Image.new(
506 515
                        OpenNebula::Image.build_xml(image_id),
src/cli/oneuser
107 107
* create (Creates a new user)
108 108
    oneuser create username password
109 109
    
110
* delete (Removes a user)
111
    oneuser delete <id>
110
* delete (Removes a user), use force to remove confirmation
111
    oneuser delete [force] <id>
112 112
    
113 113
* list (Lists all the users in the pool)
114 114
    oneuser list
......
189 189
when "delete"
190 190
    check_parameters("delete", 1)
191 191
    args=expand_args(ARGV)
192

  
192
    force = false
193 193
    args.each do |param|
194 194
        user_id=get_user_id(param)
195

  
195
	if param == "force"
196
	    force = true
197
            next
198
	end
199
        if !force
200
            puts "Are you sure you want to delete this user ? ("+param+") [Y/n]"
201
            answer = STDIN.gets.chomp
202
            Process.exit unless answer == "Y"
203
        end
196 204
        # Check if the user has defined VM's
197 205
        vms=false
198 206
        vmpool=OpenNebula::VirtualMachinePool.new(
src/cli/onevm
359 359
         (Set a different type for the new Image)
360 360
    onevm saveas <vm_id> <disk_id> <image_name> -t/--type <type>
361 361
        
362
* delete (Deletes a VM from the pool and DB)
363
    onevm delete <vm_id>
362
* delete (Deletes a VM from the pool and DB), use force to remove confirmation
363
    onevm delete [force] <vm_id>
364 364

  
365 365
* restart (Resubmits the VM after failure)
366 366
    onevm restart <vm_id>
......
708 708
when "delete"
709 709
    check_parameters("delete", 1)
710 710
    args=expand_args(ARGV)
711

  
711
    force = false
712 712
    args.each do |param|
713
	if param == "force"
714
	    force = true
715
            next
716
	end
717
        if !force
718
            puts "Are you sure you want to delete these vm ? ("+param+") [Y/n]"
719
            answer = STDIN.gets.chomp
720
            Process.exit unless answer == "Y"
721
        end
713 722
        vm_id=get_vm_id(param)
714 723

  
715 724
        vm=OpenNebula::VirtualMachine.new_with_id(vm_id, get_one_client)
src/cli/onevnet
161 161
* unpublish (Unpublish a virtual network)
162 162
    onevnet unpublish <network_id>
163 163
    
164
* delete (Removes a virtual network)
165
    onevnet delete <network_id>
164
* delete (Removes a virtual network), use force to remove confirmation
165
    onevnet delete [force] <network_id>
166 166
    
167 167
* list (Lists virtual networks in the pool)
168 168
    onevnet list <filter_flag>
......
285 285
when "delete"
286 286
    check_parameters("delete", 1)
287 287
    args=expand_args(ARGV)
288

  
288
    force = false
289 289
    args.each do |param|
290
	if param == "force"
291
	    force = true
292
            next
293
	end
294
        if !force
295
            puts "Are you sure you want to delete this cluster ? ("+param+") [Y/n]"
296
            answer = STDIN.gets.chomp
297
            Process.exit unless answer == "Y"
298
        end
290 299
        vn_id=get_vn_id(param)
291 300
        vn=OpenNebula::VirtualNetwork.new(
292 301
            OpenNebula::VirtualNetwork.build_xml(vn_id), get_one_client)
293
-