Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there any batch add network object interfaces? #98

Open
Duanexiao opened this issue Feb 23, 2021 · 9 comments
Open

Are there any batch add network object interfaces? #98

Duanexiao opened this issue Feb 23, 2021 · 9 comments

Comments

@Duanexiao
Copy link

When I batch add 200 network objects, it takes almost 10 minutes!That's not acceptable

@daxm
Copy link
Collaborator

daxm commented Feb 23, 2021 via email

@caballero-oscuro
Copy link

caballero-oscuro commented Feb 23, 2021

I use the 'bulk=true' parameter when posting network groups. I believe the same can be used for network objects.

def fmcapi_post_bulk(fmc, post_data): api_path = '/object/networkgroups?bulk=true' post_resp = fmc.send_to_api(method='post', url=fmc.configuration_url+api_path, json_data=post_data)

@daxm
Copy link
Collaborator

daxm commented Feb 23, 2021 via email

@caballero-oscuro
Copy link

Sure, I can do that.

@Duanexiao
Copy link
Author

I use the 'bulk=true' parameter when posting network groups. I believe the same can be used for network objects.

def fmcapi_post_bulk(fmc, post_data): api_path = '/object/networkgroups?bulk=true' post_resp = fmc.send_to_api(method='post', url=fmc.configuration_url+api_path, json_data=post_data)

nice job! Could you post some usage examples?

@Krandor1
Copy link

Krandor1 commented Feb 24, 2021 via email

@caballero-oscuro
Copy link

I use the 'bulk=true' parameter when posting network groups. I believe the same can be used for network objects.
def fmcapi_post_bulk(fmc, post_data): api_path = '/object/networkgroups?bulk=true' post_resp = fmc.send_to_api(method='post', url=fmc.configuration_url+api_path, json_data=post_data)

nice job! Could you post some usage examples?
Sorry it taken me a while to get back to you, but here's an example:

fmcapi-bulk-example.txt

@Duanexiao
Copy link
Author

I use the 'bulk=true' parameter when posting network groups. I believe the same can be used for network objects.
def fmcapi_post_bulk(fmc, post_data): api_path = '/object/networkgroups?bulk=true' post_resp = fmc.send_to_api(method='post', url=fmc.configuration_url+api_path, json_data=post_data)

nice job! Could you post some usage examples?
Sorry it taken me a while to get back to you, but here's an example:

fmcapi-bulk-example.txt

many thanks!

@lavermil
Copy link

Also worth the mention if you don't find the solution here for bulk object, port, object-group (port or object) you can use the Cisco import tool for that. It give a nice compare and shows if stuff is already in use. While I think it would be cool to have a nice tool that does everything I have to look at options I have available that are the most efficient and ready to use. Great enhancement idea though. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants