Forum Discussion
Anush
Nimbostratus
Jun 18, 2019prevent users to access URL using IP
Hi Experts, how do I prevent users to access the URL using IP? If uses access using IP, would like to drop those connections. Thanks
Mark_Atkinson_5
May 25, 2006Historic F5 Account
You can use the following patch against SOAPBuilder.py to allow SOAPpy to serialize arrays of arrays...
--- SOAPBuilder.py 2005-02-21 12:24:13.000000000 -0800
+++ /tmp/SOAPBuilder.py 2006-03-31 13:53:49.000000000 -0800
@@ -496,7 +496,10 @@
elemsname = tag
for i in data:
- self.dump(i, elemsname, not same_type, ns_map)
+ if type(i) == type([]):
+ self.dump(i,'item')
+ else:
+ self.dump(i, elemsname, not same_type, ns_map)
if typed: self.out.append('\n' % tag)
Then you can succesfully use SOAPpy 100% of iControl (haven't found a call that didn't work yet):
url = '%%s://%s:%s@%s/iControl/iControlPortal.cgi' % (admin,passwd,bigip)
ProxyBuilder = lambda x: SOAPProxy(url % 'https', namespace='urn:iControl:' + x)
sysinfo = ProxyBuilder('System/SystemInfo')
ver = sysinfo.get_version()
print "version: %s" % ver
pool = ProxyBuilder('LocalLB/Pool')
try:
pool.create(pool_names = ['test_pool'],
lb_methods = ['LB_METHOD_ROUND_ROBIN'],
members = [[{'address':'172.16.17.1','port':'80'}]])
except faultType, (ErrorFrom, ErrorMessage): faultType is defined by SOAPpy
if ErrorMessage.find("already exists") > 0:
print "pool test_pool already exists..."
else:
print "unhandled exception:", ErrorMessage
raise
Recent Discussions
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects