[racktables-users] Re: Mass delete of objects with type 'VM'

  • From: Denis Ovsienko <denis@xxxxxxxxxxxxx>
  • To: <racktables-users@xxxxxxxxxxxxx>
  • Date: Thu, 16 Feb 2017 21:29:54 +0000

---- On Thu, 16 Feb 2017 19:28:53 +0000 Lucas Aimaretto  wrote ---- 

Hi Racktables users, 

any chance to delete all object with type 'VM'? 

Hi, 

I've found this: 

//www.freelists.org/post/racktables-users/delete-multiple-objects-massively,2


Basically, you need to find out the object_id of interest and then 
call the PHP function commitDeleteObject()... 

foreach (scanRealmByText ('object', '{$typeid_XXXX}') as $object)
        commitDeleteObject ($object['id']);

(For VMs XXXX == 1504, to avoid unnecessary copy-and-paste incidents.)

-- 
    Denis Ovsienko



Other related posts: