3 releases
new 0.1.2 | Jan 16, 2025 |
---|---|
0.1.1 | Jan 14, 2025 |
0.1.0 | Jan 12, 2025 |
#600 in Web programming
171 downloads per month
50KB
1.5K
SLoC
pan-os-rs
This project is intended to provide a wrapper around the PanOS REST API for a natively compiled and memory-safe language. Existing solutions often rely on the older XML API or are implemented in interpreted languages, which can limit performance and scalability. With this library, you can use Rust to create more efficient solutions for use with your Panorama and firewalls!
Usage
To use the library, simply use cargo add pan-os-rs
or add the following to your Cargo.toml
:
pan-os-rs = "0.1.0"
When using the library, all actions will be done through Session
, which is the main entry point for all API calls. With its methods, you can interact with any API surface exposed by PanOS simply by specifying the object type.
use pan_os_rs::Session;
let session = Session::new("127.0.0.1", "admin", String::from("password"), true).await?;
let addresses = session.get::<Address>(Location::Shared, None, None).await?;
for address in addresses {
println!("Name: {}\nDescription: {}\nIdentifier: {:?}\n", address.info.name, address.info.description, address.identifier);
}
Notes
While this project is focusing on the REST API, it's important to note that it will implement the bulk operations of the XML API as well for performance reasons.
Dependencies
~9–21MB
~286K SLoC