Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps

Reply

DevOps - Infoblox - Creating a loopback host (post) and getting the record back (get).

[ Edited ]
New Member
Posts: 1
527     0

Hi All,

As part of my integration task , I am creating a loopback host(s) (loopback0,  loopback0 and loopback10 ) 

and getting the the specific loopback record back  for information like IPv4 and ipv6 addresses.

 

Creation is working fine, can anyone suggest which is is best way to fetch just that one loopback host ( say lookback10)- the get host call?

Following is the create call 

 

Usage 

infoblox.infoblox_common.create_host(ipv4=loopback1_ipv4, ipv6=loopback1_ipv6,

                                     alloc_use="loopback10",

                                     dns=False, suffix="-lo10")

 

 

Function 

def create_host(self, ipv4, ipv6, alloc_use, dns, suffix):

    self.log.info(f"Creating host entry for {self.properties['hostname']} in {alloc_use}")

    _res = self.apihandler.post_url(path="record:host",

                                    params={},

                                    data={

                                        "name": self.properties["hostname"] + suffix,

                                        "ipv4addrs": [{

                                            "ipv4addr": ipv4,

                                            "configure_for_dhcp": False,

                                            "use_for_ea_inheritance": True

                                        }],

                                        "ipv6addrs": [{

                                            "ipv6addr": ipv6,

                                            "configure_for_dhcp": False

                                        }],

                                        "configure_for_dns": dns,

                                        "aliases": [

                                           self.properties["hostname"] + ".net.xxx.xx.xxx-xxx.net"

                                        ],

                                        "extattrs": {

                                            "site_id": {

                                                "value": self.site_id

                                            }

                                        }

                                    })

    self.log.info(f"Host entry created {_res.json()}")

    return _res.json()

 

Thanks,

 

Regards,

Sujith

Showing results for 
Search instead for 
Did you mean: 

Recommended for You