René's URL Explorer Experiment


Title: Added basic "exclude" range for next_available_ip · Issue #19 · Infoblox-Development/Infoblox-API-Python · GitHub

Open Graph Title: Added basic "exclude" range for next_available_ip · Issue #19 · Infoblox-Development/Infoblox-API-Python

X Title: Added basic "exclude" range for next_available_ip · Issue #19 · Infoblox-Development/Infoblox-API-Python

Description: In my organization, we try to reserve the first 10 IPs in any given network. I modified the "get_next_available_ip" function to include the ability to exclude a range starting at the first address in the network. This could easily be fur...

Open Graph Description: In my organization, we try to reserve the first 10 IPs in any given network. I modified the "get_next_available_ip" function to include the ability to exclude a range starting at the first address ...

X Description: In my organization, we try to reserve the first 10 IPs in any given network. I modified the "get_next_available_ip" function to include the ability to exclude a range starting at the firs...

Opengraph URL: https://github.com/Infoblox-Development/Infoblox-API-Python/issues/19

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Added basic \"exclude\" range for next_available_ip","articleBody":"In my organization, we try to reserve the first 10 IPs in any given network. I modified the \"get_next_available_ip\" function to include the ability to exclude a range starting at the first address in the network. This could easily be further modified for any range. I've named the new function \"get_next_available_ip_long\":\n\n```\ndef get_next_available_ip_long(self, network, num):\n    \"\"\" Implements IBA next_available_ip REST API call\n    Returns IP v4 address\n    :param network: network in CIDR format\n    \"\"\"\n\n    \"\"\"\n    Modified to include param num\n    param num is integer, will exclude that many addresses starting at .0\n    \"\"\"\n    def ip_exclude(start, count):\n        \"\"\"\n        This sub-function creates a list of excluded IPs for the next_available IP\n        Right now it only works to exclude the first x addresses in a range\n        \"\"\"\n\n        start_addr = start[:-3]             #chomps the \"/24\" off the network name\n        start_addr_list = start_addr.split(\".\")     #splits the network on each dot\n        start_oct4 = int(start_addr_list[3])        #changes the 4th octet to an int\n        start_oct4_str = start_addr_list[3]     #creates a string value for the 4th octet\n\n        count = int(count)\n        end_oct4 = start_oct4 + count           #sets the end of the reserved range\n        end_oct4_str = str(end_oct4)            #makes a string variable for that\n        end_addr = start_addr_list[0] + \".\" + start_addr_list[1] + \".\" +  start_addr_list[2] + \".\" +  end_oct4_str\n\n\n        exclude_range = []\n        while start_oct4 \u003c end_oct4:\n            start_oct4 = start_oct4 + 1\n            temp_oct4 = str(start_oct4)\n            temp_addr = start_addr_list[0] + \".\" + start_addr_list[1] + \".\" +  start_addr_list[2] + \".\" + temp_oct4\n            exclude_range.append(temp_addr)\n\n        return exclude_range                #returns a list of excluded addresses for post_data\n\n    exclude = ip_exclude(network, num)\n\n    rest_url = 'https://' + self.iba_host + '/wapi/v' + self.iba_wapi_version + '/network?network=' + network + '\u0026network_view=' + self.iba_network_view\n    try:\n        r = requests.get(url=rest_url, auth=(self.iba_user, self.iba_password), verify=self.iba_verify_ssl)\n        r_json = r.json()\n        if r.status_code == 200:\n        if len(r_json) \u003e 0:\n            net_ref = r_json[0]['_ref']\n            rest_url = 'https://' + self.iba_host + '/wapi/v' + self.iba_wapi_version + '/' + net_ref + '?_function=next_available_ip'\n            post_data = {\"num\":1,'exclude':exclude}\n            #this is the infoblox-approved \"long-form\" version of the \"next available IP\" call\n            r = requests.post(url=rest_url, auth=(self.iba_user, self.iba_password), verify=self.iba_verify_ssl, data=json.dumps(post_data))\n            r_json = r.json()\n            if r.status_code == 200:\n            ip_v4 = r_json['ips'][0]\n            return ip_v4\n            else:\n            if 'text' in r_json:\n                if 'code' in r_json and r_json['code'] == 'Client.Ibap.Data':\n                raise InfobloxNoIPavailableException(r_json['text'])\n                else:\n                raise InfobloxGeneralException(r_json['text'])\n            else:\n                r.raise_for_status()\n        else:\n            raise InfobloxNotFoundException(\"No requested network found: \" + network)\n        else:\n        if 'text' in r_json:\n            raise InfobloxGeneralException(r_json['text'])\n        else:\n            r.raise_for_status()\n    except ValueError:\n        raise Exception(r)\n    except Exception:\n        raise\n\n```\n","author":{"url":"https://github.com/Zamboughnuts","@type":"Person","name":"Zamboughnuts"},"datePublished":"2016-10-18T14:24:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/19/Infoblox-API-Python/issues/19"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1161f88d-9a19-e67d-4304-b74b71b60e4f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8710:13AA49:2AA0C55:37CCF53:697D5B5C
html-safe-noncee16fe71e76e379b709b7a3d4c802adb5ac2dc783d1efb36da9be332785fbe00a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzEwOjEzQUE0OToyQUEwQzU1OjM3Q0NGNTM6Njk3RDVCNUMiLCJ2aXNpdG9yX2lkIjoiNzIzNDI0MTEyNDcwMzc1NTEwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbbebfd95a4e7522457c834f6eaf4bb5d017a104a34f6253ec818e288fb6570b9
hovercard-subject-tagissue:183701915
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Infoblox-Development/Infoblox-API-Python/19/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c011de9625e7611dfa0162fa602d6098a7de5a1edc042031999df822eaaa553f/Infoblox-Development/Infoblox-API-Python/issues/19
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c011de9625e7611dfa0162fa602d6098a7de5a1edc042031999df822eaaa553f/Infoblox-Development/Infoblox-API-Python/issues/19
og:image:altIn my organization, we try to reserve the first 10 IPs in any given network. I modified the "get_next_available_ip" function to include the ability to exclude a range starting at the first address ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameZamboughnuts
hostnamegithub.com
expected-hostnamegithub.com
None60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6
turbo-cache-controlno-preview
go-importgithub.com/Infoblox-Development/Infoblox-API-Python git https://github.com/Infoblox-Development/Infoblox-API-Python.git
octolytics-dimension-user_id8240171
octolytics-dimension-user_loginInfoblox-Development
octolytics-dimension-repository_id22124028
octolytics-dimension-repository_nwoInfoblox-Development/Infoblox-API-Python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id22124028
octolytics-dimension-repository_network_root_nwoInfoblox-Development/Infoblox-API-Python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7c85641c598ad130c74f7bcc27f58575cac69551
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/issues/19#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FInfoblox-Development%2FInfoblox-API-Python%2Fissues%2F19
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FInfoblox-Development%2FInfoblox-API-Python%2Fissues%2F19
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=Infoblox-Development%2FInfoblox-API-Python
Reloadhttps://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/issues/19
Reloadhttps://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/issues/19
Reloadhttps://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/issues/19
Infoblox-Development https://patch-diff.githubusercontent.com/Infoblox-Development
Infoblox-API-Pythonhttps://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FInfoblox-Development%2FInfoblox-API-Python
Fork 58 https://patch-diff.githubusercontent.com/login?return_to=%2FInfoblox-Development%2FInfoblox-API-Python
Star 91 https://patch-diff.githubusercontent.com/login?return_to=%2FInfoblox-Development%2FInfoblox-API-Python
Code https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python
Issues 14 https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/issues
Pull requests 3 https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/pulls
Actions https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/actions
Projects 0 https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/projects
Wiki https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/wiki
Security 0 https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/security
Insights https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/pulse
Code https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python
Issues https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/issues
Pull requests https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/pulls
Actions https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/actions
Projects https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/projects
Wiki https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/wiki
Security https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/security
Insights https://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/Infoblox-Development/Infoblox-API-Python/issues/19
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/Infoblox-Development/Infoblox-API-Python/issues/19
Added basic "exclude" range for next_available_iphttps://patch-diff.githubusercontent.com/Infoblox-Development/Infoblox-API-Python/issues/19#top
https://github.com/Zamboughnuts
https://github.com/Zamboughnuts
Zamboughnutshttps://github.com/Zamboughnuts
on Oct 18, 2016https://github.com/Infoblox-Development/Infoblox-API-Python/issues/19#issue-183701915
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.