THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

How delete object via csv?

New Member
Posts: 4
9249     0

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.

 

Re: How delete object via csv?

[ Edited ]
Moderator
Moderator
Posts: 315
9250     0

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?

New Member
Posts: 4
9250     0

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?

New Member
Posts: 4
9250     0

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? Smiley Happy 

 

Re: How delete object via csv?

Moderator
Moderator
Posts: 315
9250     0

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?

New Member
Posts: 4
9250     0

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.

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You