Closed RobinBeismann closed 5 years ago
Hey Robin. - I just put out a prerelease version to address your issues if you'd like to test it out. I plan on finishing it and publishing to PSGallery early next week.
Hey Josh,
I'll try it out once I'm at work again (on vacation right now), we're using this modul to import VMs, NICs, Subnets and IPs from the System Center Virtual Machine Manager into Netbox.
That's awesome! I'm running into some of the same bugs you are, working on a similar process for VMware and SCCM. Planning on working on a SCVMM one shortly, but it's a bit lower in priority as the size of our Hyper-V environment is minuscule in comparison. I am generalizing the VMWare stuff to allow me to put it out here, and will likely generalize the SCCM stuff a bit later this week.
I patched a few more bugs this morning and the prerelease version out there should be up to current edits. I also added an additional optional parameter to "Connect-nbAPI" to specify page size when querying (-QueryLimit). Now that I have paging, I find the 50 item pages quite slow in comparison to larger ones. I'm going to continue developing with the prerelease of 2.2.x and see if I stumble into more bugs, and publish it live around Wednesday if everything is going smooth.
Yes, this worked, thanks. However you didn't merge in the patch for the #11 yet, did you? I had to remote the clause which disables authentication for GET Requests.
Good call out, I changed a bunch of stuff in the begin block, but somehow missed the part where I actually avoid adding the token... Just patched it quick and it's rebuilding now. There should be a new prerelease version available. FWIW, we just changed our netbox to require login so I actually will be testing this change against a real netbox instance (see #15 as far as my testing woes)
Hi again,
is it possible to implement either a parameter or a settings variable for the request limit? The GET Parameter for this is ?limit=number, for example ?limit=0 will return unlimited much results, useful for IP Address requests and stuff like that. I've added it a new line at line 73 in Invoke-nbAPI.ps1 setting $Query["limit"] = "0" so it gets attached to the request, however I'm sure there are cleaner ways.