Skip to main content

Olt

Trait Olt 

Source
pub trait Olt: Send + 'static {
Show 26 methods // Required methods fn connect( host: &str, port: i32, user: &str, pass: &str, ) -> Result<Self, Error> where Self: Sized; fn list_unprovisioned_onts( &mut self, ) -> Result<Vec<UnprovisionedOnt>, Error>; fn find_onts_by_description( &mut self, description: &str, ) -> Result<Vec<OntInfoByDesc>, Error>; fn get_ont_by_sn(&mut self, serial_number: &str) -> Result<OntInfo, Error>; fn get_ont_summary( &mut self, scope: &OntSummaryScope, ) -> Result<Vec<OntSummaryPort>, Error>; fn list_line_profiles(&mut self) -> Result<Vec<LineProfile>, Error>; fn get_line_profile(&mut self, id: u32) -> Result<LineProfileDetail, Error>; fn list_service_profiles(&mut self) -> Result<Vec<SrvProfile>, Error>; fn get_ont_optical_info( &mut self, fsp: &Fsp, ont_id: u32, ) -> Result<OntOpticalInfo, Error>; fn ont_add(&mut self, request: &OntAddRequest) -> Result<u32, Error>; fn ont_delete_all(&mut self, fsp: &Fsp) -> Result<(), Error>; fn ont_port_native_vlan( &mut self, request: &OntPortNativeVlanRequest, ) -> Result<(), Error>; fn list_alarms_detail(&mut self) -> Result<Vec<AlarmDetail>, Error>; fn list_alarms(&mut self) -> Result<Vec<AlarmListEntry>, Error>; fn list_service_ports(&mut self) -> Result<Vec<ServicePort>, Error>; fn get_service_port(&mut self, id: u32) -> Result<ServicePortDetail, Error>; fn list_service_ports_by_port( &mut self, fsp: &Fsp, ) -> Result<Vec<ServicePort>, Error>; fn list_service_ports_by_ont( &mut self, fsp: &Fsp, ont_id: u32, ) -> Result<Vec<ServicePort>, Error>; fn service_port_add( &mut self, request: &ServicePortAddRequest, ) -> Result<(), Error>; fn service_port_undo(&mut self, id: u32) -> Result<(), Error>; fn list_vlans(&mut self) -> Result<Vec<Vlan>, Error>; fn get_vlan(&mut self, id: u32) -> Result<VlanDetail, Error>; fn create_vlan(&mut self, id: u32, vlan_type: VlanType) -> Result<(), Error>; fn delete_vlan(&mut self, id: u32) -> Result<(), Error>; fn ping(&mut self) -> Result<(), Error>; fn quit(&mut self) -> Result<(), Error>;
}
Expand description

Vendor-neutral interface for interacting with an OLT device.

Each OLT model (e.g. Huawei MA5800-X7, ZTE ZXA-C6xx) implements this trait, mapping domain operations to vendor-specific CLI commands internally.

Required Methods§

Source

fn connect(host: &str, port: i32, user: &str, pass: &str) -> Result<Self, Error>
where Self: Sized,

Establish an SSH connection to the OLT device.

Source

fn list_unprovisioned_onts(&mut self) -> Result<Vec<UnprovisionedOnt>, Error>

List ONTs that have been discovered but not yet provisioned.

Source

fn find_onts_by_description( &mut self, description: &str, ) -> Result<Vec<OntInfoByDesc>, Error>

Search for ONTs whose description matches the given text.

Source

fn get_ont_by_sn(&mut self, serial_number: &str) -> Result<OntInfo, Error>

Get detailed ONT information by serial number.

Source

fn get_ont_summary( &mut self, scope: &OntSummaryScope, ) -> Result<Vec<OntSummaryPort>, Error>

Get ONT summary for a frame, slot, or specific port.

Source

fn list_line_profiles(&mut self) -> Result<Vec<LineProfile>, Error>

List all GPON line profiles.

Source

fn get_line_profile(&mut self, id: u32) -> Result<LineProfileDetail, Error>

Get details of a specific GPON line profile.

Source

fn list_service_profiles(&mut self) -> Result<Vec<SrvProfile>, Error>

List all GPON service profiles.

Source

fn get_ont_optical_info( &mut self, fsp: &Fsp, ont_id: u32, ) -> Result<OntOpticalInfo, Error>

Get optical information for a specific ONT.

Source

fn ont_add(&mut self, request: &OntAddRequest) -> Result<u32, Error>

Add an ONT on a GPON port and return the allocated ONT ID.

Source

fn ont_delete_all(&mut self, fsp: &Fsp) -> Result<(), Error>

Delete all ONTs provisioned on a GPON port.

Source

fn ont_port_native_vlan( &mut self, request: &OntPortNativeVlanRequest, ) -> Result<(), Error>

Configure the native VLAN on an ONT port.

Source

fn list_alarms_detail(&mut self) -> Result<Vec<AlarmDetail>, Error>

List all active alarms with full detail.

Source

fn list_alarms(&mut self) -> Result<Vec<AlarmListEntry>, Error>

List all active alarms in compact form.

Source

fn list_service_ports(&mut self) -> Result<Vec<ServicePort>, Error>

List all service ports.

Source

fn get_service_port(&mut self, id: u32) -> Result<ServicePortDetail, Error>

Get details of a specific service port by index.

Source

fn list_service_ports_by_port( &mut self, fsp: &Fsp, ) -> Result<Vec<ServicePort>, Error>

List service ports on a specific physical port.

Source

fn list_service_ports_by_ont( &mut self, fsp: &Fsp, ont_id: u32, ) -> Result<Vec<ServicePort>, Error>

List service ports for a specific ONT on a port.

Source

fn service_port_add( &mut self, request: &ServicePortAddRequest, ) -> Result<(), Error>

Create a service port.

Source

fn service_port_undo(&mut self, id: u32) -> Result<(), Error>

Remove a service port by index.

Source

fn list_vlans(&mut self) -> Result<Vec<Vlan>, Error>

List all VLANs.

Source

fn get_vlan(&mut self, id: u32) -> Result<VlanDetail, Error>

Get details of a specific VLAN.

Source

fn create_vlan(&mut self, id: u32, vlan_type: VlanType) -> Result<(), Error>

Create a VLAN with the specified VLAN type.

Source

fn delete_vlan(&mut self, id: u32) -> Result<(), Error>

Delete a VLAN.

Source

fn ping(&mut self) -> Result<(), Error>

Check if the connection is alive.

Source

fn quit(&mut self) -> Result<(), Error>

Close the connection gracefully.

Implementors§