Security Engineering/ Network Question: Design and implement an automation mechanism for updating ServiceNow web service to reflect changes occurred in IPAM. First, we have IPAM (IP address...

1 answer below »
see files attachesproblem.docx and script.py


Security Engineering/ Network Question: Design and implement an automation mechanism for updating ServiceNow web service to reflect changes occurred in IPAM. First, we have IPAM (IP address Management, accessible from Infoblox) where data(IP address endpoint) are stored. (Accessible via a remote connection) Sometimes, changes are made in data. We need the change to be automatically reflected in the second service called, serviceNow. The change was done manually. One solution was a script that list all the data from IPAM in a Excel file and then push it to serviceNow. There is a Python script attached, which is supposed to help list all the IP address and their information such as the Environment it belongs to etc. This script isn’t complete because it doesn’t control subnetting. Some IP address range have subnet address, what we want is to list out all supernet and subnet in one excel list and just push them in ServiceNow. What is asked to do: 1. Either modify the provided script, to list all the data from IPAM in a excel file while also dealing with subnetting properly (meaning list out all subnets and supernets) 2. Or Come out with another solution to automate quickly and consistently update state of ServiceNow that reflect IPAM state. The outcome expected is automated maintance of IP's, Environment's in both IPAM and ServiceNow
Answered Same DayJul 09, 2021

Answer To: Security Engineering/ Network Question: Design and implement an automation mechanism for updating...

Sandeep Kumar answered on Jul 17 2021
144 Votes
import getpass
import os.path
from tkinter import *
from tkinter import filedialog
import time
from requests import codes
import random
imp
ort csv
import pandas
import InfoBlox.REST
networks = InfoBlox.REST.InfoBloxConnection()
containers = InfoBlox.REST.InfoBloxConnection()
print("Enter InfoBlox API credentials")
user = input("Username: ")
passwd = getpass.getpass()
networks.set_username_password(usr=user, passwd=passwd)
containers.set_username_password(usr=user, passwd=passwd)
del user, passwd
print("Retrieving containers...")
containers.get_networkcontainer_table()
while containers.status_code == codes.server_error:
print('Server error retrieving networkcontainer_table. Code:',containers.status_code)
print('Trying again in 150 seconds.')
time.sleep(150)
containers.get_networkcontainer_table()
if containers.status_code == codes.ok:
print("{} records retrieved from: {}".format(containers.count, containers.url))
else:
containers.last_return.raise_for_status()
print("Retrieving Networks...")
networks.get_network_table()
while networks.status_code == codes.server_error:
print('Server error retrieving networkcontainer_table. Code:',networks.status_code)
print('Trying again in 150 seconds.')
time.sleep(150)
networks.get_networkcontainer_table()
if networks.status_code == codes.ok:
print("{} records retrieved from: {}".format(networks.count, networks.url))
else:
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here