03-15-2018 12:29 AM - edited 03-01-2019 04:07 AM
Hi,
I have to choose between two options of sending multiple API Requests to push acl to device or sending a pretty huge json data to API
Which option should be preferred and is more scalable?
Option 1 will be sending multiple API request as
https://localhost:8888/api/config/devices/device/ioslab11
https://localhost:8888/api/config/devices/device/ioslab21
and data be
device ioslab11 {
config {
ios:ip {
access-list {
extended {
ext-named-acl demosite {
ext-access-list-rule "permit ip any any";
}
}
}
}
Option 2 is sending a single request but sending more json data
devices {
device ioslab11 {
config {
ios:ip {
access-list {
extended {
ext-named-acl demosite {
+ # after ext-access-list-rule "deny ip any any"
+ ext-access-list-rule "permit ip any any";
}
}
}
}
}
}
device ioslab21 {
config {
ios:ip {
access-list {
extended {
ext-named-acl demosite {
ext-access-list-rule "permit ip any any";
}
}
}
}
}
}
}
Thanks!
03-16-2018 11:17 AM
Hard to say.
Multiple REST calls will result in multiple transactions between NSO and the device.
How many ACLs are we talking about in one go?
03-21-2018 05:32 AM
Fewer transactions will be faster. If you can do what you want in a single transaction, you also don't have to worry about what to do if one part is accepted and the next isn't.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide