12-04-2012 12:15 PM
I'm trying to provison a new network via the API whilst using a pre-defined template, using the following code snippet to build the object before adding it to the grid:
11-28-2012 09:36 AM
Network have 2 different mandatory fields depending on the action, I'm guessing your template has a fixed netmask restriction:
11-28-2012 08:39 PM
Thanks for the reply Geoff!
Should have mentioned that we are running nIOS version 4.2, and I can't see the reference
you quoted above with regards to the $ipv4addr in the documentation guide?
I'm supplying a subnet and prefix of: 22.214.171.124/22 as test values:
12-04-2012 10:41 AM
It's probably a documentation bug, but again, it depends on how your template is set up.
if the template allows for a variable netmask, you would use 'network'
if the template allows for a fixed netmask, you would use 'ipv4addr'
12-04-2012 01:42 PM
I think Geoff is correct. I'm looking through the API reference docs for various releases, and it's documented in the 4.3 release doc and later. I don't have the 4.2 docs available right now (I have 4.1 and 4.3), but there was a big update/improvement to the CLI doc with 4.3 over 4.1. I'd suggest going to the support site and downloading the 4.3 CLI guide; while there may be a few things in there you can't use, I think it'll be a help for you trying to learn all of this.