- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How delete object via csv?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2019 01:39 AM
Hello guys,
I cant delete hosts via csv import.
I added host in this csv format and it is ok but i added about 1200 hosts 10x times[i did "Add" not "Merge" like i should - my fail] so i have to delete them.
header-hostrecord,configure_for_dns*,addresses,comment,fqdn*
hostrecord,FALSE,192.168.1.1,Server EXAMPLE EXAMPLE - 1,srv_www
hostrecord,FALSE,192.168.1.1,Server EXAMPLE EXAMPLE - 2,srv_www
I would like delete this hosts and already tested all formats, doesnt work.
I trying doing it since last week.. i have no idea how i should do it.
I also tried by WAPI Python but there is also problem - some like "No find hosts".
Thanks a lot guys.
Regards.
Solved! Go to Solution.
Re: How delete object via csv?
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2019 12:54 PM - edited 06-10-2019 12:55 PM
How are you trying to delete them now, and what error are you getting? Are you sure those records are still in the grid?
There are two CSV methods to delete records. One is to run a "delete" CSV job, and the other is to run a "custom" CSV job in which you specify the record and an action of "D" for delete.
With both methods you need to include enough information to describe the specific record. If it's not in the default DNS or network views, you also need to specify the view.
Thanks!
Re: How delete object via csv?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 11:36 PM
Thanks a lot MRichard for your reply.
For example, i give
header-hostrecord,configure_for_dns,addresses,fqdn [run "Delete"]
i get error
Deletion failed due to The selected object could not be found
Network-view - default
view - default
In fqdn i type name of ip/srv, for example "srv_www" without domain etc.
In some schema i get error like: could not find zone/parents but also trying type "view" and network-view setting to default in csv import but nothing.
In all example which i read there is written fqdn -> example.example2.com.
Example;
header-hostrecord,addresses,fqdn,import-action
hostrecord,192.168.x.x,srv_www,D
error: Deletion failed due to The action is not allowed. A parent was not found
Trying also via api
try:
ip = ibx.delete_host_record('srv_www')
print ip
except Exception as e:
print e
Error: No requested host found: srv_www
Any idea?
Re: How delete object via csv?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2019 12:26 AM
I have a little success:
This one work
header-hostaddress,configure_for_dns,address,parent,import-action
but error is "Found more than one host for xxxx" what is true..
Any idea?
Re: How delete object via csv?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2019 05:49 AM
When deleting a host you need to give it the fully qualified hostname, including the domain.
Also if you have multiple dns views, you need to specify the view. In general, you shoulds always specify the view even if it's "default" as a good habit.
Re: How delete object via csv?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 03:40 AM
Have answer from Infoblox support.
There is no way to delete host marked FALSE for "enable for DNS"
We can just delete the network container from the IPAM list and restore it back from the recycle bin.
Restoring the network won’t restore the DNS disabled host records and you can see only the DNS enabled host records in the network.