Created
December 15, 2017 16:14
-
-
Save bandit145/c823a7c860ce97d165308481facaaf68 to your computer and use it in GitHub Desktop.
example update_if_exists failure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from infoblox_client import objects, connector | |
import getpass | |
def main(): | |
username = input('Username > ') | |
password = getpass.getpass('Password > ') | |
conn = connector.Connector({'host':'infoblox.example.com','username':username,'password':password, | |
'ssl_verify':False,'wapi_version':"1.7"}) | |
host_record = objects.HostRecord | |
host_record.create(conn, ip=objects.IP.create('8.8.8.8'), view="Public View (PNS)", name="test.example.net", | |
configure_for_dns=True, ttl=None, comment=None, | |
extattrs=None) | |
#fails in wapi 1.7.1 | |
host_record.create(conn, ip=objects.IP.create('8.8.4.4'), view="Public View (PNS)", name="test.example.net", | |
configure_for_dns=True, ttl=None, comment=None, | |
extattrs=None, update_if_exists=True) | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment